Browse Source

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

changes/71/743771/1
Zuul 2 weeks ago
committed by Gerrit Code Review
parent
commit
622ca733e2
3 changed files with 19 additions and 0 deletions
  1. +6
    -0
      ironic_python_agent/hardware.py
  2. +8
    -0
      ironic_python_agent/tests/unit/test_hardware.py
  3. +5
    -0
      releasenotes/notes/erase-deploy-step-3e952fa863bca908.yaml

+ 6
- 0
ironic_python_agent/hardware.py 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,


+ 8
- 0
ironic_python_agent/tests/unit/test_hardware.py 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):


+ 5
- 0
releasenotes/notes/erase-deploy-step-3e952fa863bca908.yaml View File

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

Loading…
Cancel
Save