From 2a01a1b3eb3a332caeac4d87b88b6cd7793659d5 Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Wed, 17 Jun 2015 12:51:00 -0700 Subject: [PATCH] Remove hv_type translation shim for powervm Commit d05567cc3fcb8849402f7036895ea5f40f7e1a1f added a temporary translation shim so that the 'powervm' hypervisor type name in older images used by the powervc driver in stackforge would not fail to schedule due to an invalid (unregistered) hypervisor type. The agreement from the powervc driver maintainers in stackforge was that they'd put an image metadata translation shim in their driver so this could be removed from nova in Liberty, which is now. UpgradeImpact: Users of the nova-powervc driver from stackforge will need to move to a version of that driver which translates 'powervm' image metadata properly for scheduling, or update the image metadata manually. Change-Id: I31be654c817a00df2b4b51c184600c0c51c86443 --- nova/compute/hv_type.py | 3 --- nova/tests/unit/compute/test_hvtype.py | 3 --- nova/tests/unit/objects/test_fields.py | 3 +-- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/nova/compute/hv_type.py b/nova/compute/hv_type.py index 55d577457d16..e54b29d8dec6 100644 --- a/nova/compute/hv_type.py +++ b/nova/compute/hv_type.py @@ -95,9 +95,6 @@ def canonicalize(name): if newname == "xapi": newname = XEN - elif newname == "powervm": - # TODO(mriedem): Remove the translation shim in the 2015.2 'L' release. - newname = PHYP if not is_valid(newname): raise exception.InvalidHypervisorVirtType(hv_type=name) diff --git a/nova/tests/unit/compute/test_hvtype.py b/nova/tests/unit/compute/test_hvtype.py index 88aaab5773c6..91219d490091 100644 --- a/nova/tests/unit/compute/test_hvtype.py +++ b/nova/tests/unit/compute/test_hvtype.py @@ -40,9 +40,6 @@ class HvTypeTest(test.NoDBTestCase): def test_canonicalize_xapi(self): self.assertEqual(hv_type.XEN, hv_type.canonicalize("xapi")) - def test_canonicalize_powervm(self): - self.assertEqual(hv_type.PHYP, hv_type.canonicalize("POWERVM")) - def test_canonicalize_invalid(self): self.assertRaises(exception.InvalidHypervisorVirtType, hv_type.canonicalize, diff --git a/nova/tests/unit/objects/test_fields.py b/nova/tests/unit/objects/test_fields.py index a5387bd20e54..28d9fd9cdbf2 100644 --- a/nova/tests/unit/objects/test_fields.py +++ b/nova/tests/unit/objects/test_fields.py @@ -283,8 +283,7 @@ class TestHVType(TestField): ('bhyve', 'bhyve'), ('fake', 'fake'), ('kvm', 'kvm'), - ('xapi', 'xen'), - ('powervm', 'phyp')] + ('xapi', 'xen')] self.coerce_bad_values = ['acme'] self.to_primitive_values = self.coerce_good_values[0:1] self.from_primitive_values = self.coerce_good_values[0:1]