     type: 'boolean'
     optional: true
 
-exports.restart = $coroutine ({id}) ->
+set.resolve = {
+  host: ['id', 'host'],
+}
+
+exports.set = set
+
+#---------------------------------------------------------------------
+
+restart = $coroutine ({id}) ->
   @checkPermission 'admin'
 
   try

  $wait xapi.call 'pool.eject', host.ref

  return true
exports.detach.permission = 'admin'
exports.detach.params = {
  id: { type: 'string' }
}

exports.enable = $coroutine ({id}) ->
  try
    host = @getObject id, 'host'
  catch

    $wait xapi.call "host.set_#{field}", host.ref, params[param]

  return true

set.params =
  id: type: 'string'
  name_label:
    type: 'string'
