Search in sources :

Example 1 with Volume

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);
}
Also used : Task(com.emc.vipr.client.Task) ViPRCoreClient(com.emc.vipr.client.ViPRCoreClient) BlockConsistencyGroupRestRep(com.emc.storageos.model.block.BlockConsistencyGroupRestRep) URI(java.net.URI) Volume(models.datatable.BlockVolumesDataTable.Volume) VolumeRestRep(com.emc.storageos.model.block.VolumeRestRep)

Aggregations

BlockConsistencyGroupRestRep (com.emc.storageos.model.block.BlockConsistencyGroupRestRep)1 VolumeRestRep (com.emc.storageos.model.block.VolumeRestRep)1 Task (com.emc.vipr.client.Task)1 ViPRCoreClient (com.emc.vipr.client.ViPRCoreClient)1 URI (java.net.URI)1 Volume (models.datatable.BlockVolumesDataTable.Volume)1