public BiosCommandResult doCreateReplicationPolicy(StorageSystem system,String name,String source_root_path,String target_host,String target_path,IsilonSyncPolicy.Action action,String description,String schedule){
  try {
    _log.info("IsilonFileStorageDevice doCreateReplicationPolicy {} - start",source_root_path);
    IsilonApi isi=getIsilonDevice(system);
    IsilonSyncPolicy policy=new IsilonSyncPolicy(name,source_root_path,target_path,target_host,action);
    if (schedule != null && !schedule.isEmpty()) {
      policy.setSchedule(schedule);
    }
    if (description != null && !description.isEmpty()) {
      policy.setDescription(description);
    }
    policy.setEnabled(false);
    String policyId=isi.createReplicationPolicy(policy);
    _log.info("IsilonFileStorageDevice doCreateReplicationPolicy {} with policyId {} - complete",name,policyId);
    return BiosCommandResult.createSuccessfulResult();
  }
 catch (  IsilonException e) {
    return BiosCommandResult.createErrorResult(e);
  }
}

public BiosCommandResult doCreateReplicationPolicy ( StorageSystem system , String name , String source_root_path , String target_host , String target_path , IsilonSyncPolicy . Action action , String description , String schedule ) { try { _log . info ( "IsilonFileStorageDevice doCreateReplicationPolicy {} - start" , source_root_path ) ; IsilonApi isi = getIsilonDevice ( system ) ; IsilonSyncPolicy policy = new IsilonSyncPolicy ( name , source_root_path , target_path , target_host , action ) ; if ( schedule != null && ! schedule . isEmpty ( ) ) { policy . setSchedule ( schedule ) ; } if ( description != null && ! description . isEmpty ( ) ) { policy . setDescription ( description ) ; } policy . setEnabled ( false ) ; String policyId = isi . createReplicationPolicy ( policy ) ; _log . info ( "IsilonFileStorageDevice doCreateReplicationPolicy {} with policyId {} - complete" , name , policyId ) ; return BiosCommandResult . createSuccessfulResult ( ) ; } catch ( IsilonException e ) { return BiosCommandResult . createErrorResult ( e ) ; } }
call to isilon device to create replication session
