From 49edcb0e73c5f270d4845d3b3600d3b52f4ee697 Mon Sep 17 00:00:00 2001 From: Aarti Kriplani Date: Mon, 15 Jul 2013 10:53:10 +0530 Subject: [PATCH] xenapi:populating hypervisor version in host state This will be used in the scheduler to compare it to the image properties. Pulled out conversion of version string into integer to utils. Partially implements blueprint xen-support-for-hypervisor-versions Change-Id: Ib2eb91f6f18af6d39f9381daeff7ba9a24b4785a --- nova/utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nova/utils.py b/nova/utils.py index db43916b1..1a2db757f 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -1131,3 +1131,7 @@ def is_none_string(val): return False return val.lower() == 'none' + + +def convert_version_to_int(version): + return version[0] * 1000000 + version[1] * 1000 + version[2]