From dd04c35a1c621faafb3aaeb8583f69662649f120 Mon Sep 17 00:00:00 2001 From: Shivanand Tendulker Date: Mon, 8 May 2017 05:44:23 -0400 Subject: [PATCH] Add 'iscsi' deploy support for 'ilo' hardware type The classic iLO driver 'pxe_ilo', uses 'iscsi' deploy method and there by avoids dependency on Swift Temp URL for glance images. With no support to 'iscsi' deploy interface, 'ilo' hardware type do not provide complete compatibility with all classic iLO drivers. This commit adds support for 'iscsi' deploy interface for 'ilo' hardware type so that one could compose a driver for a node that matches any of the classic iLO drivers. Closes-Bug: #1689274 Change-Id: I6c5f4d68020bcf58b83d74f45bb059f1807a80ee --- ironic/drivers/ilo.py | 17 ----------------- ironic/tests/unit/drivers/test_ilo.py | 7 +++---- ...-for-ilo-hardware-type-bdfdce76cc265867.yaml | 4 ++++ 3 files changed, 7 insertions(+), 21 deletions(-) create mode 100644 releasenotes/notes/iscsi-deploy-support-for-ilo-hardware-type-bdfdce76cc265867.yaml diff --git a/ironic/drivers/ilo.py b/ironic/drivers/ilo.py index e8aaeb2e19..a9c448db7c 100644 --- a/ironic/drivers/ilo.py +++ b/ironic/drivers/ilo.py @@ -45,23 +45,6 @@ class IloHardware(generic.GenericHardware): """List of supported boot interfaces.""" return [boot.IloVirtualMediaBoot, boot.IloPXEBoot] - @property - def supported_deploy_interfaces(self): - """List of supported deploy interfaces.""" - - # Note(stendulker) It does not support ISCSI based deploy - # (iscsi.ISCSIDeploy) mechanism. - # The reason being all the Ironic features supported by ISCSIDeploy - # are supported with agentDeploy as well. There is no additional - # advantage of having iscsi based deploy except for the cases wherein - # instance images(qcow2) are larger than RAM size of the bare metal. - # That also could be overcome by using 'raw' images. - # To avoid the additional driver supportability and reduce test matrix, - # ISCSI based deploy is not supported. However, if any user insists - # for ISCSI based deploy, we would surely enable the same. - - return [agent.AgentDeploy] - @property def supported_console_interfaces(self): """List of supported console interfaces.""" diff --git a/ironic/tests/unit/drivers/test_ilo.py b/ironic/tests/unit/drivers/test_ilo.py index e15be1012d..2ef7d29efe 100644 --- a/ironic/tests/unit/drivers/test_ilo.py +++ b/ironic/tests/unit/drivers/test_ilo.py @@ -43,7 +43,7 @@ class IloHardwareTestCase(db_base.DbTestCase): self.config(enabled_hardware_types=['ilo'], enabled_boot_interfaces=['ilo-virtual-media', 'ilo-pxe'], enabled_console_interfaces=['ilo'], - enabled_deploy_interfaces=['direct'], + enabled_deploy_interfaces=['iscsi', 'direct'], enabled_inspect_interfaces=['ilo'], enabled_management_interfaces=['ilo'], enabled_power_interfaces=['ilo'], @@ -59,7 +59,7 @@ class IloHardwareTestCase(db_base.DbTestCase): self.assertIsInstance(task.driver.console, ilo.console.IloConsoleInterface) self.assertIsInstance(task.driver.deploy, - agent.AgentDeploy) + iscsi_deploy.ISCSIDeploy) self.assertIsInstance(task.driver.inspect, ilo.inspect.IloInspect) self.assertIsInstance(task.driver.management, @@ -99,7 +99,6 @@ class IloHardwareTestCase(db_base.DbTestCase): def test_override_with_pxe(self): node = obj_utils.create_test_node( self.context, driver='ilo', - deploy_interface='direct', boot_interface='ilo-pxe', raid_interface='agent') with task_manager.acquire(self.context, node.id) as task: @@ -108,7 +107,7 @@ class IloHardwareTestCase(db_base.DbTestCase): self.assertIsInstance(task.driver.console, ilo.console.IloConsoleInterface) self.assertIsInstance(task.driver.deploy, - agent.AgentDeploy) + iscsi_deploy.ISCSIDeploy) self.assertIsInstance(task.driver.inspect, ilo.inspect.IloInspect) self.assertIsInstance(task.driver.management, diff --git a/releasenotes/notes/iscsi-deploy-support-for-ilo-hardware-type-bdfdce76cc265867.yaml b/releasenotes/notes/iscsi-deploy-support-for-ilo-hardware-type-bdfdce76cc265867.yaml new file mode 100644 index 0000000000..bfe8d5c894 --- /dev/null +++ b/releasenotes/notes/iscsi-deploy-support-for-ilo-hardware-type-bdfdce76cc265867.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Adds support for ``iscsi`` deploy interface for ``ilo`` hardware type.