use of com.emc.storageos.model.application.VolumeGroupFullCopyDetachParam in project coprhd-controller by CoprHD.
the class DetachApplicationFullCopy method doExecute.
@Override
protected Tasks<TaskResourceRep> doExecute() throws Exception {
VolumeGroupFullCopyDetachParam input = new VolumeGroupFullCopyDetachParam(true, volumeIds);
TaskList taskList = getClient().application().detachApplicationFullCopy(applicationId, input);
return new Tasks<TaskResourceRep>(getClient().auth().getClient(), taskList.getTaskList(), TaskResourceRep.class);
}
use of com.emc.storageos.model.application.VolumeGroupFullCopyDetachParam in project coprhd-controller by CoprHD.
the class RemoveApplicationFullCopy method doExecute.
@Override
protected Tasks<TaskResourceRep> doExecute() throws Exception {
NamedVolumesList allFullCopies = getClient().application().getFullCopiesByApplication(applicationId);
Set<URI> fullCopyIds = new HashSet<URI>();
for (NamedRelatedResourceRep fullCopy : allFullCopies.getVolumes()) {
fullCopyIds.add(fullCopy.getId());
}
List<URI> volList = Collections.singletonList(volumeId);
VolumeGroupFullCopyDetachParam input = new VolumeGroupFullCopyDetachParam(true, volList);
TaskList taskList = getClient().application().detachApplicationFullCopy(applicationId, input);
BlockStorageUtils.removeBlockResources(fullCopyIds, VolumeDeleteTypeEnum.FULL);
return new Tasks<TaskResourceRep>(getClient().auth().getClient(), taskList.getTaskList(), TaskResourceRep.class);
}
Aggregations