Search in sources :

Example 16 with StoragePoolRestRep

use of com.emc.storageos.model.pools.StoragePoolRestRep in project coprhd-controller by CoprHD.

the class ObjectVirtualPools method listStoragePoolsJson.

public static void listStoragePoolsJson(ObjectVirtualPoolForm vpool) {
    List<StoragePoolInfo> items = Lists.newArrayList();
    if (vpool.objectProtocols != null) {
        vpool.protocols = Sets.newHashSet(vpool.objectProtocols);
    }
    if (vpool != null && vpool.protocols != null && !vpool.protocols.isEmpty()) {
        Map<URI, String> storageSystemNames = StorageSystemUtils.getStorageSystemNames();
        List<StoragePoolRestRep> pools = getMatchingStoragePools(vpool);
        for (StoragePoolRestRep pool : pools) {
            String storageSystemName = storageSystemNames.get(id(pool.getStorageSystem()));
            items.add(new StoragePoolInfo(pool, storageSystemName));
        }
    }
    renderJSON(DataTablesSupport.createJSON(items, params));
}
Also used : StoragePoolInfo(models.datatable.StoragePoolDataTable.StoragePoolInfo) StoragePoolRestRep(com.emc.storageos.model.pools.StoragePoolRestRep) URI(java.net.URI)

Example 17 with StoragePoolRestRep

use of com.emc.storageos.model.pools.StoragePoolRestRep 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)

Aggregations

StoragePoolRestRep (com.emc.storageos.model.pools.StoragePoolRestRep)17 StoragePoolInfo (models.datatable.StoragePoolDataTable.StoragePoolInfo)7 StorageSystemRestRep (com.emc.storageos.model.systems.StorageSystemRestRep)5 URI (java.net.URI)5 BlockVirtualPoolRestRep (com.emc.storageos.model.vpool.BlockVirtualPoolRestRep)3 StoragePool (com.emc.storageos.db.client.model.StoragePool)2 BlockVirtualPoolForm (models.virtualpool.BlockVirtualPoolForm)2 RelatedResourceRep (com.emc.storageos.model.RelatedResourceRep)1 StringMapAdapter (com.emc.storageos.model.adapters.StringMapAdapter)1 FileShareRestRep (com.emc.storageos.model.file.FileShareRestRep)1 StoragePoolBulkRep (com.emc.storageos.model.pools.StoragePoolBulkRep)1 StoragePoolUpdate (com.emc.storageos.model.pools.StoragePoolUpdate)1 StoragePortRestRep (com.emc.storageos.model.ports.StoragePortRestRep)1 VirtualArrayRestRep (com.emc.storageos.model.varray.VirtualArrayRestRep)1 FileVirtualPoolRestRep (com.emc.storageos.model.vpool.FileVirtualPoolRestRep)1 CheckPermission (com.emc.storageos.security.authorization.CheckPermission)1 Task (com.emc.vipr.client.Task)1 ViPRCoreClient (com.emc.vipr.client.ViPRCoreClient)1 IdFilter (com.emc.vipr.client.core.filters.IdFilter)1 ViPRHttpException (com.emc.vipr.client.exceptions.ViPRHttpException)1