use of com.emc.storageos.model.NamedRelatedResourceRep in project coprhd-controller by CoprHD.
the class BlockApplications method applicationSnapSessionJson.
public static void applicationSnapSessionJson(String id) {
List<ApplicationSnapSessionSets> snapDetails = Lists.newArrayList();
Set<String> sessionSet = AppSupportUtil.getVolumeGroupSnapsetSessionSets(id);
for (String snap : sessionSet) {
List<NamedRelatedResourceRep> snapshots = AppSupportUtil.getVolumeGroupSnapshotSessionsByCopySet(id, snap);
snapDetails.add(new ApplicationSnapSessionSets(snap, snapshots));
}
renderJSON(DataTablesSupport.createJSON(snapDetails, params));
}
use of com.emc.storageos.model.NamedRelatedResourceRep 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 com.emc.storageos.model.NamedRelatedResourceRep in project coprhd-controller by CoprHD.
the class BlockApplications method getAssociatedSnapSessionJSON.
public static void getAssociatedSnapSessionJSON(String sessionLabel) {
String[] sessionSet = sessionLabel.split("~~~");
List<ApplicationSnapshotSession> sessionDetails = Lists.newArrayList();
List<NamedRelatedResourceRep> sessionSetDetails = AppSupportUtil.getVolumeGroupSnapshotSessionsByCopySet(sessionSet[0], sessionSet[1]);
for (NamedRelatedResourceRep snapSession : sessionSetDetails) {
BlockSnapshotSessionRestRep snapshotSession = BourneUtil.getViprClient().blockSnapshotSessions().get(snapSession.getId());
sessionDetails.add(new ApplicationSnapshotSession(snapshotSession));
}
renderJSON(DataTablesSupport.createJSON(sessionDetails, params));
}
use of com.emc.storageos.model.NamedRelatedResourceRep 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));
}
use of com.emc.storageos.model.NamedRelatedResourceRep in project coprhd-controller by CoprHD.
the class BlockApplications method getAssociatedSnapshotsJSON.
public static void getAssociatedSnapshotsJSON(String snapLabel) {
String[] snapSets = snapLabel.split("~~~");
List<ApplicationSnapshots> snapShotDetails = Lists.newArrayList();
List<NamedRelatedResourceRep> snapsetDetails = AppSupportUtil.getVolumeGroupSnapshotsForSet(snapSets[0], snapSets[1]);
for (NamedRelatedResourceRep snapShot : snapsetDetails) {
BlockSnapshotRestRep blockSnapshot = BourneUtil.getViprClient().blockSnapshots().get(snapShot.getId());
snapShotDetails.add(new ApplicationSnapshots(blockSnapshot));
}
renderJSON(DataTablesSupport.createJSON(snapShotDetails, params));
}
Aggregations