Search in sources :

Example 11 with ExportPathParameters

use of com.emc.storageos.model.block.export.ExportPathParameters in project coprhd-controller by CoprHD.

the class CreateExportNoWait method executeTask.

@Override
public Task<ExportGroupRestRep> executeTask() throws Exception {
    ExportCreateParam export = new ExportCreateParam();
    export.setName(name);
    export.setVarray(varrayId);
    export.setProject(projectId);
    Integer currentHlu = hlu;
    for (URI volumeId : volumeIds) {
        VolumeParam volume = new VolumeParam(volumeId);
        if (currentHlu != null) {
            volume.setLun(currentHlu);
        }
        if ((currentHlu != null) && (currentHlu > -1)) {
            currentHlu++;
        }
        export.getVolumes().add(volume);
    }
    if (clusterId != null) {
        export.addCluster(clusterId);
        export.setType("Cluster");
    } else {
        export.addHost(hostId);
        export.setType("Host");
    }
    if (!NullColumnValueGetter.isNullURI(portGroup)) {
        ExportPathParameters exportPathParameters = new ExportPathParameters();
        exportPathParameters.setPortGroup(portGroup);
        export.setExportPathParameters(exportPathParameters);
    }
    Task<ExportGroupRestRep> task = getClient().blockExports().create(export);
    addOrderIdTag(task.getTaskResource().getId());
    return task;
}
Also used : ExportCreateParam(com.emc.storageos.model.block.export.ExportCreateParam) ExportGroupRestRep(com.emc.storageos.model.block.export.ExportGroupRestRep) VolumeParam(com.emc.storageos.model.block.export.VolumeParam) URI(java.net.URI) ExportPathParameters(com.emc.storageos.model.block.export.ExportPathParameters)

Example 12 with ExportPathParameters

use of com.emc.storageos.model.block.export.ExportPathParameters in project coprhd-controller by CoprHD.

the class ExportPathsPreview method executeTask.

@Override
public ExportPathsAdjustmentPreviewRestRep executeTask() throws Exception {
    ExportPathsAdjustmentPreviewParam param = new ExportPathsAdjustmentPreviewParam();
    ExportPathParameters exportPathParameters = new ExportPathParameters();
    exportPathParameters.setMinPaths(minPaths);
    exportPathParameters.setMaxPaths(maxPaths);
    exportPathParameters.setPathsPerInitiator(pathsPerInitiator);
    if (ports != null) {
        exportPathParameters.setStoragePorts(ports);
    }
    param.setStorageSystem(storageSystemId);
    param.setVirtualArray(virtualArray);
    param.setExportPathParameters(exportPathParameters);
    return getClient().blockExports().getExportPathAdjustmentPreview(exportId, param);
}
Also used : ExportPathsAdjustmentPreviewParam(com.emc.storageos.model.block.export.ExportPathsAdjustmentPreviewParam) ExportPathParameters(com.emc.storageos.model.block.export.ExportPathParameters)

Aggregations

ExportPathParameters (com.emc.storageos.model.block.export.ExportPathParameters)12 VolumeParam (com.emc.storageos.model.block.export.VolumeParam)6 URI (java.net.URI)6 ArrayList (java.util.ArrayList)5 ExportUpdateParam (com.emc.storageos.model.block.export.ExportUpdateParam)4 NamedURI (com.emc.storageos.db.client.model.NamedURI)3 ExportGroup (com.emc.storageos.db.client.model.ExportGroup)2 Operation (com.emc.storageos.db.client.model.Operation)2 Project (com.emc.storageos.db.client.model.Project)2 TaskResourceRep (com.emc.storageos.model.TaskResourceRep)2 ExportCreateParam (com.emc.storageos.model.block.export.ExportCreateParam)2 ExportPathsAdjustmentPreviewParam (com.emc.storageos.model.block.export.ExportPathsAdjustmentPreviewParam)2 HostsUpdateParam (com.emc.storageos.model.block.export.HostsUpdateParam)2 VolumeUpdateParam (com.emc.storageos.model.block.export.VolumeUpdateParam)2 HashMap (java.util.HashMap)2 Consumes (javax.ws.rs.Consumes)2 Produces (javax.ws.rs.Produces)2 BulkList (com.emc.storageos.api.service.impl.response.BulkList)1 SearchedResRepList (com.emc.storageos.api.service.impl.response.SearchedResRepList)1 URIQueryResultList (com.emc.storageos.db.client.constraint.URIQueryResultList)1