use of com.emc.sa.service.vipr.application.tasks.CreateSnapshotForApplication in project coprhd-controller by CoprHD.
the class CreateSnapshotOfApplicationService method execute.
@Override
public void execute() throws Exception {
NamedVolumesList volumesToUse = BlockStorageUtils.getVolumesBySite(getClient(), virtualArrayParameter, applicationId);
List<URI> volumeIds = BlockStorageUtils.getSingleVolumePerSubGroupAndStorageSystem(volumesToUse, subGroups);
checkAndPurgeObsoleteSnapshots(applicationId);
String snapshotName = TimeUtils.formatDateForCurrent(name);
Tasks<? extends DataObjectRestRep> tasks = execute(new CreateSnapshotForApplication(applicationId, volumeIds, snapshotName, readOnly));
addAffectedResources(tasks);
addRetainedReplicas(applicationId, snapshotName);
}
Aggregations