use of com.emc.storageos.model.systems.StorageSystemRestRep in project coprhd-controller by CoprHD.
the class DiscoverUnmanagedFilesystemsService method execute.
@Override
public void execute() throws Exception {
List<URI> uris = uris(storageSystems);
List<StorageSystemRestRep> systemRestReps = execute(new GetStorageSystems(uris));
for (StorageSystemRestRep storageSystem : systemRestReps) {
logInfo("discover.unmanaged.filesystem.service.discovering", storageSystem.getName());
execute(new DiscoverUnmanagedFilesystems(storageSystem.getId().toString()));
int postCount = countUnmanagedFileSystems(storageSystem.getId().toString());
logInfo("discover.unmanaged.filesystem.service.discovered", postCount, storageSystem.getName());
}
}
use of com.emc.storageos.model.systems.StorageSystemRestRep in project coprhd-controller by CoprHD.
the class DataProtectionSystems method itemDetails.
public static void itemDetails(String id) {
ProtectionSystemRestRep protectionSystem = ProtectionSystemUtils.getProtectionSystem(id);
if (protectionSystem == null) {
error(MessagesUtils.get(UNKNOWN, id));
}
ProtectionSystemConnectivityRestRep connectivity = ProtectionSystemUtils.getConnectivity(protectionSystem);
Map<URI, StorageSystemRestRep> storageSystemMap = ProtectionSystemUtils.getStorageSystemMap(connectivity);
render(protectionSystem, connectivity, storageSystemMap);
}
use of com.emc.storageos.model.systems.StorageSystemRestRep in project coprhd-controller by CoprHD.
the class ApiTest method createIsilonDevice.
/**
* create a Isilon device.
*
* @return
* @throws InterruptedException
*/
private StorageSystemRestRep createIsilonDevice() throws InterruptedException {
StorageSystemRequestParam param = new StorageSystemRequestParam();
param.setSystemType("isilon");
param.setIpAddress(EnvConfig.get("sanity", "isilon.ip"));
param.setPortNumber(8080);
param.setUserName("root");
param.setPassword("a");
param.setSerialNumber("6805ca00ad441c3ca650a5087c0bd1674ce2");
TaskResourceRep task = rZAdmin.path("/vdc/storage-systems").post(TaskResourceRep.class, param);
String opId = task.getOpId();
Assert.assertNotNull(opId);
NamedRelatedResourceRep deviceLink = task.getResource();
Assert.assertNotNull(deviceLink);
// wait upto ~3 minute for SMIS provider scan
int checkCount = 18;
String status;
do {
Thread.sleep(10000);
TaskResourceRep taskResp = rZAdmin.path(String.format("/vdc/storage-systems/%s/tasks/%s", deviceLink.getId(), opId)).get(TaskResourceRep.class);
status = taskResp.getState();
} while (status.equals("pending") && checkCount-- > 0);
if (!status.equals("ready")) {
Assert.assertTrue("Failed to create isilon device: time out", false);
}
StorageSystemRestRep dev1 = rZAdmin.path(String.format("/vdc/storage-systems/%s", deviceLink.getId())).get(StorageSystemRestRep.class);
Assert.assertNotNull(dev1);
_log.info("Discover for device is complete : " + deviceLink.getId());
return dev1;
}
use of com.emc.storageos.model.systems.StorageSystemRestRep in project coprhd-controller by CoprHD.
the class ApiTest method updateAllVnxAndVmaxPorts.
/**
* Update the discovered VNX/VMAX storage ports to set the transport zone.
*
* @param provider : Provider.
*/
private void updateAllVnxAndVmaxPorts(SMISProviderRestRep provider) {
StorageSystemList systemList = rZAdmin.path("/vdc/storage-systems").get(StorageSystemList.class);
for (RelatedResourceRep resRep : systemList.getStorageSystems()) {
StorageSystemRestRep system = rZAdmin.path(String.format("/vdc/storage-systems/%s", resRep.getId()).toString()).get(StorageSystemRestRep.class);
if (system.getSystemType().equals(Type.vnxblock.toString()) || system.getSystemType().equals(Type.vmax.toString())) {
// Register all the discovered storage ports .
StoragePortList vnxBlockPortList = rZAdmin.path(String.format("/vdc/storage-systems/%s/storage-ports", system.getId()).toString()).get(StoragePortList.class);
List<NamedRelatedResourceRep> vnxBlockPortURIList = vnxBlockPortList.getPorts();
for (RelatedResourceRep portURI : vnxBlockPortURIList) {
updateStoragePortTZ(resRep.getId(), portURI);
}
}
}
}
Aggregations