Fix auto poweron (fix vatesfr/xo-web#879).

This commit is contained in:
Julien Fontanet 2016-04-11 15:24:32 +02:00
parent 71741e144e
commit 32c9ed1dc2
2 changed files with 3 additions and 3 deletions

View File

@ -480,7 +480,7 @@ set = $coroutine (params) ->
if auto_poweron
yield xapi.call 'VM.add_to_other_config', ref, 'auto_poweron', 'true'
yield xapi.setPoolProperties({autoPowerOn: true})
yield xapi.setPoolProperties({autoPoweron: true})
else
yield xapi.call 'VM.remove_from_other_config', ref, 'auto_poweron'

View File

@ -408,8 +408,8 @@ export default class Xapi extends XapiBase {
nameLabel,
nameDescription
}),
this._updateObjectMapProperty(pool, 'other_config', {
autoPoweron
autoPoweron != null && this._updateObjectMapProperty(pool, 'other_config', {
autoPoweron: autoPoweron ? 'on' : null
})
])
}