Search in sources :

Example 1 with StorageSystemInfo

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));
}
Also used : StorageSystemInfo(models.datatable.StorageSystemDataTable.StorageSystemInfo) StorageSystemRestRep(com.emc.storageos.model.systems.StorageSystemRestRep)

Example 2 with StorageSystemInfo

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));
}
Also used : StorageSystemInfo(models.datatable.StorageSystemDataTable.StorageSystemInfo) HashMap(java.util.HashMap) StorageSystemRestRep(com.emc.storageos.model.systems.StorageSystemRestRep)

Aggregations

StorageSystemRestRep (com.emc.storageos.model.systems.StorageSystemRestRep)2 StorageSystemInfo (models.datatable.StorageSystemDataTable.StorageSystemInfo)2 HashMap (java.util.HashMap)1