Add mlnx deploy_step entry to enable deploy time firmware

Follow-up from service steps addition change to add a deploy steps
alias for the Nvidia Mellanox network device firmware update clean
steps. This allows deploy time firmware updates to be codified as
part of a deployment with custom steps.

Change-Id: I9d80447dee7cfde4d3f8d81d9d39e738916b7824
This commit is contained in:
Julia Kreger 2023-08-31 06:35:39 -07:00
parent eb95273ffb
commit f86975d53c
3 changed files with 13 additions and 2 deletions

View File

@ -163,8 +163,9 @@ class MellanoxDeviceHardwareManager(hardware.HardwareManager):
# NOTE(TheJulia): Since these steps can be run upon service, why not
return self.get_clean_steps(node, ports)
# TODO(TheJulia): Should there be a get_deploy_steps handler here? Since
# flashing firmware on deploy is a valid case.
def get_deploy_steps(self, node, ports):
"""Alias wrapper for method get_clean_steps."""
return self.get_clean_steps(node, ports)
def update_nvidia_nic_firmware_image(self, node, ports, images):
nvidia_fw_update.update_nvidia_nic_firmware_image(images)

View File

@ -77,6 +77,10 @@ class MlnxHardwareManager(base.IronicAgentTest):
'step': 'update_nvidia_nic_firmware_settings'}]
self.assertEqual(self.hardware.get_clean_steps(self.node, []),
expected_clean_steps)
self.assertEqual(self.hardware.get_service_steps(self.node, []),
expected_clean_steps)
self.assertEqual(self.hardware.get_deploy_steps(self.node, []),
expected_clean_steps)
@mock.patch.object(os, 'listdir', autospec=True)
@mock.patch.object(hardware, '_get_device_info', autospec=True)

View File

@ -0,0 +1,6 @@
---
features:
- |
The Nvidia Mellanox "clean steps" to facilitate firmware updates of
their network devices, are now available as deploy steps and service
steps as well.