Updated the local manager to support long values of RAM obtained from the libvirt API

This commit is contained in:
Anton Beloglazov 2015-03-25 12:02:38 +11:00
parent 1b1a3b64f3
commit 86d5ffb59e
2 changed files with 3 additions and 3 deletions

View File

@ -257,7 +257,7 @@ def calculate_migration_time(vms, bandwidth):
""" Calculate the mean migration time from VM RAM usage data.
:param vms: A map of VM UUIDs to the corresponding maximum RAM in MB.
:type vms: dict(str: int)
:type vms: dict(str: long)
:param bandwidth: The network bandwidth in MB/s.
:type bandwidth: float,>0

View File

@ -409,7 +409,7 @@ def get_ram(vir_connection, vms):
:type vms: list(str)
:return: The maximum RAM for the VM UUIDs.
:rtype: dict(str : int)
:rtype: dict(str : long)
"""
vms_ram = {}
for uuid in vms:
@ -431,7 +431,7 @@ def get_max_ram(vir_connection, uuid):
:type uuid: str[36]
:return: The maximum RAM of the VM in MB.
:rtype: int|None
:rtype: long|None
"""
try:
domain = vir_connection.lookupByUUIDString(uuid)