Currently the KVM hypervisor returns strings for the memory and cpu values, while the xen hypervisor returns integers. Making this uniform converting the values to integers in KVM as well.
Signed-off-by: Guido Trotter <[email protected]> --- lib/hypervisor/hv_kvm.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/hypervisor/hv_kvm.py b/lib/hypervisor/hv_kvm.py index 246c7f9..358de74 100644 --- a/lib/hypervisor/hv_kvm.py +++ b/lib/hypervisor/hv_kvm.py @@ -194,9 +194,9 @@ class KVMHypervisor(hv_base.BaseHypervisor): while arg_list: arg = arg_list.pop(0) if arg == '-m': - memory = arg_list.pop(0) + memory = int(arg_list.pop(0)) elif arg == '-smp': - vcpus = arg_list.pop(0) + vcpus = int(arg_list.pop(0)) return (instance_name, pid, memory, vcpus, stat, times) -- 1.5.6.5
