use of models.datatable.BlockVolumesDataTable.Volume in project coprhd-controller by CoprHD.
the class BlockConsistencyGroups method consistencyGroupDetails.
public static void consistencyGroupDetails(String consistencyGroupId) {
ViPRCoreClient client = BourneUtil.getViprClient();
AffectedResources.BlockConsistencyGroupDetails blockConsistencyGroup = new AffectedResources.BlockConsistencyGroupDetails(uri(consistencyGroupId));
if (blockConsistencyGroup.blockConsistencyGroup == null) {
flash.error(MessagesUtils.get(UNKNOWN, consistencyGroupId));
ConsistencyGroups.list();
}
Tasks<BlockConsistencyGroupRestRep> tasksResponse = client.blockConsistencyGroups().getTasks(blockConsistencyGroup.blockConsistencyGroup.getId());
List<Task<BlockConsistencyGroupRestRep>> tasks = tasksResponse.getTasks();
renderArgs.put("tasks", tasks);
List<VolumeRestRep> volumes = blockConsistencyGroup.volumes;
Map<URI, String> virtualArrays = ResourceUtils.mapNames(client.varrays().list());
Map<URI, String> virtualPools = ResourceUtils.mapNames(client.blockVpools().list());
List<Volume> volumeDetails = Lists.newArrayList();
for (VolumeRestRep volume : volumes) {
volumeDetails.add(new Volume(volume, virtualArrays, virtualPools));
}
render(blockConsistencyGroup, volumeDetails);
}
Aggregations