Merge pull request #276 from vatesfr/fix-auto-poweron

Fix auto poweron (fix vatesfr/xo-web#879).
This commit is contained in:
Julien Fontanet 2016-04-11 15:53:37 +02:00
commit 5f50f1928d
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
})
])
}