vm.create() returns the new VM id.

This commit is contained in:
Julien Fontanet 2015-06-11 17:46:19 +02:00
parent f572cb5f3e
commit a1a7cf59b3
2 changed files with 4 additions and 4 deletions

View File

@ -41,7 +41,7 @@ create = $coroutine ({
vifs: VIFs
})
return vm.id
return vm.$id
create.permission = 'admin'

View File

@ -471,6 +471,9 @@ export default class Xapi extends XapiBase {
await this.call('VM.set_VCPUs_at_startup')
}
// Removes any preexisting entry.
await this.call('VM.remove_from_other_config', vm.$ref, 'disks').catch(noop)
// TODO: remove existing VDIs (to make sure there are only those
// wanted).
//
@ -487,9 +490,6 @@ export default class Xapi extends XapiBase {
}
})
// Removes any preexisting entry.
await this.call('VM.remove_from_other_config', vm.$ref, 'disks').catch(noop)
await this.call('VM.add_to_other_config', vm.$ref, 'disks', vdisXml)
}