diff options
author | Vladyslav Drok <vdrok@mirantis.com> | 2015-09-16 17:09:02 +0300 |
---|---|---|
committer | Vladyslav Drok <vdrok@mirantis.com> | 2015-09-17 13:01:27 +0300 |
commit | bb74bb308c5c20f67e5eb525ac08328b2181a2f3 (patch) | |
tree | 95f38554ad1c67a05f61d44cacdea3c96a2ae106 /ironic | |
parent | ad9385aae6007f671f119c3f142074a569c8d02d (diff) | |
download | ironic-bb74bb308c5c20f67e5eb525ac08328b2181a2f3.tar.gz |
Add IPMINative vendor methods to *IPMINative drivers
Currently, ipminative.VendorPassthru methods are not used in any
driver, while they should be in *IPMINative drivers.
Related-bug: #1486148
Change-Id: I6a3855780e74c52821930a3f3c0589b0a468a8e3
Diffstat (limited to 'ironic')
-rw-r--r-- | ironic/drivers/agent.py | 11 | ||||
-rw-r--r-- | ironic/drivers/pxe.py | 23 |
2 files changed, 27 insertions, 7 deletions
diff --git a/ironic/drivers/agent.py b/ironic/drivers/agent.py index 8f95f098e..088c2e118 100644 --- a/ironic/drivers/agent.py +++ b/ironic/drivers/agent.py @@ -75,7 +75,16 @@ class AgentAndIPMINativeDriver(base.BaseDriver): self.deploy = agent.AgentDeploy() self.management = ipminative.NativeIPMIManagement() self.console = ipminative.NativeIPMIShellinaboxConsole() - self.vendor = agent.AgentVendorInterface() + self.agent_vendor = agent.AgentVendorInterface() + self.ipminative_vendor = ipminative.VendorPassthru() + self.mapping = { + 'send_raw': self.ipminative_vendor, + 'bmc_reset': self.ipminative_vendor, + 'heartbeat': self.agent_vendor, + } + self.driver_passthru_mapping = {'lookup': self.agent_vendor} + self.vendor = utils.MixinVendorInterface(self.mapping, + self.driver_passthru_mapping) self.raid = agent.AgentRAID() diff --git a/ironic/drivers/pxe.py b/ironic/drivers/pxe.py index 92f31ff04..5cfde84e9 100644 --- a/ironic/drivers/pxe.py +++ b/ironic/drivers/pxe.py @@ -67,14 +67,14 @@ class PXEAndIPMIToolDriver(base.BaseDriver): self.management = ipmitool.IPMIManagement() self.inspect = inspector.Inspector.create_if_enabled( 'PXEAndIPMIToolDriver') - self.pxe_vendor = iscsi_deploy.VendorPassthru() + self.iscsi_vendor = iscsi_deploy.VendorPassthru() self.ipmi_vendor = ipmitool.VendorPassthru() self.mapping = {'send_raw': self.ipmi_vendor, 'bmc_reset': self.ipmi_vendor, - 'heartbeat': self.pxe_vendor, - 'pass_deploy_info': self.pxe_vendor, - 'pass_bootloader_install_info': self.pxe_vendor} - self.driver_passthru_mapping = {'lookup': self.pxe_vendor} + 'heartbeat': self.iscsi_vendor, + 'pass_deploy_info': self.iscsi_vendor, + 'pass_bootloader_install_info': self.iscsi_vendor} + self.driver_passthru_mapping = {'lookup': self.iscsi_vendor} self.vendor = utils.MixinVendorInterface( self.mapping, driver_passthru_mapping=self.driver_passthru_mapping) @@ -122,7 +122,18 @@ class PXEAndIPMINativeDriver(base.BaseDriver): self.boot = pxe.PXEBoot() self.deploy = iscsi_deploy.ISCSIDeploy() self.management = ipminative.NativeIPMIManagement() - self.vendor = iscsi_deploy.VendorPassthru() + self.iscsi_vendor = iscsi_deploy.VendorPassthru() + self.ipminative_vendor = ipminative.VendorPassthru() + self.mapping = { + 'send_raw': self.ipminative_vendor, + 'bmc_reset': self.ipminative_vendor, + 'heartbeat': self.iscsi_vendor, + 'pass_bootloader_install_info': self.iscsi_vendor, + 'pass_deploy_info': self.iscsi_vendor, + } + self.driver_passthru_mapping = {'lookup': self.iscsi_vendor} + self.vendor = utils.MixinVendorInterface(self.mapping, + self.driver_passthru_mapping) self.inspect = inspector.Inspector.create_if_enabled( 'PXEAndIPMINativeDriver') |