Skip to content

Commit

Permalink
Remove unnecessary mapping from Agent drivers
Browse files Browse the repository at this point in the history
Both vendor methods comes from the same VendorInterface, so no need to
use the MixinVendorInterface.

Change-Id: I9d6cea289555a79f1ccb1c6698809e196e9e4255
  • Loading branch information
umago committed Sep 5, 2014
1 parent 823bd59 commit 3dd4b0f
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions ironic/drivers/agent.py
Expand Up @@ -17,7 +17,6 @@
from ironic.drivers.modules import ipminative
from ironic.drivers.modules import ipmitool
from ironic.drivers.modules import ssh
from ironic.drivers import utils


class AgentAndIPMIToolDriver(base.BaseDriver):
Expand All @@ -36,11 +35,7 @@ def __init__(self):
self.deploy = agent.AgentDeploy()
self.management = ipmitool.IPMIManagement()
self.console = ipmitool.IPMIShellinaboxConsole()
self.agent_vendor = agent.AgentVendorInterface()
self.mapping = {'heartbeat': self.agent_vendor}
self.dl_mapping = {'lookup': self.agent_vendor}
self.vendor = utils.MixinVendorInterface(self.mapping,
driver_passthru_mapping=self.dl_mapping)
self.vendor = agent.AgentVendorInterface()


class AgentAndIPMINativeDriver(base.BaseDriver):
Expand All @@ -60,11 +55,7 @@ def __init__(self):
self.deploy = agent.AgentDeploy()
self.management = ipminative.NativeIPMIManagement()
self.console = ipminative.NativeIPMIShellinaboxConsole()
self.agent_vendor = agent.AgentVendorInterface()
self.mapping = {'heartbeat': self.agent_vendor}
self.dl_mapping = {'lookup': self.agent_vendor}
self.vendor = utils.MixinVendorInterface(self.mapping,
driver_passthru_mapping=self.dl_mapping)
self.vendor = agent.AgentVendorInterface()


class AgentAndSSHDriver(base.BaseDriver):
Expand All @@ -84,8 +75,4 @@ def __init__(self):
self.power = ssh.SSHPower()
self.deploy = agent.AgentDeploy()
self.management = ssh.SSHManagement()
self.agent_vendor = agent.AgentVendorInterface()
self.mapping = {'heartbeat': self.agent_vendor}
self.dl_mapping = {'lookup': self.agent_vendor}
self.vendor = utils.MixinVendorInterface(self.mapping,
driver_passthru_mapping=self.dl_mapping)
self.vendor = agent.AgentVendorInterface()

0 comments on commit 3dd4b0f

Please sign in to comment.