Search in sources :

Example 1 with VolumeApplication

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));
}
Also used : NamedRelatedResourceRep(com.emc.storageos.model.NamedRelatedResourceRep) VolumeRestRep(com.emc.storageos.model.block.VolumeRestRep) VolumeApplication(controllers.resources.BlockApplications.VolumeApplicationDataTable.VolumeApplication) URI(java.net.URI)

Example 2 with VolumeApplication

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));
}
Also used : NamedRelatedResourceRep(com.emc.storageos.model.NamedRelatedResourceRep) VolumeRestRep(com.emc.storageos.model.block.VolumeRestRep) VolumeApplication(controllers.resources.BlockApplications.VolumeApplicationDataTable.VolumeApplication) URI(java.net.URI)

Aggregations

NamedRelatedResourceRep (com.emc.storageos.model.NamedRelatedResourceRep)2 VolumeRestRep (com.emc.storageos.model.block.VolumeRestRep)2 VolumeApplication (controllers.resources.BlockApplications.VolumeApplicationDataTable.VolumeApplication)2 URI (java.net.URI)2