boolean createFlexibleVolume(String containingAggrName,boolean isSnapLock,String remoteLocation,String size,String snaplockType,String spaceReserve){
  NaElement elem=new NaElement("volume-create");
  elem.addNewChild("volume",name);
  if (isSnapLock) {
    elem.addNewChild("is-snaplock",Boolean.toString(isSnapLock));
  }
  if (containingAggrName != null && !containingAggrName.isEmpty()) {
    elem.addNewChild("containing-aggr-name",containingAggrName);
  }
  if (remoteLocation != null && !remoteLocation.isEmpty()) {
    elem.addNewChild("remote-location",remoteLocation);
  }
  if (size != null && !size.isEmpty()) {
    elem.addNewChild("size",size);
  }
  if (snaplockType != null && !snaplockType.isEmpty()) {
    elem.addNewChild("snaplock-type",snaplockType);
  }
  if (spaceReserve != null && !spaceReserve.isEmpty()) {
    elem.addNewChild("space-reserve",spaceReserve);
  }
  try {
    server.invokeElem(elem);
  }
 catch (  Exception e) {
    String msg="Failed to create new volume: " + name;
    log.error(msg,e);
    throw new NetAppException(msg,e);
  }
  return true;
}

boolean createFlexibleVolume ( String containingAggrName , boolean isSnapLock , String remoteLocation , String size , String snaplockType , String spaceReserve ) { NaElement elem = new NaElement ( "volume-create" ) ; elem . addNewChild ( "volume" , name ) ; if ( isSnapLock ) { elem . addNewChild ( "is-snaplock" , Boolean . toString ( isSnapLock ) ) ; } if ( containingAggrName != null && ! containingAggrName . isEmpty ( ) ) { elem . addNewChild ( "containing-aggr-name" , containingAggrName ) ; } if ( remoteLocation != null && ! remoteLocation . isEmpty ( ) ) { elem . addNewChild ( "remote-location" , remoteLocation ) ; } if ( size != null && ! size . isEmpty ( ) ) { elem . addNewChild ( "size" , size ) ; } if ( snaplockType != null && ! snaplockType . isEmpty ( ) ) { elem . addNewChild ( "snaplock-type" , snaplockType ) ; } if ( spaceReserve != null && ! spaceReserve . isEmpty ( ) ) { elem . addNewChild ( "space-reserve" , spaceReserve ) ; } try { server . invokeElem ( elem ) ; } catch ( Exception e ) { String msg = "Failed to create new volume: " + name ; log . error ( msg , e ) ; throw new NetAppException ( msg , e ) ; } return true ; }
creates a new flexible volume . only parameters for flexible volumes are provided . note the volume may not be operational immediately after this method returns . use getvolumeinfo ( ) to query the status of the new volume .
