Search in sources :

Example 11 with StorageSystemTypeList

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

the class StorageSystemTypes method getProvidersWithEMS.

public static List<StringOption> getProvidersWithEMS() {
    String alltypes = "all";
    List<StringOption> allproviders = new ArrayList<StringOption>();
    StorageSystemTypeList storagetypelist = StorageSystemTypeUtils.getAllStorageSystemTypes(alltypes);
    for (StorageSystemTypeRestRep storagetypeRest : storagetypelist.getStorageSystemTypes()) {
        if (storagetypeRest.getIsElementMgr()) {
            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 12 with StorageSystemTypeList

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

the class StorageSystemTypes method buildTypeMap.

public static Map<String, StorageSystemTypeRestRep> buildTypeMap() {
    StorageSystemTypeList list = StorageSystemTypeUtils.getAllStorageSystemTypes(StorageSystemTypeUtils.ALL_TYPE);
    Map<String, StorageSystemTypeRestRep> typeMap = new HashMap<String, StorageSystemTypeRestRep>();
    for (StorageSystemTypeRestRep type : list.getStorageSystemTypes()) {
        typeMap.put(type.getStorageTypeId(), type);
    }
    return typeMap;
}
Also used : StorageSystemTypeRestRep(com.emc.storageos.model.storagesystem.type.StorageSystemTypeRestRep) HashMap(java.util.HashMap) StorageSystemTypeList(com.emc.storageos.model.storagesystem.type.StorageSystemTypeList)

Example 13 with StorageSystemTypeList

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

the class StorageSystemTypes method getAllFlashStorageTypeOptions.

/**
 * Inside structure of StringOption is "storage type name: provider name (or storage type display name)
 */
public static List<StringOption> getAllFlashStorageTypeOptions() {
    Map<String, String> arrayProviderMap = StorageSystemTypesInitUtils.getProviderDsiplayNameMap();
    List<StringOption> options = new ArrayList<StringOption>();
    StorageSystemTypeList typeList = StorageSystemTypeUtils.getAllStorageSystemTypes(StorageSystemTypeUtils.ALL_TYPE);
    for (StorageSystemTypeRestRep type : typeList.getStorageSystemTypes()) {
        String typeName = type.getStorageTypeName();
        // All Flash XTREMIO, VMAX and UNITY
        String provider = arrayProviderMap.get(typeName);
        if (provider != null) {
            if (StringUtils.equals(VMAX, typeName)) {
                options.add(new StringOption(SMIS, provider));
            } else if (StringUtils.equals(XTREMIO, typeName)) {
                options.add(new StringOption(XTREMIO, provider));
            }
        } else if (StringUtils.equals(UNITY, typeName)) {
            options.add(new StringOption(typeName, type.getStorageTypeDispName()));
        }
    }
    Collections.sort(options);
    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 14 with StorageSystemTypeList

use of com.emc.storageos.model.storagesystem.type.StorageSystemTypeList 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 15 with StorageSystemTypeList

use of com.emc.storageos.model.storagesystem.type.StorageSystemTypeList 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)

Aggregations

StorageSystemTypeList (com.emc.storageos.model.storagesystem.type.StorageSystemTypeList)24 StorageSystemTypeRestRep (com.emc.storageos.model.storagesystem.type.StorageSystemTypeRestRep)23 ArrayList (java.util.ArrayList)22 StringOption (util.StringOption)19 StorageSystemType (com.emc.storageos.db.client.model.StorageSystemType)1 CheckPermission (com.emc.storageos.security.authorization.CheckPermission)1 URI (java.net.URI)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