Search in sources :

Example 6 with StorageSystemTypeRestRep

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

the class StorageProviderTypes method getProviderOption.

public static List<StringOption> getProviderOption() {
    List<StringOption> allproviders = new ArrayList<StringOption>();
    StorageSystemTypeList storagetypelist = StorageSystemTypeUtils.getAllStorageSystemTypes(ALL_TYPE);
    for (StorageSystemTypeRestRep storagetypeRest : storagetypelist.getStorageSystemTypes()) {
        if (storagetypeRest.getIsSmiProvider()) {
            if (!StringUtils.equals(SCALEIO, storagetypeRest.getStorageTypeName())) {
                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 7 with StorageSystemTypeRestRep

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

the class StorageProviderTypes method getAllFlashProviderOption.

public static List<StringOption> getAllFlashProviderOption() {
    List<StringOption> allproviders = new ArrayList<StringOption>();
    StorageSystemTypeList storagetypelist = StorageSystemTypeUtils.getAllStorageSystemTypes(ALL_TYPE);
    for (StorageSystemTypeRestRep storagetypeRest : storagetypelist.getStorageSystemTypes()) {
        if (storagetypeRest.getIsSmiProvider()) {
            if (StringUtils.equals(SMIS, storagetypeRest.getStorageTypeName()) || StringUtils.equals(XTREMIO, storagetypeRest.getStorageTypeName())) {
                allproviders.add(new StringOption(storagetypeRest.getStorageTypeName(), storagetypeRest.getStorageTypeDispName()));
            }
        }
    }
    Collections.sort(allproviders);
    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 8 with StorageSystemTypeRestRep

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

the class StorageProviderTypes method getScaleIoOption.

public static List<StringOption> getScaleIoOption() {
    List<StringOption> allproviders = new ArrayList<StringOption>();
    StorageSystemTypeList storagetypelist = StorageSystemTypeUtils.getAllStorageSystemTypes(ALL_TYPE);
    for (StorageSystemTypeRestRep storagetypeRest : storagetypelist.getStorageSystemTypes()) {
        if (storagetypeRest.getStorageTypeName().equals(SCALEIO)) {
            allproviders.add(new StringOption(storagetypeRest.getStorageTypeName(), storagetypeRest.getStorageTypeDispName()));
        }
        if (storagetypeRest.getStorageTypeName().equals(SCALEIOAPI)) {
            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 9 with StorageSystemTypeRestRep

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

the class StorageProviderTypes method getProvidersWithSSL.

public static List<StringOption> getProvidersWithSSL() {
    List<StringOption> allproviders = new ArrayList<StringOption>();
    StorageSystemTypeList storagetypelist = StorageSystemTypeUtils.getAllStorageSystemTypes(ALL_TYPE);
    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 10 with StorageSystemTypeRestRep

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

the class StorageSystemTypes method getStorageTypeOptions.

/**
 * Inside structure of StringOption is "storage type name: provider name (or storage type display name)
 */
public static List<StringOption> getStorageTypeOptions() {
    Map<String, String> arrayProviderMap = StorageSystemTypesInitUtils.getProviderDsiplayNameMap();
    List<StringOption> options = new ArrayList<StringOption>();
    Map<String, StorageSystemTypeRestRep> typeMap = buildTypeMap();
    for (StorageSystemTypeRestRep type : typeMap.values()) {
        String typeName = type.getStorageTypeName();
        if (type.isNative()) {
            // ignore SMIS providers except VPLEX, SCALEIO, IBMXIV, XTREMIO
            if (type.getIsSmiProvider() && !StringUtils.equals(VPLEX, typeName) && !StringUtils.equals(SCALEIOAPI, typeName) && !StringUtils.equals(IBMXIV, typeName) && !StringUtils.equals(XTREMIO, typeName) && !StringUtils.equals(CEPH, typeName)) {
                continue;
            }
            String provider = arrayProviderMap.get(typeName);
            if (provider != null) {
                if (StringUtils.equals(VMAX, typeName)) {
                    options.add(new StringOption(SMIS, provider));
                } else {
                    options.add(new StringOption(typeName, provider));
                }
            } else if (!StringUtils.equals(VNX_BLOCK, typeName)) {
                // VNX block is covered by VMAX
                options.add(new StringOption(typeName, type.getStorageTypeDispName()));
            }
        } else if (type.getIsSmiProvider()) {
            continue;
        } else if (type.getManagedBy() != null) {
            options.add(new StringOption(typeName, typeMap.get(type.getManagedBy()).getStorageTypeDispName()));
        } else {
            options.add(new StringOption(typeName, type.getStorageTypeDispName()));
        }
    }
    return options;
}
Also used : StorageSystemTypeRestRep(com.emc.storageos.model.storagesystem.type.StorageSystemTypeRestRep) StringOption(util.StringOption) ArrayList(java.util.ArrayList)

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