Search in sources :

Example 16 with StorageSystemTypeRestRep

use of com.emc.storageos.model.storagesystem.type.StorageSystemTypeRestRep in project coprhd-controller by CoprHD.

the class StorageSystemTypes method getBlockStorageOptions.

public static List<StringOption> getBlockStorageOptions() {
    List<StringOption> options = new ArrayList<StringOption>(Arrays.asList(StringOption.NONE_OPTION));
    StorageSystemTypeList typeList = StorageSystemTypeUtils.getAllStorageSystemTypes(StorageSystemTypeUtils.ALL_TYPE);
    for (StorageSystemTypeRestRep type : typeList.getStorageSystemTypes()) {
        // ignore those whose type is not block
        if (!StorageSystemTypeUtils.BLOCK_TYPE.equalsIgnoreCase(type.getMetaType()) && !StorageSystemTypeUtils.BLOCK_AND_FILE_TYPE.equalsIgnoreCase(type.getMetaType())) {
            continue;
        }
        // no need further check for non-SMIS providers
        if (!type.getIsSmiProvider()) {
            options.add(new StringOption(type.getStorageTypeName(), type.getStorageTypeDispName()));
            continue;
        }
        if ((StringUtils.equals(SCALEIO, type.getStorageTypeName()) || StringUtils.equals(IBMXIV, type.getStorageTypeName()) || StringUtils.equals(XTREMIO, type.getStorageTypeName())) || StringUtils.equals(CEPH, type.getStorageTypeName())) {
            options.add(new StringOption(type.getStorageTypeName(), type.getStorageTypeDispName()));
        }
    }
    return options;
}
Also used : StorageSystemTypeRestRep(com.emc.storageos.model.storagesystem.type.StorageSystemTypeRestRep) StringOption(util.StringOption) ArrayList(java.util.ArrayList) StorageSystemTypeList(com.emc.storageos.model.storagesystem.type.StorageSystemTypeList)

Example 17 with StorageSystemTypeRestRep

use of com.emc.storageos.model.storagesystem.type.StorageSystemTypeRestRep in project coprhd-controller by CoprHD.

the class StorageSystemTypes method getProvidersWithoutSSL.

public static List<StringOption> getProvidersWithoutSSL() {
    String alltypes = "all";
    List<StringOption> allproviders = new ArrayList<StringOption>();
    StorageSystemTypeList storagetypelist = StorageSystemTypeUtils.getAllStorageSystemTypes(alltypes);
    for (StorageSystemTypeRestRep storagetypeRest : storagetypelist.getStorageSystemTypes()) {
        if (!storagetypeRest.getIsDefaultSsl()) {
            allproviders.add(new StringOption(storagetypeRest.getStorageTypeName(), storagetypeRest.getStorageTypeDispName()));
        }
    }
    return allproviders;
}
Also used : StorageSystemTypeRestRep(com.emc.storageos.model.storagesystem.type.StorageSystemTypeRestRep) StringOption(util.StringOption) ArrayList(java.util.ArrayList) StorageSystemTypeList(com.emc.storageos.model.storagesystem.type.StorageSystemTypeList)

Example 18 with StorageSystemTypeRestRep

use of com.emc.storageos.model.storagesystem.type.StorageSystemTypeRestRep in project coprhd-controller by CoprHD.

the class StorageSystemTypes method getObjectStorageOptions.

public static List<StringOption> getObjectStorageOptions() {
    List<StringOption> options = new ArrayList<StringOption>(Arrays.asList(StringOption.NONE_OPTION));
    StorageSystemTypeList typeList = StorageSystemTypeUtils.getAllStorageSystemTypes(StorageSystemTypeUtils.ALL_TYPE);
    for (StorageSystemTypeRestRep type : typeList.getStorageSystemTypes()) {
        if (!StorageSystemTypeUtils.OBJECT_TYPE.equalsIgnoreCase(type.getMetaType())) {
            continue;
        }
        options.add(new StringOption(type.getStorageTypeName(), type.getStorageTypeDispName()));
    }
    return options;
}
Also used : StorageSystemTypeRestRep(com.emc.storageos.model.storagesystem.type.StorageSystemTypeRestRep) StringOption(util.StringOption) ArrayList(java.util.ArrayList) StorageSystemTypeList(com.emc.storageos.model.storagesystem.type.StorageSystemTypeList)

Example 19 with StorageSystemTypeRestRep

use of com.emc.storageos.model.storagesystem.type.StorageSystemTypeRestRep in project coprhd-controller by CoprHD.

the class StorageSystemTypes method getProvidersWithSecretKey.

public static List<StringOption> getProvidersWithSecretKey() {
    String alltypes = "all";
    List<StringOption> allproviders = new ArrayList<StringOption>();
    StorageSystemTypeList storagetypelist = StorageSystemTypeUtils.getAllStorageSystemTypes(alltypes);
    for (StorageSystemTypeRestRep storagetypeRest : storagetypelist.getStorageSystemTypes()) {
        if (storagetypeRest.getIsSecretKey()) {
            allproviders.add(new StringOption(storagetypeRest.getStorageTypeName(), storagetypeRest.getStorageTypeDispName()));
        }
    }
    return allproviders;
}
Also used : StorageSystemTypeRestRep(com.emc.storageos.model.storagesystem.type.StorageSystemTypeRestRep) StringOption(util.StringOption) ArrayList(java.util.ArrayList) StorageSystemTypeList(com.emc.storageos.model.storagesystem.type.StorageSystemTypeList)

Example 20 with StorageSystemTypeRestRep

use of com.emc.storageos.model.storagesystem.type.StorageSystemTypeRestRep in project coprhd-controller by CoprHD.

the class VirtualDataCenterProvider method getStorageSystemType.

private List<String> getStorageSystemType(AssetOptionsContext ctx, String storagetype) {
    List<String> storagesystemtypes = new ArrayList<String>();
    StorageSystemTypeList storagetypelist = api(ctx).storageSystemType().listStorageSystemTypes("all");
    for (StorageSystemTypeRestRep storagetypeRest : storagetypelist.getStorageSystemTypes()) {
        if (storagetypeRest.getMetaType().equals(storagetype) || storagetypeRest.getMetaType().contains(storagetype)) {
            storagesystemtypes.add(storagetypeRest.getStorageTypeName());
        }
    }
    return storagesystemtypes;
}
Also used : StorageSystemTypeRestRep(com.emc.storageos.model.storagesystem.type.StorageSystemTypeRestRep) ArrayList(java.util.ArrayList) StorageSystemTypeList(com.emc.storageos.model.storagesystem.type.StorageSystemTypeList)

Aggregations

StorageSystemTypeRestRep (com.emc.storageos.model.storagesystem.type.StorageSystemTypeRestRep)27 StorageSystemTypeList (com.emc.storageos.model.storagesystem.type.StorageSystemTypeList)23 ArrayList (java.util.ArrayList)23 StringOption (util.StringOption)20 StorageSystemType (com.emc.storageos.db.client.model.StorageSystemType)1 HashMap (java.util.HashMap)1 GET (javax.ws.rs.GET)1 Path (javax.ws.rs.Path)1 Produces (javax.ws.rs.Produces)1 EnumOption (util.EnumOption)1