@RpcMethod public void detachDisks(String vmId,List<String> diskIds,AsyncMethodCallback<Host.AsyncClient.detach_disks_call> handler) throws RpcException {
  ensureClient();
  VmDisksDetachRequest vmDisksDetachRequest=new VmDisksDetachRequest(vmId,diskIds);
  clientProxy.setTimeout(DETACH_DISKS_TIMEOUT_MS);
  logger.info("detach_disks vm {}, disks {}, target {}, request {}",vmId,diskIds,getHostIp(),vmDisksDetachRequest);
  try {
    clientProxy.detach_disks(vmDisksDetachRequest,handler);
  }
 catch (  TException e) {
    throw new RpcException(e.getMessage());
  }
}

@ RpcMethod public void detachDisks ( String vmId , List < String > diskIds , AsyncMethodCallback < Host . AsyncClient . detach_disks_call > handler ) throws RpcException { ensureClient ( ) ; VmDisksDetachRequest vmDisksDetachRequest = new VmDisksDetachRequest ( vmId , diskIds ) ; clientProxy . setTimeout ( DETACH_DISKS_TIMEOUT_MS ) ; logger . info ( "detach_disks vm {}, disks {}, target {}, request {}" , vmId , diskIds , getHostIp ( ) , vmDisksDetachRequest ) ; try { clientProxy . detach_disks ( vmDisksDetachRequest , handler ) ; } catch ( TException e ) { throw new RpcException ( e . getMessage ( ) ) ; } }
this method performs an asynchronous thrift call to detach one or more disks from a vm . on completion , the specified handler is invoked .
