Pool basic edition.

This commit is contained in:
Julien Fontanet
2014-01-30 20:24:21 +01:00
parent cdb31a18f5
commit 158d0ea65e
3 changed files with 26 additions and 6 deletions

View File

@@ -27,6 +27,3 @@ exports.set = ->
continue unless param of params
xapi.call "host.set_#{field}", host.ref, params[param]

26
src/api/pool.coffee Normal file
View File

@@ -0,0 +1,26 @@
exports.set = ->
params = @getParams {
id: { type: 'string' }
name_label: { type: 'string', optional: true }
name_description: { type: 'string', optional: true }
}
# Current user must be an administrator.
@checkPermission 'admin'
try
pool = @getObject params.id
catch
@throw 'NO_SUCH_OBJECT'
xapi = @getXAPI pool
for param, field of {
'name_label'
'name_description'
}
continue unless param of params
xapi.call "pool.set_#{field}", pool.ref, params[param]

View File

@@ -24,6 +24,3 @@ exports.set = ->
continue unless param of params
xapi.call "SR.set_#{field}", SR.ref, params[param]