use of com.emc.storageos.model.storagesystem.type.StorageSystemTypeList 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;
}
use of com.emc.storageos.model.storagesystem.type.StorageSystemTypeList 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;
}
use of com.emc.storageos.model.storagesystem.type.StorageSystemTypeList 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;
}
use of com.emc.storageos.model.storagesystem.type.StorageSystemTypeList in project coprhd-controller by CoprHD.
the class StorageSystemTypeService method getStorageSystemTypes.
/**
* Returns a list of all Storage System Types requested for like block,
* file, object or all. Valid input parameters are block, file, object and
* all
*
* @brief List storage system types
* @return List of all storage system types.
*/
@GET
@Path("/type/{type}")
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@CheckPermission(roles = { Role.SYSTEM_ADMIN, Role.SYSTEM_MONITOR })
public StorageSystemTypeList getStorageSystemTypes(@PathParam("type") String type) {
log.info("GET getStorageSystemType on type: " + type);
if (type != null) {
ArgValidator.checkFieldValueFromEnum(type.toUpperCase(), "metaType", StorageSystemType.META_TYPE.class);
}
List<URI> ids = _dbClient.queryByType(StorageSystemType.class, true);
StorageSystemTypeList list = new StorageSystemTypeList();
Iterator<StorageSystemType> iter = _dbClient.queryIterativeObjects(StorageSystemType.class, ids);
while (iter.hasNext()) {
StorageSystemType ssType = iter.next();
if (ssType.getStorageTypeId() == null) {
ssType.setStorageTypeId(ssType.getId().toString());
}
if (StringUtils.equals(ALL_TYPE, type) || StringUtils.equals(type, ssType.getMetaType())) {
list.getStorageSystemTypes().add(map(ssType));
}
}
return list;
}
use of com.emc.storageos.model.storagesystem.type.StorageSystemTypeList in project coprhd-controller by CoprHD.
the class BlockVirtualPools method getSupportAutoTierTypes.
private static List<String> getSupportAutoTierTypes() {
List<String> result = new ArrayList<String>();
StorageSystemTypeList types = StorageSystemTypeUtils.getAllStorageSystemTypes(StorageSystemTypeUtils.ALL_TYPE);
for (StorageSystemTypeRestRep type : types.getStorageSystemTypes()) {
if (type.isNative() || type.getIsSmiProvider() || !type.isSupportAutoTierPolicy()) {
continue;
}
result.add(type.getStorageTypeName());
}
return result;
}
Aggregations