use of com.emc.storageos.model.block.export.ExportGroupRestRep in project coprhd-controller by CoprHD.
the class GetMobilityGroupVolumesByHost method getHostExportedVolumes.
private Set<URI> getHostExportedVolumes() {
Set<URI> volumes = Sets.newHashSet();
for (NamedRelatedResourceRep host : hosts) {
List<ExportGroupRestRep> exports = getClient().blockExports().findContainingHost(host.getId());
volumes.addAll(BlockProviderUtils.getExportedResourceIds(exports, ResourceType.VOLUME));
}
return volumes;
}
use of com.emc.storageos.model.block.export.ExportGroupRestRep in project coprhd-controller by CoprHD.
the class ViPRClientApp method createExport.
public URI createExport(URI volumeId, HostRestRep host, VirtualArrayRestRep virtualArray, ProjectRestRep project) {
ExportCreateParam input = new ExportCreateParam();
input.setName("SDSClientApp_Export");
input.setType("Host");
input.addHost(host.getId());
input.setVarray(virtualArray.getId());
input.addVolume(volumeId);
input.setProject(project.getId());
ExportGroupRestRep export = client.blockExports().create(input).get();
System.out.println("Created Export Group: " + export.getId());
return export.getId();
}
use of com.emc.storageos.model.block.export.ExportGroupRestRep in project coprhd-controller by CoprHD.
the class BlockStorageUtils method removeBlockResourcesFromExport.
public static void removeBlockResourcesFromExport(Collection<URI> resourceId, URI exportId) {
Task<ExportGroupRestRep> task = execute(new RemoveBlockResourcesFromExport(exportId, resourceId));
addAffectedResource(task);
removeExportIfEmpty(exportId);
}
use of com.emc.storageos.model.block.export.ExportGroupRestRep in project coprhd-controller by CoprHD.
the class BlockStorageUtils method adjustExportPaths.
public static URI adjustExportPaths(URI vArray, Integer minPaths, Integer maxPaths, Integer pathsPerInitiator, URI storageSystemId, URI id, List<InitiatorPathParam> addedPaths, List<InitiatorPathParam> removedPaths, boolean suspendWait) {
Task<ExportGroupRestRep> task = execute(new AdjustExportPaths(vArray, minPaths, maxPaths, pathsPerInitiator, storageSystemId, id, addedPaths, removedPaths, suspendWait));
URI exportId = task.getResourceId();
addAffectedResource(exportId);
return exportId;
}
use of com.emc.storageos.model.block.export.ExportGroupRestRep in project coprhd-controller by CoprHD.
the class BlockStorageUtils method addHostToExport.
public static void addHostToExport(URI exportId, URI host, Integer minPaths, Integer maxPaths, Integer pathsPerInitiator, URI portGroup) {
Task<ExportGroupRestRep> task = execute(new AddHostToExport(exportId, host, minPaths, maxPaths, pathsPerInitiator, portGroup));
addRollback(new DeactivateBlockExport(exportId));
addAffectedResource(task);
}
Aggregations