   vdi: { type: 'string' }
   vm: { type: 'string' }
 }
+
+attachDisk.resolve = {
+  vm: ['vm', 'VM'],
+  vdi: ['vdi', 'VDI'],
+}
+
+exports.attachDisk = attachDisk
+
+#---------------------------------------------------------------------
 
 # FIXME: position should be optional and default to last.
 #

  return {
    $getFrom: url
  }
exports.export.permission = 'admin'
exports.export.params = {
  vm: { type: 'string' }
  compress: { type: 'boolean', optional: true }
}

# FIXME
# TODO: "sr_id" can be passed in URL to target a specific SR
exports.import = $coroutine ({host}) ->

  {sessionId} = @getXAPI(host)


  memory: { type: 'integer', optional: true }
}

set.resolve = {
  VM: ['id', 'VM'],
}

exports.set = set

#---------------------------------------------------------------------

restart = $coroutine ({vm, force}) ->
  xapi = @getXAPI(vm)

  try
