use of com.emc.storageos.model.varray.VirtualArrayRestRep in project coprhd-controller by CoprHD.
the class FileProtectionPolicies method getVarraysAssociatedWithPools.
public static void getVarraysAssociatedWithPools(String id) {
List<VirtualArrayRestRep> varrayList = Lists.newArrayList();
Set<String> varraySet = Sets.newHashSet();
FileVirtualPoolRestRep vpool = getViprClient().fileVpools().get(uri(id));
List<RelatedResourceRep> varrays = vpool.getVirtualArrays();
for (RelatedResourceRep varray : varrays) {
varraySet.add(varray.getId().toString());
}
for (String varrayId : varraySet) {
VirtualArrayRestRep varray = getViprClient().varrays().get(uri(varrayId));
varrayList.add(varray);
}
renderJSON(varrayList);
}
use of com.emc.storageos.model.varray.VirtualArrayRestRep in project coprhd-controller by CoprHD.
the class BlockVirtualPools method listSrdfVirtualArraysJson.
public static void listSrdfVirtualArraysJson(BlockVirtualPoolForm vpool) {
if (vpool == null) {
renderJSON(Collections.emptyList());
}
vpool.deserialize();
List<StringOption> actualOptions = Lists.newArrayList();
List<VirtualArrayRestRep> virtualArrays = await(vpool.srdfVirtualArrays().asPromise());
for (StringOption option : dataObjectOptions(virtualArrays)) {
if (!varrayAlreadyInSRDFCopies(option.id, vpool.srdfCopies)) {
actualOptions.add(option);
}
}
renderJSON(actualOptions);
}
use of com.emc.storageos.model.varray.VirtualArrayRestRep in project coprhd-controller by CoprHD.
the class VirtualArrays method getConnectedStorage.
public static void getConnectedStorage() {
List<VirtualArrayRestRep> virtualarrays = VirtualArrayUtils.getVirtualArrays();
Set<String> connectedstoragesystems = new HashSet<String>();
for (VirtualArrayRestRep virtualarray : virtualarrays) {
for (StorageSystemRestRep storageSystem : StorageSystemUtils.getStorageSystemsByVirtualArray(virtualarray.getId().toString())) {
connectedstoragesystems.add(storageSystem.getId().toString());
}
}
renderJSON(connectedstoragesystems);
}
use of com.emc.storageos.model.varray.VirtualArrayRestRep in project coprhd-controller by CoprHD.
the class VirtualArrays method getDisconnectedStorage.
public static void getDisconnectedStorage(@As(",") String[] ids) {
Set<String> connectedstoragesystems = new HashSet<String>();
Set<String> disConnectedstoragesystems = new HashSet<String>();
JsonObject dataObject = getCookieAsJson(GUIDE_DATA);
if (dataObject != null) {
JsonArray varrays = dataObject.getAsJsonArray(VARRAYS);
if (varrays != null) {
for (Object virtualarray : varrays) {
JsonObject varrayobject = (JsonObject) virtualarray;
String varrayid = varrayobject.get("id").getAsString();
VirtualArrayRestRep virtualArrayRestRep = VirtualArrayUtils.getVirtualArray(varrayid);
if (virtualArrayRestRep == null || virtualArrayRestRep.getInactive()) {
// ignore for now
continue;
}
for (StorageSystemRestRep storageSystem : StorageSystemUtils.getStorageSystemsByVirtualArray(varrayid)) {
connectedstoragesystems.add(storageSystem.getId().toString());
}
}
}
}
for (String id : ids) {
StorageSystemRestRep storageSystem = StorageSystemUtils.getStorageSystem(id);
if (storageSystem == null || storageSystem.getRegistrationStatus().equals("UNREGISTERED")) {
// ignore for now
continue;
}
if (!connectedstoragesystems.contains(id)) {
disConnectedstoragesystems.add(storageSystem.getName());
}
}
renderJSON(disConnectedstoragesystems);
}
use of com.emc.storageos.model.varray.VirtualArrayRestRep in project coprhd-controller by CoprHD.
the class VirtualArrays method storagePools.
/**
* Displays a page listing all storage pools associated with the given virtual array.
*
* @param id
* the virtual array ID.
*/
public static void storagePools(String id) {
VirtualArrayRestRep virtualArray = getVirtualArray(id);
VirtualArrayStoragePoolsDataTable dataTable = new VirtualArrayStoragePoolsDataTable();
render(virtualArray, dataTable);
}
Aggregations