Minor fixes.
This commit is contained in:
parent
19e47a2742
commit
e550ea2141
@ -276,6 +276,11 @@ module.exports = ->
|
||||
|
||||
master: -> @genval.master
|
||||
|
||||
networks: $set {
|
||||
rule: 'network'
|
||||
bind: -> @genval.$poolRef
|
||||
}
|
||||
|
||||
templates: $set {
|
||||
rule: 'VM-template'
|
||||
bind: -> @val.$container
|
||||
@ -446,7 +451,7 @@ module.exports = ->
|
||||
if metrics
|
||||
+metrics.VCPUs_number
|
||||
else
|
||||
0
|
||||
+@genval.VCPUs_at_startup
|
||||
}
|
||||
|
||||
$CPU_usage: null #TODO
|
||||
@ -462,7 +467,6 @@ module.exports = ->
|
||||
|
||||
snapshots: -> @genval.snapshots
|
||||
|
||||
# TODO: Replace with a UNIX timestamp.
|
||||
snapshot_time: -> $toTimestamp @genval.snapshot_time
|
||||
|
||||
$VBDs: -> @genval.VBDs
|
||||
@ -477,6 +481,8 @@ module.exports = ->
|
||||
@rule 'VM-template': ->
|
||||
VMdef.call this
|
||||
|
||||
@val.CPUs.number = -> +@genval.VCPUs_at_startup
|
||||
|
||||
@val.template_info = {
|
||||
arch: -> @genval.other_config?['install-arch']
|
||||
disks: ->
|
||||
|
@ -51,7 +51,7 @@ describe 'spec', ->
|
||||
'OpaqueRef:1ef43ee8-bc18-6c4f-4919-0e42a3ac6e4b'
|
||||
]
|
||||
|
||||
$expect(xo.$vCPUs).to.equal 20
|
||||
$expect(xo.$vCPUs).to.equal 10
|
||||
|
||||
$expect(xo.$memory).to.be.an 'object'
|
||||
$expect(xo.$memory.usage).to.equal 15185723392
|
||||
@ -91,6 +91,12 @@ describe 'spec', ->
|
||||
|
||||
$expect(pool.master).to.equal 'OpaqueRef:bbc98f5e-1a17-2030-28af-0df2393f3145'
|
||||
|
||||
$expect(pool.networks).to.have.members [
|
||||
'OpaqueRef:dbc93777-f2c0-e888-967d-dd9beeffb3c0'
|
||||
'OpaqueRef:4e265829-7517-3520-6a97-56b6ac0730c9'
|
||||
'OpaqueRef:16013d48-b9eb-84c0-0e62-d809211b0632'
|
||||
]
|
||||
|
||||
$expect(pool.templates).to.have.members [
|
||||
'OpaqueRef:f81c6db6-4227-55a5-0c2f-b670ca5d8d3f'
|
||||
'OpaqueRef:f449b8ec-ac86-1b6d-2347-37ec36c41bc5'
|
||||
@ -241,7 +247,9 @@ describe 'spec', ->
|
||||
$expect(host.power_state).to.equal 'Running'
|
||||
|
||||
$expect(host.SRs).to.have.members [
|
||||
# TODO
|
||||
'OpaqueRef:31be9b5e-882a-a8ae-0edf-bf8942b49b5a'
|
||||
'OpaqueRef:7c88a8c6-fc48-8836-28fa-212f67c42d2f'
|
||||
'OpaqueRef:ec76bd6a-f2c0-636d-ca72-de8fb42d6eea'
|
||||
]
|
||||
|
||||
$expect(host.templates).to.have.members [
|
||||
@ -325,7 +333,7 @@ describe 'spec', ->
|
||||
'OpaqueRef:46fa4c52-5e93-6cf7-32e3-c51fb4ed106d'
|
||||
]
|
||||
|
||||
$expect(host.$vCPUs).to.equal 4
|
||||
$expect(host.$vCPUs).to.equal 2
|
||||
|
||||
it 'VM', ->
|
||||
vm = collection.get 'OpaqueRef:fdaba312-c3a5-0190-b1a1-bf389567e620'
|
||||
|
Loading…
Reference in New Issue
Block a user