use of com.emc.storageos.model.varray.VirtualArrayRestRep in project coprhd-controller by CoprHD.
the class VirtualArrays method edit.
/**
* Displays the page for editing an existing virtual array.
*
* @param id
* the virtual array ID.
*/
public static void edit(String id) {
VirtualArrayRestRep virtualArray = getVirtualArray(id);
VirtualArrayForm form = new VirtualArrayForm();
form.load(virtualArray);
edit(form);
}
use of com.emc.storageos.model.varray.VirtualArrayRestRep in project coprhd-controller by CoprHD.
the class VirtualArrays method addAllFlashVirtualArray.
private static void addAllFlashVirtualArray() {
VirtualArrayForm virtualArray = new VirtualArrayForm();
virtualArray.name = ALL_FLASH_VARRAY;
virtualArray.validate("virtualArray");
if (Validation.hasErrors()) {
flash.error(MessagesUtils.get(SAVED_ERROR, virtualArray.name));
list();
}
VirtualArrayRestRep varray = virtualArray.save();
virtualArray.load(varray);
List<String> ids = Lists.newArrayList();
for (StorageSystemRestRep storageSystem : StorageSystemUtils.getStorageSystems()) {
// Check if storage system is of type UNITY, VMAX or XtremIO
if (StringUtils.equals(XTREMIO, storageSystem.getSystemType())) {
ids.add(storageSystem.getId().toString());
}
if (StringUtils.equals(VMAX, storageSystem.getSystemType()) || StringUtils.equals(UNITY, storageSystem.getSystemType())) {
String modelType = storageSystem.getModel();
if (modelType != null && (modelType.contains(SUFFIX_ALL_FLASH) || modelType.contains(POWERMAX) || modelType.contains(PMAX))) {
ids.add(storageSystem.getId().toString());
}
}
}
addStorageSysVarray(virtualArray.id, ids);
}
use of com.emc.storageos.model.varray.VirtualArrayRestRep in project coprhd-controller by CoprHD.
the class VirtualArrays method addStorageSysVarray.
/**
* Adds all ports of the given storage systems to the virtual array.
*
* @param virtualArrayId
* the virtual array ID.
* @param ids
* the storage system IDs.
*/
private static void addStorageSysVarray(String virtualArrayId, List<String> ids) {
List<URI> storagePorts = Lists.newArrayList();
for (URI storageSystemId : uris(ids)) {
List<StoragePortRestRep> ports = StoragePortUtils.getStoragePortsByStorageSystem(storageSystemId);
storagePorts.addAll(ResourceUtils.ids(ports));
}
VirtualArrayRestRep virtualArray = getVirtualArray(virtualArrayId);
if (!storagePorts.isEmpty()) {
updateStoragePorts(storagePorts, addVirtualArray(virtualArray));
}
updateVarrayCookie(virtualArray.getId().toString(), virtualArray.getName());
list();
}
use of com.emc.storageos.model.varray.VirtualArrayRestRep in project coprhd-controller by CoprHD.
the class VirtualArrays method itemDetails.
/**
* Renders the details of a single virtual array.
*
* @param id
* the virtual array ID.
*/
public static void itemDetails(String id) {
VirtualArrayRestRep virtualArray = VirtualArrayUtils.getVirtualArray(id);
if (virtualArray == null) {
error(MessagesUtils.get(UNKNOWN, id));
}
Map<String, Set<NamedRelatedResourceRep>> connectivityMap = VirtualArrayUtils.getConnectivityMap(id);
// Do not display RP/VPLEX connectivity separately
connectivityMap.remove(ConnectivityTypes.RP_VPLEX);
Map<String, Set<String>> attributes = VirtualArrayUtils.getAvailableAttributes(uris(id));
render(virtualArray, connectivityMap, attributes);
}
use of com.emc.storageos.model.varray.VirtualArrayRestRep in project coprhd-controller by CoprHD.
the class VirtualArrays method addStoragePorts.
/**
* Adds a number of storage ports to 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 add.
*/
@FlashException
public static void addStoragePorts(String virtualArrayId, @As(",") String[] ids) {
if ((ids != null) && (ids.length > 0)) {
VirtualArrayRestRep virtualArray = getVirtualArray(virtualArrayId);
updateStoragePorts(uris(ids), addVirtualArray(virtualArray));
}
storagePorts(virtualArrayId);
}
Aggregations