Merge "Allow erase_devices_metadata to be used as a deploy step"

This commit is contained in:
Zuul 2020-07-28 17:07:31 +00:00 committed by Gerrit Code Review
commit 622ca733e2
3 changed files with 19 additions and 0 deletions

View File

@ -1583,6 +1583,12 @@ class GenericHardwareManager(HardwareManager):
def get_deploy_steps(self, node, ports):
return [
{
'step': 'erase_devices_metadata',
'priority': 0,
'interface': 'deploy',
'reboot_requested': False,
},
{
'step': 'apply_configuration',
'priority': 0,

View File

@ -881,6 +881,14 @@ class TestGenericHardwareManager(base.IronicAgentTest):
clean_steps = self.hardware.get_clean_steps(self.node, [])
self.assertEqual(expected_clean_steps, clean_steps)
def test_clean_steps_exist(self):
for step in self.hardware.get_clean_steps(self.node, []):
getattr(self.hardware, step['step'])
def test_deploy_steps_exist(self):
for step in self.hardware.get_deploy_steps(self.node, []):
getattr(self.hardware, step['step'])
@mock.patch('binascii.hexlify', autospec=True)
@mock.patch('ironic_python_agent.netutils.get_lldp_info', autospec=True)
def test_collect_lldp_data(self, mock_lldp_info, mock_hexlify):

View File

@ -0,0 +1,5 @@
---
features:
- |
The ``deploy.erase_devices_metadata`` clean step can now also be used as
a deploy step.