public DriverTask createConsistencyGroupSnapshot(VolumeConsistencyGroup volumeConsistencyGroup,List<VolumeSnapshot> snapshots,List<CapabilityInstance> capabilities){
  DellSCDriverTask task=new DellSCDriverTask("createCGSnapshot");
  try {
    StorageCenterAPI api=connectionManager.getConnection(volumeConsistencyGroup.getStorageSystemId());
    ScVolume[] volumes=api.getConsistencyGroupVolumes(volumeConsistencyGroup.getNativeId());
    for (    ScVolume volume : volumes) {
      api.checkAndInitVolume(volume.instanceId);
    }
    ScReplay[] replays=api.createConsistencyGroupSnapshots(volumeConsistencyGroup.getNativeId());
    if (populateCgSnapshotInfo(snapshots,replays)) {
      task.setStatus(TaskStatus.READY);
    }
 else {
      task.setStatus(TaskStatus.PARTIALLY_FAILED);
    }
  }
 catch (  StorageCenterAPIException|DellSCDriverException dex) {
    String error=String.format("Error creating CG snapshots %s: %s",volumeConsistencyGroup.getDisplayName(),dex);
    LOG.error(error);
    task.setFailed(error);
  }
  return task;
}

public DriverTask createConsistencyGroupSnapshot ( VolumeConsistencyGroup volumeConsistencyGroup , List < VolumeSnapshot > snapshots , List < CapabilityInstance > capabilities ) { DellSCDriverTask task = new DellSCDriverTask ( "createCGSnapshot" ) ; try { StorageCenterAPI api = connectionManager . getConnection ( volumeConsistencyGroup . getStorageSystemId ( ) ) ; ScVolume [ ] volumes = api . getConsistencyGroupVolumes ( volumeConsistencyGroup . getNativeId ( ) ) ; for ( ScVolume volume : volumes ) { api . checkAndInitVolume ( volume . instanceId ) ; } ScReplay [ ] replays = api . createConsistencyGroupSnapshots ( volumeConsistencyGroup . getNativeId ( ) ) ; if ( populateCgSnapshotInfo ( snapshots , replays ) ) { task . setStatus ( TaskStatus . READY ) ; } else { task . setStatus ( TaskStatus . PARTIALLY_FAILED ) ; } } catch ( StorageCenterAPIException | DellSCDriverException dex ) { String error = String . format ( "Error creating CG snapshots %s: %s" , volumeConsistencyGroup . getDisplayName ( ) , dex ) ; LOG . error ( error ) ; task . setFailed ( error ) ; } return task ; }
create consistency group snapshots .
