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;
}
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);
}
Aggregations