use of com.emc.storageos.model.TaskList in project coprhd-controller by CoprHD.
the class RestoreApplicationFullCopy method doExecute.
@Override
protected Tasks<TaskResourceRep> doExecute() throws Exception {
List<URI> volumeIds = new ArrayList<URI>();
List<VolumeRestRep> allCopyVols = getClient().blockVolumes().getByRefs(getClient().application().getFullCopiesByApplication(applicationId).getVolumes());
List<VolumeRestRep> volsForCopy = filterByCopyName(allCopyVols);
if (volsForCopy != null && !volsForCopy.isEmpty()) {
for (String subGroup : applicationSubGroup) {
URI volInSubGroup = findVolumeInSubGroup(volsForCopy, subGroup);
if (volInSubGroup != null) {
volumeIds.add(volInSubGroup);
}
}
}
if (volumeIds.isEmpty()) {
ExecutionUtils.fail("failTask.RestoreApplicationFullCopyService.volumeId.precheck", new Object[] {});
}
VolumeGroupFullCopyRestoreParam input = new VolumeGroupFullCopyRestoreParam(true, volumeIds);
TaskList taskList = getClient().application().restoreApplicationFullCopy(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 ResynchronizeSnapshotForApplication method doExecute.
@Override
protected Tasks<TaskResourceRep> doExecute() throws Exception {
VolumeGroupSnapshotOperationParam input = new VolumeGroupSnapshotOperationParam();
input.setSnapshots(snapshots);
input.setPartial(true);
TaskList taskList = getClient().application().resynchronizeApplicationSnapshot(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 RemoveVolumesFromApplication method doExecute.
@Override
protected Tasks<TaskResourceRep> doExecute() throws Exception {
VolumeGroupUpdateParam input = new VolumeGroupUpdateParam();
VolumeGroupVolumeList removeVolumesList = new VolumeGroupVolumeList();
removeVolumesList.setVolumes(volumeIds);
input.setRemoveVolumesList(removeVolumesList);
TaskList taskList = getClient().application().updateApplication(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 ResynchronizeApplicationFullCopy method doExecute.
@Override
protected Tasks<TaskResourceRep> doExecute() throws Exception {
VolumeGroupFullCopyResynchronizeParam input = new VolumeGroupFullCopyResynchronizeParam(true, volumeIds);
TaskList taskList = getClient().application().resynchronizeApplicationFullCopy(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 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);
}
Aggregations