Commit 3f2eba25 authored by Miguel Di Ciurcio Filho's avatar Miguel Di Ciurcio Filho Committed by Guido Trotter
Browse files

kvm: Make _GetKVMVersion() return integers



The current code returns the major, minor and rev portions of the version of
KVM as strings. Returning them as integers makes it easier to compare.
Signed-off-by: default avatarMiguel Di Ciurcio Filho <miguel.filho@gmail.com>
Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 3c8a73a4
......@@ -836,7 +836,9 @@ class KVMHypervisor(hv_base.BaseHypervisor):
match = cls._VERSION_RE.search(result.output.splitlines()[0])
if not match:
return None
return (match.group(0), match.group(1), match.group(2), match.group(3))
return (match.group(0), int(match.group(1)), int(match.group(2)),
int(match.group(3)))
def StopInstance(self, instance, force=False, retry=False, name=None):
"""Stop an instance.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment