use of models.datatable.StorageSystemDataTable.StorageSystemInfo in project coprhd-controller by CoprHD.
the class VirtualArrays method storageSystemsJson.
public static void storageSystemsJson(String id) {
List<StorageSystemInfo> items = Lists.newArrayList();
for (StorageSystemRestRep storageSystem : StorageSystemUtils.getStorageSystemsByVirtualArray(id)) {
items.add(new StorageSystemInfo(storageSystem));
}
renderJSON(DataTablesSupport.createJSON(items, params));
}
use of models.datatable.StorageSystemDataTable.StorageSystemInfo in project coprhd-controller by CoprHD.
the class VirtualArrays method addStorageSystemsJson.
/**
* Gets the list of storage systems that may be associated to a virtual array.
*
* @param id
* the virtual array ID.
*/
public static void addStorageSystemsJson(String id) {
List<StorageSystemInfo> allitems = Lists.newArrayList();
Map<String, String> associatedStorage = new HashMap<String, String>();
for (StorageSystemRestRep associatedstorageSystem : StorageSystemUtils.getStorageSystemsByVirtualArray(id)) {
associatedStorage.put(associatedstorageSystem.getId().toString(), associatedstorageSystem.getName());
}
for (StorageSystemRestRep storageSystem : StorageSystemUtils.getStorageSystems()) {
if (associatedStorage.get(storageSystem.getId().toString()) == null) {
allitems.add(new StorageSystemInfo(storageSystem));
}
}
renderJSON(DataTablesSupport.createJSON(allitems, params));
}
Aggregations