Search in sources :

Example 1 with StoragePoolInfo

use of models.datatable.StoragePoolDataTable.StoragePoolInfo in project coprhd-controller by CoprHD.

the class FileVirtualPools method listStoragePoolsJson.

public static void listStoragePoolsJson(FileVirtualPoolForm vpool) {
    List<StoragePoolInfo> items = Lists.newArrayList();
    if (vpool != null && vpool.protocols != null && !vpool.protocols.isEmpty()) {
        vpool.deserialize();
        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 2 with StoragePoolInfo

use of models.datatable.StoragePoolDataTable.StoragePoolInfo in project coprhd-controller by CoprHD.

the class StorageSystems method arrayPoolsJson.

public static void arrayPoolsJson(String id) {
    List<StoragePoolInfo> results = Lists.newArrayList();
    List<StoragePoolRestRep> storagePools = StoragePoolUtils.getStoragePools(id);
    for (StoragePoolRestRep storagePool : storagePools) {
        if (!DiscoveredDataObject.DiscoveryStatus.NOTVISIBLE.name().equals(storagePool.getDiscoveryStatus())) {
            results.add(new StoragePoolInfo(storagePool));
        }
    }
    renderJSON(DataTablesSupport.createJSON(results, params));
}
Also used : StoragePoolInfo(models.datatable.StoragePoolDataTable.StoragePoolInfo) StoragePoolRestRep(com.emc.storageos.model.pools.StoragePoolRestRep)

Example 3 with StoragePoolInfo

use of models.datatable.StoragePoolDataTable.StoragePoolInfo in project coprhd-controller by CoprHD.

the class VirtualArrays method availableStoragePoolsJson.

/**
 * Renders the list of storage pools available for the given virtual array as JSON.
 *
 * @param id
 *            the virtual array ID.
 */
public static void availableStoragePoolsJson(String id) {
    List<StoragePoolInfo> items = Lists.newArrayList();
    CachedResources<StorageSystemRestRep> storageSystems = StorageSystemUtils.createCache();
    for (StoragePoolRestRep storagePool : StoragePoolUtils.getStoragePoolsAssignableToVirtualArray(id)) {
        items.add(new StoragePoolInfo(storagePool, storageSystems));
    }
    renderJSON(DataTablesSupport.createJSON(items, params));
}
Also used : StoragePoolInfo(models.datatable.StoragePoolDataTable.StoragePoolInfo) StorageSystemRestRep(com.emc.storageos.model.systems.StorageSystemRestRep) StoragePoolRestRep(com.emc.storageos.model.pools.StoragePoolRestRep)

Example 4 with StoragePoolInfo

use of models.datatable.StoragePoolDataTable.StoragePoolInfo in project coprhd-controller by CoprHD.

the class BlockVirtualPools method listStoragePoolsJson.

public static void listStoragePoolsJson(BlockVirtualPoolForm vpool) {
    List<StoragePoolInfo> items = Lists.newArrayList();
    if (vpool != null && vpool.protocols != null && !vpool.protocols.isEmpty()) {
        vpool.deserialize();
        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 5 with StoragePoolInfo

use of models.datatable.StoragePoolDataTable.StoragePoolInfo in project coprhd-controller by CoprHD.

the class VirtualArrays method storagePoolsJson.

/**
 * Renders the list of storage pools for a given virtual array as JSON.
 *
 * @param id
 *            the virtual array ID.
 */
public static void storagePoolsJson(String id) {
    List<StoragePoolInfo> items = Lists.newArrayList();
    CachedResources<StorageSystemRestRep> storageSystems = StorageSystemUtils.createCache();
    for (StoragePoolRestRep storagePool : StoragePoolUtils.getStoragePoolsAssignedToVirtualArray(id)) {
        StoragePoolInfo item = new StoragePoolInfo(storagePool, storageSystems);
        item.assigned = VirtualArrayUtils.isAssigned(storagePool, id);
        items.add(item);
    }
    renderJSON(DataTablesSupport.createJSON(items, params));
}
Also used : StoragePoolInfo(models.datatable.StoragePoolDataTable.StoragePoolInfo) StorageSystemRestRep(com.emc.storageos.model.systems.StorageSystemRestRep) StoragePoolRestRep(com.emc.storageos.model.pools.StoragePoolRestRep)

Aggregations

StoragePoolRestRep (com.emc.storageos.model.pools.StoragePoolRestRep)7 StoragePoolInfo (models.datatable.StoragePoolDataTable.StoragePoolInfo)7 URI (java.net.URI)4 StorageSystemRestRep (com.emc.storageos.model.systems.StorageSystemRestRep)2 BlockVirtualPoolRestRep (com.emc.storageos.model.vpool.BlockVirtualPoolRestRep)1 BlockVirtualPoolForm (models.virtualpool.BlockVirtualPoolForm)1