Search in sources :

Example 1 with ExportPathsAdjustmentPreviewParam

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

the class BlockProvider method generateExportPathPreview.

private ExportPathsAdjustmentPreviewRestRep generateExportPathPreview(AssetOptionsContext ctx, URI hostOrClusterId, URI vArrayId, URI exportId, Integer minPaths, Integer maxPaths, Integer pathsPerInitiator, String useExisting, URI storageSystemId, List<URI> ports) {
    ViPRCoreClient client = api(ctx);
    ExportPathsAdjustmentPreviewParam param = new ExportPathsAdjustmentPreviewParam();
    ExportPathParameters exportPathParameters = new ExportPathParameters();
    exportPathParameters.setMinPaths(minPaths);
    exportPathParameters.setMaxPaths(maxPaths);
    exportPathParameters.setPathsPerInitiator(pathsPerInitiator);
    exportPathParameters.setStoragePorts(ports);
    param.setUseExistingPaths(useExisting.equalsIgnoreCase(YES_VALUE) ? true : false);
    param.setVirtualArray(vArrayId);
    param.setStorageSystem(storageSystemId);
    param.setExportPathParameters(exportPathParameters);
    return client.blockExports().getExportPathAdjustmentPreview(exportId, param);
}
Also used : ViPRCoreClient(com.emc.vipr.client.ViPRCoreClient) ExportPathsAdjustmentPreviewParam(com.emc.storageos.model.block.export.ExportPathsAdjustmentPreviewParam) ExportPathParameters(com.emc.storageos.model.block.export.ExportPathParameters)

Example 2 with ExportPathsAdjustmentPreviewParam

use of com.emc.storageos.model.block.export.ExportPathsAdjustmentPreviewParam 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)2 ExportPathsAdjustmentPreviewParam (com.emc.storageos.model.block.export.ExportPathsAdjustmentPreviewParam)2 ViPRCoreClient (com.emc.vipr.client.ViPRCoreClient)1