VM's CPU number.
This commit is contained in:
parent
76b26a7ee6
commit
92f450cda0
@ -230,7 +230,7 @@ class $MappedCollection
|
|||||||
hook.call ctx, value, key
|
hook.call ctx, value, key
|
||||||
|
|
||||||
# Updates the value if it changed.
|
# 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.
|
# Checks each hook is correctly defined.
|
||||||
{enter, update, exit} = hooks_
|
{enter, update, exit} = hooks_
|
||||||
|
@ -284,9 +284,12 @@ module.exports = (refsToUUIDs) ->
|
|||||||
update: (metrics, UUID) ->
|
update: (metrics, UUID) ->
|
||||||
return if UUID isnt refsToUUIDs[@generator.metrics]
|
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.
|
# Remembers its UUID.
|
||||||
poolUUID = pool.uuid
|
poolUUID = pool.uuid
|
||||||
|
|
||||||
|
|
||||||
# Normalizes the records.
|
# Normalizes the records.
|
||||||
normalizeObject pool, ref, 'pool'
|
normalizeObject pool, ref, 'pool'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user