Merge pull request #275 from vatesfr/abhamonr-set-vm-cpus-max
api.vm: Set vcpus max.
This commit is contained in:
commit
afaa5d5e9e
@ -455,6 +455,9 @@ set = $coroutine (params) ->
|
||||
yield xapi.call 'VM.set_VCPUs_max', ref, "#{CPUs}"
|
||||
yield xapi.call 'VM.set_VCPUs_at_startup', ref, "#{CPUs}"
|
||||
|
||||
if 'cpusMax' of params
|
||||
yield xapi.call 'VM.set_VCPUs_max', ref, "#{CPUs}"
|
||||
|
||||
# HA policy
|
||||
# TODO: also handle "best-effort" case
|
||||
if 'high_availability' of params
|
||||
@ -509,6 +512,8 @@ set.params = {
|
||||
# Number of virtual CPUs to allocate.
|
||||
CPUs: { type: 'integer', optional: true }
|
||||
|
||||
cpusMax: { type: ['integer', 'string'], optional: true }
|
||||
|
||||
# Memory to allocate (in bytes).
|
||||
#
|
||||
# Note: static_min ≤ dynamic_min ≤ dynamic_max ≤ static_max
|
||||
|
Loading…
Reference in New Issue
Block a user