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