diff options
author | Devananda van der Veen <devananda.vdv@gmail.com> | 2014-03-27 14:30:10 -0700 |
---|---|---|
committer | Devananda van der Veen <devananda.vdv@gmail.com> | 2014-03-27 14:51:21 -0700 |
commit | 3477ad215ea40618413bf8964af995014d5022da (patch) | |
tree | 4beb39631f533ab2cb13489daa85e11f8e53d409 | |
parent | f1e702c35719407db0a77684294cdb4e73a461c3 (diff) | |
download | ironic-3477ad215ea40618413bf8964af995014d5022da.tar.gz |
Fix seamicro validate() method definition
The base class definition of vendor_passthru.validate() was changed
in 48a4223f so that it also required a 'task' parameter, but
the seamicro.vendor_passthru driver had not landed yet. Between that
change and the time the seamicro driver was landed, another change
caused us to stop running unit tests on third-party drivers.
So, we didn't notice that the seamicro.vendor_passthru.validate() method
definition was incompatibly broken.
Closes-bug: #1298648
Change-Id: I9eab4c1d1be0546a0cdbf40759e88bb22f5015d2
-rw-r--r-- | ironic/drivers/modules/seamicro.py | 2 | ||||
-rw-r--r-- | ironic/tests/drivers/test_seamicro.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/ironic/drivers/modules/seamicro.py b/ironic/drivers/modules/seamicro.py index ce2133569..4d6912cc5 100644 --- a/ironic/drivers/modules/seamicro.py +++ b/ironic/drivers/modules/seamicro.py @@ -386,7 +386,7 @@ class Power(base.PowerInterface): class VendorPassthru(base.VendorInterface): """SeaMicro vendor-specific methods.""" - def validate(self, node, **kwargs): + def validate(self, task, node, **kwargs): method = kwargs['method'] if method in VENDOR_PASSTHRU_METHODS: return True diff --git a/ironic/tests/drivers/test_seamicro.py b/ironic/tests/drivers/test_seamicro.py index 1af9f8059..8ea270995 100644 --- a/ironic/tests/drivers/test_seamicro.py +++ b/ironic/tests/drivers/test_seamicro.py @@ -362,8 +362,8 @@ class SeaMicroPowerDriverTestCase(db_base.DbTestCase): with task_manager.acquire(self.context, [self.node['uuid']], shared=True) as task: for method in seamicro.VENDOR_PASSTHRU_METHODS: - task.resources[0].driver.vendor.validate(self.node, - **{'method': method}) + task.resources[0].driver.vendor.validate( + task, self.node, **{'method': method}) def test_vendor_passthru_validate_fail(self): with task_manager.acquire(self.context, [self.node['uuid']], |