Search in sources :

Example 16 with StringOption

use of util.StringOption 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)

Example 17 with StringOption

use of util.StringOption in project coprhd-controller by CoprHD.

the class StorageSystemTypes method getProvidersWithMDM.

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

use of util.StringOption in project coprhd-controller by CoprHD.

the class StorageSystemTypes method getFileStorageOptions.

public static List<StringOption> getFileStorageOptions() {
    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.FILE_TYPE.equalsIgnoreCase(type.getMetaType()) && !StorageSystemTypeUtils.BLOCK_AND_FILE_TYPE.equalsIgnoreCase(type.getMetaType())) {
            continue;
        }
        if (type.getIsSmiProvider()) {
            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 StringOption

use of util.StringOption 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 20 with StringOption

use of util.StringOption 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)

Aggregations

StringOption (util.StringOption)44 ArrayList (java.util.ArrayList)26 StorageSystemTypeRestRep (com.emc.storageos.model.storagesystem.type.StorageSystemTypeRestRep)20 StorageSystemTypeList (com.emc.storageos.model.storagesystem.type.StorageSystemTypeList)19 NamedRelatedResourceRep (com.emc.storageos.model.NamedRelatedResourceRep)4 VirtualArrayRestRep (com.emc.storageos.model.varray.VirtualArrayRestRep)3 ViPRCoreClient (com.emc.vipr.client.ViPRCoreClient)3 FlashException (controllers.util.FlashException)3 ComputeImageServerRestRep (com.emc.storageos.model.compute.ComputeImageServerRestRep)2 ComputeSystemRestRep (com.emc.storageos.model.compute.ComputeSystemRestRep)2 StorageSystemRestRep (com.emc.storageos.model.systems.StorageSystemRestRep)2 URI (java.net.URI)2 DataObjectRestRep (com.emc.storageos.model.DataObjectRestRep)1 AuthnProviderRestRep (com.emc.storageos.model.auth.AuthnProviderRestRep)1 CustomServicesPrimitiveResourceList (com.emc.storageos.model.customservices.CustomServicesPrimitiveResourceList)1 FilePolicyRestRep (com.emc.storageos.model.file.policy.FilePolicyRestRep)1 BucketRestRep (com.emc.storageos.model.object.BucketRestRep)1 ProjectRestRep (com.emc.storageos.model.project.ProjectRestRep)1 ComputeVirtualPoolRestRep (com.emc.storageos.model.vpool.ComputeVirtualPoolRestRep)1 TruststoreSettings (com.emc.vipr.model.keystore.TruststoreSettings)1