Search in sources :

Example 26 with StorageSystemRestRep

use of com.emc.storageos.model.systems.StorageSystemRestRep in project coprhd-controller by CoprHD.

the class StorageSystems method editPool.

public static void editPool(String id, String poolId) {
    StoragePoolRestRep storagePool = StoragePoolUtils.getStoragePool(poolId);
    StorageSystemRestRep storageSystem = StorageSystemUtils.getStorageSystem(id(storagePool.getStorageSystem()));
    if (RegistrationStatus.isUnregistered(storageSystem.getRegistrationStatus())) {
        flash.put("warning", MessagesUtils.get(NOT_REGISTERED, storageSystem.getName()));
    }
    StorageArrayPoolForm storageArrayPool = new StorageArrayPoolForm();
    storageArrayPool.readFrom(storagePool);
    render(storageArrayPool, storagePool, storageSystem);
}
Also used : StorageSystemRestRep(com.emc.storageos.model.systems.StorageSystemRestRep) StoragePoolRestRep(com.emc.storageos.model.pools.StoragePoolRestRep)

Example 27 with StorageSystemRestRep

use of com.emc.storageos.model.systems.StorageSystemRestRep in project coprhd-controller by CoprHD.

the class StorageSystems method pools.

public static void pools(String id) {
    addReferenceData();
    StorageSystemRestRep storageSystem = StorageSystemUtils.getStorageSystem(id);
    StorageArrayPoolDataTable dataTable = new StorageArrayPoolDataTable();
    if (StorageSystemTypes.isFileStorageSystem(storageSystem.getSystemType())) {
        dataTable.configureForFile();
    }
    if (StorageSystemTypes.isECS(storageSystem.getSystemType())) {
        dataTable.configureForECS();
    }
    render("@listPools", storageSystem, dataTable);
}
Also used : StorageSystemRestRep(com.emc.storageos.model.systems.StorageSystemRestRep)

Example 28 with StorageSystemRestRep

use of com.emc.storageos.model.systems.StorageSystemRestRep in project coprhd-controller by CoprHD.

the class StorageSystems method virtualNasServers.

public static void virtualNasServers(String id) {
    addReferenceData();
    StorageSystemRestRep storageSystem = StorageSystemUtils.getStorageSystem(id);
    VirtualNasServerDataTable dataTable;
    if (isTenantAdmin() || isProjectAdmin()) {
        dataTable = new VirtualNasServerDataTable();
    } else {
        dataTable = new VirtualNasForNonProjectAdminDataTable();
    }
    renderArgs.put("storageId", id);
    renderArgs.put("expectedGeoVersion", VCenterUtils.checkCompatibleVDCVersion(EXPECTED_GEO_VERSION_FOR_VNAS_SUPPORT));
    render("@listVirtualNasServers", storageSystem, dataTable);
}
Also used : StorageSystemRestRep(com.emc.storageos.model.systems.StorageSystemRestRep) VirtualNasServerDataTable(models.datatable.VirtualNasServerDataTable)

Example 29 with StorageSystemRestRep

use of com.emc.storageos.model.systems.StorageSystemRestRep in project coprhd-controller by CoprHD.

the class StorageSystems method itemDetails.

public static void itemDetails(String id) {
    StorageSystemRestRep storageSystem = StorageSystemUtils.getStorageSystem(id);
    if (storageSystem == null) {
        error(MessagesUtils.get(UNKNOWN, id));
    }
    StorageProviderRestRep smisProvider = StorageSystemUtils.getStorageProvider(storageSystem);
    Map<String, Set<NamedRelatedResourceRep>> connectivityMap = StorageSystemUtils.getProtectionConnectivityMap(storageSystem);
    render(storageSystem, smisProvider, connectivityMap);
}
Also used : StorageProviderRestRep(com.emc.storageos.model.smis.StorageProviderRestRep) Set(java.util.Set) TreeSet(java.util.TreeSet) HashSet(java.util.HashSet) StorageSystemRestRep(com.emc.storageos.model.systems.StorageSystemRestRep)

Example 30 with StorageSystemRestRep

use of com.emc.storageos.model.systems.StorageSystemRestRep in project coprhd-controller by CoprHD.

the class VirtualArrays method storagePortsJson.

/**
 * Renders the list of storage ports for a given virtual array as JSON.
 *
 * @param id
 *            the virtual array ID.
 */
public static void storagePortsJson(String id) {
    List<StoragePortInfo> items = Lists.newArrayList();
    CachedResources<StorageSystemRestRep> storageSystems = StorageSystemUtils.createCache();
    List<StoragePortRestRep> storagePorts = StoragePortUtils.getStoragePortsByVirtualArray(uri(id));
    Map<URI, String> networks = NetworkUtils.getNetworkNamesByVirtualArray(id);
    for (StoragePortRestRep storagePort : storagePorts) {
        StoragePortInfo item = new StoragePortInfo(storagePort, storageSystems.get(storagePort.getStorageDevice()));
        item.assigned = VirtualArrayUtils.isAssigned(storagePort, id);
        item.network = networks.get(id(storagePort.getNetwork()));
        items.add(item);
    }
    renderJSON(DataTablesSupport.createJSON(items, params));
}
Also used : StorageSystemRestRep(com.emc.storageos.model.systems.StorageSystemRestRep) StoragePortRestRep(com.emc.storageos.model.ports.StoragePortRestRep) StoragePortInfo(models.datatable.StoragePortDataTable.StoragePortInfo) URI(java.net.URI)

Aggregations

StorageSystemRestRep (com.emc.storageos.model.systems.StorageSystemRestRep)44 URI (java.net.URI)11 ArrayList (java.util.ArrayList)10 StoragePortRestRep (com.emc.storageos.model.ports.StoragePortRestRep)7 HashSet (java.util.HashSet)7 VirtualArrayRestRep (com.emc.storageos.model.varray.VirtualArrayRestRep)6 ViPRCoreClient (com.emc.vipr.client.ViPRCoreClient)6 NamedRelatedResourceRep (com.emc.storageos.model.NamedRelatedResourceRep)5 StoragePoolRestRep (com.emc.storageos.model.pools.StoragePoolRestRep)5 Asset (com.emc.sa.asset.annotation.Asset)4 VolumeRestRep (com.emc.storageos.model.block.VolumeRestRep)4 AssetOption (com.emc.vipr.model.catalog.AssetOption)4 AssetDependencies (com.emc.sa.asset.annotation.AssetDependencies)3 StorageProviderRestRep (com.emc.storageos.model.smis.StorageProviderRestRep)3 JsonArray (com.google.gson.JsonArray)3 JsonObject (com.google.gson.JsonObject)3 HashMap (java.util.HashMap)3 GetStorageSystems (com.emc.sa.service.vipr.tasks.GetStorageSystems)2 RelatedResourceRep (com.emc.storageos.model.RelatedResourceRep)2 FileShareRestRep (com.emc.storageos.model.file.FileShareRestRep)2