use of com.emc.storageos.model.systems.StorageSystemRestRep 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.systems.StorageSystemRestRep in project coprhd-controller by CoprHD.
the class VirtualArrays method availableStoragePoolsJson.
/**
* Renders the list of storage pools available for the given virtual array as JSON.
*
* @param id
* the virtual array ID.
*/
public static void availableStoragePoolsJson(String id) {
List<StoragePoolInfo> items = Lists.newArrayList();
CachedResources<StorageSystemRestRep> storageSystems = StorageSystemUtils.createCache();
for (StoragePoolRestRep storagePool : StoragePoolUtils.getStoragePoolsAssignableToVirtualArray(id)) {
items.add(new StoragePoolInfo(storagePool, storageSystems));
}
renderJSON(DataTablesSupport.createJSON(items, params));
}
use of com.emc.storageos.model.systems.StorageSystemRestRep in project coprhd-controller by CoprHD.
the class FileSystems method getStorageSystemJson.
/**
* GEt StorageSystem for given fileSystem
*
* @param fileSystemId
*/
public static void getStorageSystemJson(String fileSystemId) {
ViPRCoreClient client = BourneUtil.getViprClient();
FileShareRestRep fs = client.fileSystems().get(uri(fileSystemId));
StorageSystemRestRep sys = client.storageSystems().get(fs.getStorageSystem());
renderJSON(sys);
}
use of com.emc.storageos.model.systems.StorageSystemRestRep in project coprhd-controller by CoprHD.
the class ApiTest method deviceSetup.
private void deviceSetup() throws InterruptedException {
// Create a isilon device - file
StorageSystemRestRep isilonDevice = createIsilonDevice();
// Update the discovered Isilon storage ports to set the transport zone.
updateAllIsilonPorts(isilonDevice);
// Create a VNXBlock SMISProvider
SMISProviderRestRep provider = createSMISProvider();
// Update the discovered VNX/VMAX storage ports to set the transport zone.
updateAllVnxAndVmaxPorts(provider);
}
use of com.emc.storageos.model.systems.StorageSystemRestRep in project coprhd-controller by CoprHD.
the class SystemsMapper method map.
public static StorageSystemRestRep map(StorageSystem from) {
if (from == null) {
return null;
}
StorageSystemRestRep to = new StorageSystemRestRep();
mapDiscoveredSystemObjectFields(from, to);
to.setSerialNumber(from.getSerialNumber());
to.setMajorVersion(from.getMajorVersion());
to.setMinorVersion(from.getMinorVersion());
to.setIpAddress(from.getIpAddress());
to.setSecondaryIPs(from.getSecondaryIPs());
to.setPortNumber(from.getPortNumber());
to.setSmisProviderIP(from.getSmisProviderIP());
to.setSmisPortNumber(from.getSmisPortNumber());
to.setSmisUseSSL(from.getSmisUseSSL());
to.setSmisUserName(from.getSmisUserName());
to.setExportMasks(new StringMapAdapter().marshal(from.getExportMasks()));
to.setProtocols(from.getProtocols());
to.setReachableStatus(from.getReachableStatus());
to.setFirmwareVersion(from.getFirmwareVersion());
to.setSupportsSoftLimit(from.getSupportSoftLimit());
to.setSupportsNotificationLimit(from.getSupportNotificationLimit());
to.setActiveProvider(toRelatedResource(ResourceTypeEnum.SMIS_PROVIDER, from.getActiveProviderURI()));
if (from.getProviders() != null) {
for (String provider : from.getProviders()) {
to.getProviders().add(toRelatedResource(ResourceTypeEnum.SMIS_PROVIDER, URI.create(provider)));
}
}
to.setUsername(from.getUsername());
to.setModel(from.getModel());
to.setSupportedProvisioningType(from.getSupportedProvisioningType());
to.setSupportedAsynchronousActions(from.getSupportedAsynchronousActions());
to.setMaxResources(from.getMaxResources());
to.setRemotelyConnectedTo(from.getRemotelyConnectedTo());
to.setSupportedReplicationTypes(from.getSupportedReplicationTypes());
to.setAveragePortMetrics(from.getAveragePortMetrics());
to.setArrayAffinityJobStatus(from.getArrayAffinityStatus());
to.setLastArrayAffinityStatusMessage(from.getLastArrayAffinityStatusMessage());
to.setLastArrayAffinityRunTime(from.getLastArrayAffinityRunTime());
to.setNextArrayAffinityRunTime(from.getNextArrayAffinityRunTime());
to.setSuccessArrayAffinityTime(from.getSuccessArrayAffinityTime());
return to;
}
Aggregations