Remove IloPXEDeploy.validate()

Removed IloPXEDeploy.validate(), because the method of the parent
class, PXEDeploy.validate(), has already implemented the code which it
added.

Change-Id: I534e8a2d84fcf2d8a94a5cc90f0b091f872333f9
Closes-Bug: #1412269
This commit is contained in:
Naohiro Tamura 2015-01-17 23:35:42 +09:00
parent 2e06859425
commit 844bf3b433
2 changed files with 1 additions and 16 deletions

View File

@ -401,19 +401,6 @@ class IloVirtualMediaAgentDeploy(base.DeployInterface):
class IloPXEDeploy(pxe.PXEDeploy):
def validate(self, task):
"""Validate the deployment information for the task's node.
This method validates the boot mode capability of the node and then
call the PXEDeploy's validate method.
:param task: a TaskManager instance containing the node to act on.
:raises: InvalidParameterValue or MissingParameterValue,
if some information is missing or invalid.
"""
driver_utils.validate_boot_mode_capability(task.node)
super(IloPXEDeploy, self).validate(task)
def prepare(self, task):
"""Prepare the deployment environment for this task's node.

View File

@ -439,12 +439,10 @@ class IloPXEDeployTestCase(db_base.DbTestCase):
driver='pxe_ilo', driver_info=INFO_DICT)
@mock.patch.object(pxe.PXEDeploy, 'validate')
@mock.patch.object(driver_utils, 'validate_boot_mode_capability')
def test_validate(self, boot_mode_mock, pxe_validate_mock):
def test_validate(self, pxe_validate_mock):
with task_manager.acquire(self.context, self.node.uuid,
shared=False) as task:
task.driver.deploy.validate(task)
boot_mode_mock.assert_called_once_with(task.node)
pxe_validate_mock.assert_called_once_with(task)
@mock.patch.object(pxe.PXEDeploy, 'prepare')