use of com.emc.storageos.model.block.BlockConsistencyGroupUpdate in project coprhd-controller by CoprHD.
the class BlockConsistencyGroups method removeVolume.
@FlashException(referrer = { "consistencyGroupDetails" })
public static void removeVolume(String consistencyGroupId, String volumeId) {
ViPRCoreClient client = BourneUtil.getViprClient();
List<URI> uris = new ArrayList<URI>();
uris.add(uri(volumeId));
BlockConsistencyGroupUpdate blockConsistencyGroupUpdate = new BlockConsistencyGroupUpdate();
BlockConsistencyGroupVolumeList volumeList = new BlockConsistencyGroupVolumeList();
volumeList.setVolumes(uris);
blockConsistencyGroupUpdate.setRemoveVolumesList(volumeList);
Task<BlockConsistencyGroupRestRep> task = client.blockConsistencyGroups().update(uri(consistencyGroupId), blockConsistencyGroupUpdate);
flash.put("info", MessagesUtils.get("resources.consistencygroup.volume.removed", task.getOpId()));
consistencyGroupDetails(consistencyGroupId);
}
use of com.emc.storageos.model.block.BlockConsistencyGroupUpdate in project coprhd-controller by CoprHD.
the class AddVolumesToConsistencyGroup method doExecute.
@Override
protected Task<BlockConsistencyGroupRestRep> doExecute() throws Exception {
BlockConsistencyGroupUpdate blockConsistencyGroupUpdate = new BlockConsistencyGroupUpdate();
BlockConsistencyGroupVolumeList volumeList = new BlockConsistencyGroupVolumeList();
volumeList.setVolumes(volumeIds);
blockConsistencyGroupUpdate.setAddVolumesList(volumeList);
return getClient().blockConsistencyGroups().update(consistencyGroupId, blockConsistencyGroupUpdate);
}
Aggregations