handle sr rescan
This commit is contained in:
parent
f90c236fa4
commit
a9436f9668
@ -24,3 +24,20 @@ exports.set = ->
|
||||
continue unless param of params
|
||||
|
||||
xapi.call "SR.set_#{field}", SR.ref, params[param]
|
||||
|
||||
exports.scan = ->
|
||||
params = @getParams {
|
||||
id: { type: 'string' }
|
||||
}
|
||||
|
||||
# Current user must be an administrator.
|
||||
@checkPermission 'admin'
|
||||
|
||||
try
|
||||
SR = @getObject params.id
|
||||
catch
|
||||
@throw 'NO_SUCH_OBJECT'
|
||||
|
||||
xapi = @getXAPI SR
|
||||
|
||||
xapi.call "SR.scan", SR.ref
|
||||
|
Loading…
Reference in New Issue
Block a user