public ScReplayProfile createConsistencyGroup(String ssn,String name) throws StorageCenterAPIException {
  LOG.debug("Creating consistency group '{}'",name);
  String errorMessage="";
  Parameters params=new Parameters();
  params.add("Name",name);
  params.add("Notes",NOTES_STRING);
  params.add("Type","Consistent");
  params.add("StorageCenter",ssn);
  try {
    RestResult result=restClient.post("StorageCenter/ScReplayProfile",params.toJson());
    if (checkResults(result)) {
      return gson.fromJson(result.getResult(),ScReplayProfile.class);
    }
    errorMessage=String.format("Unable to create CG %s on SC %s: %s",name,ssn,result.getErrorMsg());
  }
 catch (  Exception e) {
    errorMessage=String.format("Error creating consistency group: %s",e);
    LOG.warn(errorMessage);
  }
  if (errorMessage.length() == 0) {
    errorMessage=String.format("Unable to create CG %s on SC %s",name,ssn);
  }
  throw new StorageCenterAPIException(errorMessage);
}

public ScReplayProfile createConsistencyGroup ( String ssn , String name ) throws StorageCenterAPIException { LOG . debug ( "Creating consistency group '{}'" , name ) ; String errorMessage = "" ; Parameters params = new Parameters ( ) ; params . add ( "Name" , name ) ; params . add ( "Notes" , NOTES_STRING ) ; params . add ( "Type" , "Consistent" ) ; params . add ( "StorageCenter" , ssn ) ; try { RestResult result = restClient . post ( "StorageCenter/ScReplayProfile" , params . toJson ( ) ) ; if ( checkResults ( result ) ) { return gson . fromJson ( result . getResult ( ) , ScReplayProfile . class ) ; } errorMessage = String . format ( "Unable to create CG %s on SC %s: %s" , name , ssn , result . getErrorMsg ( ) ) ; } catch ( Exception e ) { errorMessage = String . format ( "Error creating consistency group: %s" , e ) ; LOG . warn ( errorMessage ) ; } if ( errorMessage . length ( ) == 0 ) { errorMessage = String . format ( "Unable to create CG %s on SC %s" , name , ssn ) ; } throw new StorageCenterAPIException ( errorMessage ) ; }
creates a new consistency group on the storage center .
