VM's CPU number.

This commit is contained in:
Julien Fontanet 2013-12-18 19:20:59 +01:00
parent 76b26a7ee6
commit 92f450cda0
3 changed files with 6 additions and 4 deletions

View File

@ -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_

View File

@ -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
} }
} }
} }

View File

@ -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'