use of util.StringOption in project coprhd-controller by CoprHD.
the class FileSystems method getTargetVArrys.
public static void getTargetVArrys() {
ViPRCoreClient client = BourneUtil.getViprClient();
List<StringOption> targetVarrayOptions = Lists.newArrayList();
List<VirtualArrayRestRep> virtualArrays = client.varrays().getAll();
if (virtualArrays != null && !virtualArrays.isEmpty()) {
for (VirtualArrayRestRep varray : virtualArrays) {
targetVarrayOptions.add(new StringOption(varray.getId().toString(), varray.getName()));
}
}
renderArgs.put("targetVarrayOptions", targetVarrayOptions);
renderJSON(targetVarrayOptions);
}
use of util.StringOption in project coprhd-controller by CoprHD.
the class ObjectBuckets method editBucketAce.
public static void editBucketAce(@Required String id) {
String type = BucketACLForm.extractTypeFromId(id);
String name = BucketACLForm.extractNameFromId(id);
String domain = BucketACLForm.extractDomainFromId(id);
String bucketId = BucketACLForm.extractBucketFromId(id);
String permissions = BucketACLForm.extractPermissionsFromId(id);
if ("null".equals(domain)) {
domain = "";
}
BucketACLForm bucketACL = new BucketACLForm();
bucketACL.type = type;
bucketACL.domain = domain;
bucketACL.name = name;
String[] strPerm = permissions.split("\\|");
bucketACL.permissions = new HashSet<String>(Arrays.asList(strPerm));
List<StringOption> permissionOptions = BucketACLForm.getPermissionOptions();
renderArgs.put("permissionOptions", permissionOptions);
renderArgs.put("bucketId", bucketId);
ViPRCoreClient client = BourneUtil.getViprClient();
BucketRestRep restRep = client.objectBuckets().get(uri(bucketId));
renderArgs.put("bucketName", restRep.getName());
renderArgs.put("TYPE", type.toUpperCase());
render(bucketACL);
}
use of util.StringOption in project coprhd-controller by CoprHD.
the class StorageProviderTypes method getProvidersWithEMS.
public static List<StringOption> getProvidersWithEMS() {
List<StringOption> allproviders = new ArrayList<StringOption>();
StorageSystemTypeList storagetypelist = StorageSystemTypeUtils.getAllStorageSystemTypes(ALL_TYPE);
for (StorageSystemTypeRestRep storagetypeRest : storagetypelist.getStorageSystemTypes()) {
if (storagetypeRest.getIsElementMgr()) {
allproviders.add(new StringOption(storagetypeRest.getStorageTypeName(), storagetypeRest.getStorageTypeDispName()));
}
}
return allproviders;
}
use of util.StringOption in project coprhd-controller by CoprHD.
the class StorageProviderTypes method getProvidersWithSecretKey.
public static Object getProvidersWithSecretKey() {
List<StringOption> allproviders = new ArrayList<StringOption>();
StorageSystemTypeList storagetypelist = StorageSystemTypeUtils.getAllStorageSystemTypes(ALL_TYPE);
for (StorageSystemTypeRestRep storagetypeRest : storagetypelist.getStorageSystemTypes()) {
if (storagetypeRest.getIsSecretKey()) {
allproviders.add(new StringOption(storagetypeRest.getStorageTypeName(), storagetypeRest.getStorageTypeDispName()));
}
}
return allproviders;
}
use of util.StringOption in project coprhd-controller by CoprHD.
the class StorageSystemTypes method getProvidersWithSSL.
public static List<StringOption> getProvidersWithSSL() {
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;
}
Aggregations