Search in sources :

Example 1 with CreateSnapshotForApplication

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);
}
Also used : CreateSnapshotForApplication(com.emc.sa.service.vipr.application.tasks.CreateSnapshotForApplication) NamedVolumesList(com.emc.storageos.model.block.NamedVolumesList) URI(java.net.URI)

Aggregations

CreateSnapshotForApplication (com.emc.sa.service.vipr.application.tasks.CreateSnapshotForApplication)1 NamedVolumesList (com.emc.storageos.model.block.NamedVolumesList)1 URI (java.net.URI)1