use of com.emc.storageos.model.varray.VirtualArrayRestRep in project coprhd-controller by CoprHD.
the class VirtualArrays method getVirtualArray.
/**
* Gets the given virtual array. If the array cannot be found, an error is show and redirects back to the referrer
* or to the list page.
*
* @param id
* the virtual array ID.
* @return the virtual array.
*/
@Util
public static VirtualArrayRestRep getVirtualArray(String id) {
VirtualArrayRestRep virtualArray = VirtualArrayUtils.getVirtualArray(id);
if (virtualArray == null) {
flash.error(MessagesUtils.get(UNKNOWN, id));
backToReferrer();
list();
}
return virtualArray;
}
use of com.emc.storageos.model.varray.VirtualArrayRestRep in project coprhd-controller by CoprHD.
the class VirtualArrays method removeNetworks.
/**
* Removes a number of networks from the given virtual array, and redisplays the networks page.
*
* @param virtualArrayId
* the virtual array ID.
* @param ids
* the IDs of the networks to remove.
*/
@FlashException
public static void removeNetworks(String virtualArrayId, @As(",") String[] ids) {
if ((ids == null) || (ids.length == 0)) {
networks(virtualArrayId);
}
VirtualArrayRestRep virtualArray = getVirtualArray(virtualArrayId);
updateNetworks(uris(ids), removeVirtualArray(virtualArray));
networks(virtualArrayId);
}
use of com.emc.storageos.model.varray.VirtualArrayRestRep in project coprhd-controller by CoprHD.
the class VirtualArrays method addStoragePools.
/**
* Adds a number of storage pools to the given virtual array, and redisplays the storage pools page.
*
* @param virtualArrayId
* the virtual array ID.
* @param ids
* the IDs of the storage pools to add.
*/
@FlashException
public static void addStoragePools(String virtualArrayId, @As(",") String[] ids) {
if ((ids != null) && (ids.length > 0)) {
VirtualArrayRestRep virtualArray = getVirtualArray(virtualArrayId);
updateStoragePools(uris(ids), addVirtualArray(virtualArray));
}
storagePools(virtualArrayId);
}
use of com.emc.storageos.model.varray.VirtualArrayRestRep in project coprhd-controller by CoprHD.
the class VirtualArrays method removeStoragePorts.
/**
* Removes a number of storage ports from the given virtual array, and redisplays the storage ports page.
*
* @param virtualArrayId
* the virtual array ID.
* @param ids
* the IDs of the storage ports to remove.
*/
@FlashException
public static void removeStoragePorts(String virtualArrayId, @As(",") String[] ids) {
if ((ids != null) && (ids.length > 0)) {
VirtualArrayRestRep virtualArray = getVirtualArray(virtualArrayId);
updateStoragePorts(uris(ids), removeVirtualArray(virtualArray));
}
storagePorts(virtualArrayId);
}
use of com.emc.storageos.model.varray.VirtualArrayRestRep in project coprhd-controller by CoprHD.
the class FileSystems method getTargetVArrys.
public static void getTargetVArrys() {
ViPRCoreClient client = BourneUtil.getViprClient();
List<StringOption> targetVarrayOptions = Lists.newArrayList();
List<VirtualArrayRestRep> virtualArrays = client.varrays().getAll();
if (virtualArrays != null && !virtualArrays.isEmpty()) {
for (VirtualArrayRestRep varray : virtualArrays) {
targetVarrayOptions.add(new StringOption(varray.getId().toString(), varray.getName()));
}
}
renderArgs.put("targetVarrayOptions", targetVarrayOptions);
renderJSON(targetVarrayOptions);
}
Aggregations