VM's CPU number.
This commit is contained in:
parent
76b26a7ee6
commit
92f450cda0
@ -230,7 +230,7 @@ class $MappedCollection
|
||||
hook.call ctx, value, key
|
||||
|
||||
# Updates the value if it changed.
|
||||
$setDeep item.value, path if ctx.field isnt field
|
||||
$setDeep item.value, path, ctx.field if ctx.field isnt field
|
||||
|
||||
# Checks each hook is correctly defined.
|
||||
{enter, update, exit} = hooks_
|
||||
|
@ -284,9 +284,12 @@ module.exports = (refsToUUIDs) ->
|
||||
update: (metrics, UUID) ->
|
||||
return if UUID isnt refsToUUIDs[@generator.metrics]
|
||||
|
||||
@field = for _, utilisation of metrics.VCPUs_utilisation
|
||||
i = 0
|
||||
n = metrics.VCPUs_number
|
||||
@field = while i++ < n
|
||||
{
|
||||
usage: utilisation
|
||||
# TODO: Should it be null?
|
||||
usage: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -204,7 +204,6 @@ class $XO
|
||||
# Remembers its UUID.
|
||||
poolUUID = pool.uuid
|
||||
|
||||
|
||||
# Normalizes the records.
|
||||
normalizeObject pool, ref, 'pool'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user