Search in sources :

Example 1 with CreateCloneOfApplication

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

Aggregations

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