use of com.emc.vipr.client.Tasks in project coprhd-controller by CoprHD.
the class BlockVolumes method deactivate.
/**
* Begins deactivating multiple block volumes by their IDs.
* <p>
* API Call: <tt>POST /block/volumes/deactivate?type={deletionType}</tt>
*
* @param ids
* The IDs of the block volumes to deactivate.
* @param deletionType
* {@code FULL} or {@code VIPR_ONLY}
* @return tasks for monitoring the progress of the operations.
*
* @see com.emc.storageos.model.block.VolumeDeleteTypeEnum
*/
public Tasks<VolumeRestRep> deactivate(List<URI> ids, VolumeDeleteTypeEnum deletionType) {
URI uri = client.uriBuilder(baseUrl + "/deactivate").queryParam("type", deletionType).build();
TaskList tasks = client.postURI(TaskList.class, new BulkDeleteParam(ids), uri);
return new Tasks<>(client, tasks.getTaskList(), resourceClass);
}
use of com.emc.vipr.client.Tasks in project coprhd-controller by CoprHD.
the class AddVolumesToApplication method doExecute.
@Override
protected Tasks<TaskResourceRep> doExecute() throws Exception {
VolumeGroupUpdateParam input = new VolumeGroupUpdateParam();
VolumeGroupVolumeList addVolumesList = new VolumeGroupVolumeList();
addVolumesList.setVolumes(volumeIds);
if (replicationGroup != null && !replicationGroup.isEmpty()) {
addVolumesList.setReplicationGroupName(replicationGroup);
}
input.setAddVolumesList(addVolumesList);
TaskList taskList = getClient().application().updateApplication(applicationId, input);
return new Tasks<TaskResourceRep>(getClient().auth().getClient(), taskList.getTaskList(), TaskResourceRep.class);
}
use of com.emc.vipr.client.Tasks in project coprhd-controller by CoprHD.
the class CreateSnapshotForApplication method doExecute.
@Override
protected Tasks<TaskResourceRep> doExecute() throws Exception {
VolumeGroupSnapshotCreateParam input = new VolumeGroupSnapshotCreateParam();
input.setName(name);
input.setVolumes(volumes);
input.setPartial(true);
input.setReadOnly(readOnly);
TaskList taskList = getClient().application().createSnapshotOfApplication(applicationId, input);
return new Tasks<TaskResourceRep>(getClient().auth().getClient(), taskList.getTaskList(), TaskResourceRep.class);
}
use of com.emc.vipr.client.Tasks in project coprhd-controller by CoprHD.
the class CreateVplexVolumeFromAppSnapshot method doExecute.
@Override
protected Tasks<TaskResourceRep> doExecute() throws Exception {
VolumeGroupSnapshotOperationParam input = new VolumeGroupSnapshotOperationParam();
input.setCopySetName(copySetName);
input.setSubGroups(new ArrayList<String>(subGroups));
TaskList taskList = getClient().application().exposeApplicationSnapshot(applicationId, input);
return new Tasks<TaskResourceRep>(getClient().auth().getClient(), taskList.getTaskList(), TaskResourceRep.class);
}
use of com.emc.vipr.client.Tasks in project coprhd-controller by CoprHD.
the class DeleteSnapshotSessionForApplication method doExecute.
@Override
protected Tasks<TaskResourceRep> doExecute() throws Exception {
VolumeGroupSnapshotSessionDeactivateParam input = new VolumeGroupSnapshotSessionDeactivateParam();
input.setPartial(true);
input.setSnapshotSessions(snapshotSessions);
TaskList taskList = getClient().application().deactivateApplicationSnapshotSession(applicationId, input);
return new Tasks<TaskResourceRep>(getClient().auth().getClient(), taskList.getTaskList(), TaskResourceRep.class);
}
Aggregations