use of com.emc.storageos.model.TaskList in project coprhd-controller by CoprHD.
the class CreateSnapshotSessionForApplication method doExecute.
@Override
protected Tasks<TaskResourceRep> doExecute() throws Exception {
VolumeGroupSnapshotSessionCreateParam input = new VolumeGroupSnapshotSessionCreateParam();
input.setName(name);
input.setVolumes(volumes);
input.setPartial(true);
TaskList taskList = getClient().application().createSnapshotSessionOfApplication(applicationId, input);
return new Tasks<TaskResourceRep>(getClient().auth().getClient(), taskList.getTaskList(), TaskResourceRep.class);
}
use of com.emc.storageos.model.TaskList in project coprhd-controller by CoprHD.
the class CreateCloneOfApplication method doExecute.
@Override
protected Tasks<TaskResourceRep> doExecute() throws Exception {
VolumeGroupFullCopyCreateParam input = new VolumeGroupFullCopyCreateParam();
input.setName(name);
input.setCreateInactive(false);
input.setPartial(true);
input.setVolumes(volumeIds);
TaskList taskList = getClient().application().createFullCopyOfApplication(applicationId, input);
return new Tasks<TaskResourceRep>(getClient().auth().getClient(), taskList.getTaskList(), TaskResourceRep.class);
}
use of com.emc.storageos.model.TaskList in project coprhd-controller by CoprHD.
the class AddHostsToMobilityGroup method doExecute.
@Override
protected Tasks<TaskResourceRep> doExecute() throws Exception {
VolumeGroupUpdateParam input = new VolumeGroupUpdateParam();
input.setAddHostsList(hostIds);
TaskList taskList = getClient().application().updateApplication(mobilityGroupId, input);
return new Tasks<TaskResourceRep>(getClient().auth().getClient(), taskList.getTaskList(), TaskResourceRep.class);
}
use of com.emc.storageos.model.TaskList in project coprhd-controller by CoprHD.
the class BlockSnapshots method deactivate.
/**
* Begins deactivating a given block snapshot by ID.
* <p>
* API Call: <tt>POST /block/snapshots/{id}/deactivate</tt>
*
* @param id
* the ID of the snapshot to deactivate.
*
* @param type
* {@code FULL} or {@code VIPR_ONLY}
*
* @return a task for monitoring the progress of the operation.
*/
public Tasks<BlockSnapshotRestRep> deactivate(URI id, VolumeDeleteTypeEnum type) {
URI uri = client.uriBuilder(getDeactivateUrl()).queryParam("type", type).build(id);
TaskList tasks = client.postURI(TaskList.class, uri);
return new Tasks<>(client, tasks.getTaskList(), resourceClass);
}
use of com.emc.storageos.model.TaskList in project coprhd-controller by CoprHD.
the class BlockVolumes method deactivateContinuousCopies.
/**
* Begins deactivating a number of continuous copies for the given block volume.
* <p>
* API Call: <tt>POST /block/volumes/{id}/protection/continuous-copies/deactivate</tt>
*
* @param id
* the ID of the block volume.
* @param input
* the copy configurations.
* @param type
* {@code FULL} or {@code VIPR_ONLY}
*
* @return tasks for monitoring the progress of the operation.
*/
public Tasks<VolumeRestRep> deactivateContinuousCopies(URI id, CopiesParam input, VolumeDeleteTypeEnum type) {
URI uri = client.uriBuilder(getContinuousCopiesUrl() + "/deactivate").queryParam("type", type).build(id);
TaskList tasks = client.postURI(TaskList.class, input, uri);
return new Tasks<>(client, tasks.getTaskList(), resourceClass);
}
Aggregations