Various updates.
This commit is contained in:
parent
60c46d529c
commit
00027434ad
@ -334,7 +334,7 @@ module.exports = ->
|
||||
if $isVMRunning.call this
|
||||
@genval.resident_on
|
||||
else
|
||||
# TODO: Handle local VMs.
|
||||
# TODO: Handle local VMs. (`get_possible_hosts()`).
|
||||
@genval.$poolRef
|
||||
|
||||
snapshots: -> @genval.snapshots
|
||||
@ -490,7 +490,19 @@ module.exports = ->
|
||||
@val = {
|
||||
attached: -> @genval.currently_attached
|
||||
|
||||
VDI: -> @genval.VDI
|
||||
bootable: -> @genval.bootable
|
||||
|
||||
read_only: -> @genval.mode is 'RO'
|
||||
|
||||
# null if empty.
|
||||
#
|
||||
# TODO: Is it really equivalent?
|
||||
VDI: ->
|
||||
VDI = @genval.VDI
|
||||
if VDI is 'OpaqueRef:NULL'
|
||||
null
|
||||
else
|
||||
VDI
|
||||
|
||||
VM: -> @genval.VM
|
||||
}
|
||||
|
@ -307,6 +307,8 @@ describe 'spec', ->
|
||||
|
||||
$expect(vm.template_info).to.be.an 'object'
|
||||
|
||||
$expect(vm.template_info.arch).to.equal 'amd64'
|
||||
|
||||
$expect(vm.template_info.disks).to.deep.equal [
|
||||
{
|
||||
device: '0'
|
||||
@ -455,6 +457,10 @@ describe 'spec', ->
|
||||
|
||||
$expect(vbd.attached).to.be.true
|
||||
|
||||
$expect(vbd.bootable).to.be.false
|
||||
|
||||
$expect(vbd.read_only).to.be.false
|
||||
|
||||
$expect(vbd.VDI).to.equal 'OpaqueRef:1f7f9828-f4e7-41dd-20e6-3bf57c559a78'
|
||||
|
||||
$expect(vbd.VM).to.equal 'OpaqueRef:be2390b2-cd08-53f5-3fae-b76f6f3725bf'
|
||||
|
Loading…
Reference in New Issue
Block a user