diff options
author | Aditi Raveesh <aditi.raveesh@gmail.com> | 2013-12-18 10:33:01 +0530 |
---|---|---|
committer | Aditi Raveesh <aditi.raveesh@gmail.com> | 2013-12-18 11:56:27 +0530 |
commit | 09cca5fc0c9dd02832421b26acbf691df0c39936 (patch) | |
tree | 331c1d58c257495ead6410ab72ad06ee3e498616 /nova/utils.py | |
parent | 2efc5bca2175117b7adc7794d0c89f23d24d0610 (diff) | |
download | nova-09cca5fc0c9dd02832421b26acbf691df0c39936.tar.gz |
Setting the xen vm device id on vm record
Currently, while setting the device_id, the hypervisor
version is being incorrectly handled since the method
get_major_minor_version expects either an int, float,
or string format. However, the xen hypervisor
version is stored in the session product_version as a tuple.
This fix correctly uses the version to set the appropriate
device_id on the vm record. Also, removing the method
get_major_minor_version as it is not needed anymore.
Closes-bug: #1260178
Change-Id: I6b1353cdb7cc856b34f02e3d3679c142ba032533
Diffstat (limited to 'nova/utils.py')
-rw-r--r-- | nova/utils.py | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/nova/utils.py b/nova/utils.py index ea738d4178..7023c83278 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -1034,18 +1034,6 @@ def convert_version_to_tuple(version_str): return tuple(int(part) for part in version_str.split('.')) -def get_major_minor_version(version): - try: - if type(version) == int or type(version) == float: - return version - if type(version) == str: - major_minor_versions = version.split(".")[0:2] - version_as_float = float(".".join(major_minor_versions)) - return version_as_float - except Exception: - raise exception.NovaException(_("Version %s invalid") % version) - - def is_neutron(): global _IS_NEUTRON_ATTEMPTED global _IS_NEUTRON |