Merge "Allow erase_devices_metadata to be used as a deploy step"
This commit is contained in:
commit
622ca733e2
@ -1583,6 +1583,12 @@ class GenericHardwareManager(HardwareManager):
|
|||||||
|
|
||||||
def get_deploy_steps(self, node, ports):
|
def get_deploy_steps(self, node, ports):
|
||||||
return [
|
return [
|
||||||
|
{
|
||||||
|
'step': 'erase_devices_metadata',
|
||||||
|
'priority': 0,
|
||||||
|
'interface': 'deploy',
|
||||||
|
'reboot_requested': False,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
'step': 'apply_configuration',
|
'step': 'apply_configuration',
|
||||||
'priority': 0,
|
'priority': 0,
|
||||||
|
@ -881,6 +881,14 @@ class TestGenericHardwareManager(base.IronicAgentTest):
|
|||||||
clean_steps = self.hardware.get_clean_steps(self.node, [])
|
clean_steps = self.hardware.get_clean_steps(self.node, [])
|
||||||
self.assertEqual(expected_clean_steps, clean_steps)
|
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('binascii.hexlify', autospec=True)
|
||||||
@mock.patch('ironic_python_agent.netutils.get_lldp_info', autospec=True)
|
@mock.patch('ironic_python_agent.netutils.get_lldp_info', autospec=True)
|
||||||
def test_collect_lldp_data(self, mock_lldp_info, mock_hexlify):
|
def test_collect_lldp_data(self, mock_lldp_info, mock_hexlify):
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
The ``deploy.erase_devices_metadata`` clean step can now also be used as
|
||||||
|
a deploy step.
|
Loading…
Reference in New Issue
Block a user