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