Search in sources :

Example 41 with StorageSystemRestRep

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());
    }
}
Also used : StorageSystemRestRep(com.emc.storageos.model.systems.StorageSystemRestRep) GetStorageSystems(com.emc.sa.service.vipr.tasks.GetStorageSystems) DiscoverUnmanagedFilesystems(com.emc.sa.service.vipr.file.tasks.DiscoverUnmanagedFilesystems) URI(java.net.URI)

Example 42 with StorageSystemRestRep

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);
}
Also used : StorageSystemRestRep(com.emc.storageos.model.systems.StorageSystemRestRep) ProtectionSystemConnectivityRestRep(com.emc.storageos.model.protection.ProtectionSystemConnectivityRestRep) ProtectionSystemRestRep(com.emc.storageos.model.protection.ProtectionSystemRestRep) URI(java.net.URI)

Example 43 with StorageSystemRestRep

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;
}
Also used : StorageSystemRequestParam(com.emc.storageos.model.systems.StorageSystemRequestParam) StorageSystemRestRep(com.emc.storageos.model.systems.StorageSystemRestRep) TaskResourceRep(com.emc.storageos.model.TaskResourceRep) NamedRelatedResourceRep(com.emc.storageos.model.NamedRelatedResourceRep)

Example 44 with StorageSystemRestRep

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);
            }
        }
    }
}
Also used : StorageSystemList(com.emc.storageos.model.systems.StorageSystemList) NamedRelatedResourceRep(com.emc.storageos.model.NamedRelatedResourceRep) RelatedResourceRep(com.emc.storageos.model.RelatedResourceRep) StorageSystemRestRep(com.emc.storageos.model.systems.StorageSystemRestRep) StoragePortList(com.emc.storageos.model.ports.StoragePortList) NamedRelatedResourceRep(com.emc.storageos.model.NamedRelatedResourceRep)

Aggregations

StorageSystemRestRep (com.emc.storageos.model.systems.StorageSystemRestRep)44 URI (java.net.URI)11 ArrayList (java.util.ArrayList)10 StoragePortRestRep (com.emc.storageos.model.ports.StoragePortRestRep)7 HashSet (java.util.HashSet)7 VirtualArrayRestRep (com.emc.storageos.model.varray.VirtualArrayRestRep)6 ViPRCoreClient (com.emc.vipr.client.ViPRCoreClient)6 NamedRelatedResourceRep (com.emc.storageos.model.NamedRelatedResourceRep)5 StoragePoolRestRep (com.emc.storageos.model.pools.StoragePoolRestRep)5 Asset (com.emc.sa.asset.annotation.Asset)4 VolumeRestRep (com.emc.storageos.model.block.VolumeRestRep)4 AssetOption (com.emc.vipr.model.catalog.AssetOption)4 AssetDependencies (com.emc.sa.asset.annotation.AssetDependencies)3 StorageProviderRestRep (com.emc.storageos.model.smis.StorageProviderRestRep)3 JsonArray (com.google.gson.JsonArray)3 JsonObject (com.google.gson.JsonObject)3 HashMap (java.util.HashMap)3 GetStorageSystems (com.emc.sa.service.vipr.tasks.GetStorageSystems)2 RelatedResourceRep (com.emc.storageos.model.RelatedResourceRep)2 FileShareRestRep (com.emc.storageos.model.file.FileShareRestRep)2