           # consistency.
 
       {argsMapper, notification} = options ? {}
-
-      # FIXME: default mapper should be identity.
-      argsMapper ?= (id) -> {id}
+      argsMapper ?= defaultArgsMapper
 
       (args...) ->
         xoApi.call(

        disconnect: action 'Disconnect PBD'

      server:
        add: action 'Add server', 'server.add', argsMapper: (params) -> params
        remove: action 'Remove server', 'server.remove', argsMapper: (id) -> {id}
        getAll: action 'Getting server', 'server.getAll'
        set: action 'Save server', 'server.set', argsMapper: (params) -> params

      task:
        cancel: action 'Cancel task', 'task.cancel', argsMapper: (id) -> {id}

      user:
        create: action 'Create user', 'user.create', argsMapper: (params) -> params
        delete: action 'Delete user', 'user.delete', argsMapper: (id) -> {id}
        getAll: action 'Getting users', 'user.getAll'
        set: action 'Save user', 'user.set', argsMapper: (params) -> params

      vm:
        convert: action 'Convert VM', 'vm.convert', {

    }

  .service 'xo', ($timeout, xoApi, notify) ->
    # FIXME: default mapper should be identity.
    defaultArgsMapper = (id) -> if id? then {id} else {}

    action = (name, method, options) ->
      unless method
        return ->
