From 8f464b909a1a6fa2ec5b62fee0fd83e1bcd240da Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Wed, 31 Jan 2018 16:49:56 +0100 Subject: [PATCH] Add missing ilo vendor to the ilo hardware types I'm not sure why it was missed initially. But if we don't have it, the automatic migration to hardware types will reset the vendor interface to no-vendor, which may look like a regression to users. Change-Id: I6da6aa8138d7f0cbf225c15c4137edeec2c33d49 Related-Bug: #1690185 --- ironic/drivers/ilo.py | 5 +++++ ironic/tests/unit/drivers/test_ilo.py | 9 +++++---- releasenotes/notes/ilo-vendor-e8d299ae13388184.yaml | 4 ++++ setup.cfg | 1 + 4 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 releasenotes/notes/ilo-vendor-e8d299ae13388184.yaml diff --git a/ironic/drivers/ilo.py b/ironic/drivers/ilo.py index a9c448db7c..9d51ad50b5 100644 --- a/ironic/drivers/ilo.py +++ b/ironic/drivers/ilo.py @@ -66,6 +66,11 @@ class IloHardware(generic.GenericHardware): """List of supported power interfaces.""" return [power.IloPower] + @property + def supported_vendor_interfaces(self): + """List of supported power interfaces.""" + return [vendor.VendorPassthru, noop.NoVendor] + class IloVirtualMediaIscsiDriver(base.BaseDriver): """IloDriver using IloClient interface. diff --git a/ironic/tests/unit/drivers/test_ilo.py b/ironic/tests/unit/drivers/test_ilo.py index 2ef7d29efe..02c681dee8 100644 --- a/ironic/tests/unit/drivers/test_ilo.py +++ b/ironic/tests/unit/drivers/test_ilo.py @@ -48,7 +48,7 @@ class IloHardwareTestCase(db_base.DbTestCase): enabled_management_interfaces=['ilo'], enabled_power_interfaces=['ilo'], enabled_raid_interfaces=['no-raid', 'agent'], - enabled_vendor_interfaces=['no-vendor']) + enabled_vendor_interfaces=['ilo', 'no-vendor']) def test_default_interfaces(self): node = obj_utils.create_test_node(self.context, @@ -69,7 +69,7 @@ class IloHardwareTestCase(db_base.DbTestCase): self.assertIsInstance(task.driver.raid, noop.NoRAID) self.assertIsInstance(task.driver.vendor, - noop.NoVendor) + ilo.vendor.VendorPassthru) def test_override_with_inspector(self): self.config(enabled_inspect_interfaces=['inspector', 'ilo']) @@ -77,7 +77,8 @@ class IloHardwareTestCase(db_base.DbTestCase): self.context, driver='ilo', deploy_interface='direct', inspect_interface='inspector', - raid_interface='agent') + raid_interface='agent', + vendor_interface='no-vendor') with task_manager.acquire(self.context, node.id) as task: self.assertIsInstance(task.driver.boot, ilo.boot.IloVirtualMediaBoot) @@ -117,7 +118,7 @@ class IloHardwareTestCase(db_base.DbTestCase): self.assertIsInstance(task.driver.raid, agent.AgentRAID) self.assertIsInstance(task.driver.vendor, - noop.NoVendor) + ilo.vendor.VendorPassthru) @mock.patch.object(ilo.importutils, 'try_import', spec_set=True, diff --git a/releasenotes/notes/ilo-vendor-e8d299ae13388184.yaml b/releasenotes/notes/ilo-vendor-e8d299ae13388184.yaml new file mode 100644 index 0000000000..95cb66b1fd --- /dev/null +++ b/releasenotes/notes/ilo-vendor-e8d299ae13388184.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Adds missing ``ilo`` vendor interface to the ``ilo`` hardware type. diff --git a/setup.cfg b/setup.cfg index cfca1f4fa9..5db545874d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -166,6 +166,7 @@ ironic.hardware.interfaces.storage = ironic.hardware.interfaces.vendor = fake = ironic.drivers.modules.fake:FakeVendorB idrac = ironic.drivers.modules.drac.vendor_passthru:DracVendorPassthru + ilo = ironic.drivers.modules.ilo.vendor:VendorPassthru ipmitool = ironic.drivers.modules.ipmitool:VendorPassthru no-vendor = ironic.drivers.modules.noop:NoVendor