Search in sources :

Example 36 with StringOption

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);
}
Also used : ViPRCoreClient(com.emc.vipr.client.ViPRCoreClient) StringOption(util.StringOption) VirtualArrayRestRep(com.emc.storageos.model.varray.VirtualArrayRestRep)

Example 37 with StringOption

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);
}
Also used : ViPRCoreClient(com.emc.vipr.client.ViPRCoreClient) StringOption(util.StringOption) BucketRestRep(com.emc.storageos.model.object.BucketRestRep)

Example 38 with StringOption

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;
}
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 39 with StringOption

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;
}
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 40 with StringOption

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;
}
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