use of controllers.resources.BlockApplications.VolumeApplicationDataTable.VolumeApplication in project coprhd-controller by CoprHD.
the class BlockApplications method getAssociatedVolumesJSON.
public static void getAssociatedVolumesJSON(String copyLabel) {
List<VolumeApplication> volumeDetails = Lists.newArrayList();
String[] copySets = copyLabel.split("~~~");
List<NamedRelatedResourceRep> volumeDetailClone = AppSupportUtil.getVolumeGroupFullCopiesForSet(copySets[0], copySets[1]);
Map<URI, String> virtualArrays = ResourceUtils.mapNames(BourneUtil.getViprClient().varrays().list());
Map<URI, String> virtualPools = ResourceUtils.mapNames(BourneUtil.getViprClient().blockVpools().list());
for (NamedRelatedResourceRep volume : volumeDetailClone) {
VolumeRestRep blockVolume = BourneUtil.getViprClient().blockVolumes().get(volume.getId());
volumeDetails.add(new VolumeApplication(blockVolume, virtualArrays, virtualPools));
}
renderJSON(DataTablesSupport.createJSON(volumeDetails, params));
}
use of controllers.resources.BlockApplications.VolumeApplicationDataTable.VolumeApplication in project coprhd-controller by CoprHD.
the class BlockApplications method applicationVolumeJson.
public static void applicationVolumeJson(String id) {
List<VolumeApplication> volumeDetails = Lists.newArrayList();
List<NamedRelatedResourceRep> volumes = AppSupportUtil.getVolumesByApplication(id);
Map<URI, String> virtualArrays = ResourceUtils.mapNames(BourneUtil.getViprClient().varrays().list());
Map<URI, String> virtualPools = ResourceUtils.mapNames(BourneUtil.getViprClient().blockVpools().list());
for (NamedRelatedResourceRep volume : volumes) {
VolumeRestRep blockVolume = BourneUtil.getViprClient().blockVolumes().get((volume.getId()));
volumeDetails.add(new VolumeApplication(blockVolume, virtualArrays, virtualPools));
}
renderJSON(DataTablesSupport.createJSON(volumeDetails, params));
}
Aggregations