6 Commits

Author SHA1 Message Date
waleed mousa
2c7f95e3ac update NVIDIA NIC firmware images and settings by ironic-python-agent
Add "update_nvidia_nic_firmware_image" and "update_nvidia_nic_firmware_settings"
clean steps to MellanoxDeviceHardwareManager.

By adding those two steps, we can update the firmware image and
firmware settings of NVIDIA NICs by ironic-python-agent using
manual cleaning command
The clean steps require mstflint package installed on the image.
The "update_nvidia_nic_firmware_image" clean step requires to pass
"images" parameter to the clean command
The "images" parameter is a json blob contains
a list of images, where each image contains a map of:
  * url: to firmware image (file://, http://)
  * checksum: checksum of the provided image
  * checksumType: md5/sha512/sha256
  * componentFlavor: PSID of the nic
  * version: version of the FW

The "update_nvidia_nic_firmware_settings" clean step requires to pass
"settings" parameter to the clean command
The "settings" parameter is a json blob contains
a list of settings, where each settings contains a map of:
  * deviceID: device ID
  * globalConfig: global config
  * function0Config: function 0 config
  * function1Config: function 1 config

Change-Id: Icfaffd7c58c3c73c3fa28cfc2a6c954d2c93c16e
Story: 2010228
Task: 46016
2023-01-11 14:00:07 +00:00
Riccardo Pittau
d5d62c8dbf Use unittest mock from standard library
Drop the third party mock library to use unittest mock from
standard library.

Change-Id: Ib64b661572e4869a24865c02a6c84a6603930394
2020-04-06 14:35:50 +02:00
Moshe Levi
7631902ec7 mlnx hardware_manager: get mac address using netifaces
Change-Id: I62e4ca6afb0f8a256ddf9bbc48225fbb96f9e817
2018-03-11 12:50:08 +02:00
John L. Villalovos
265a072b72 Have unit tests all derive from our base unit test class
Have our unit tests derive from the base unit test class in
ironic_python_agent/tests/unit/base: IronicAgentTest

This is so if we add additional global common features to our base
test class, all of our tests will get those common features.

Change-Id: I5188112f06dcfda4f5b0fd41fa9b9dd270cde8d7
2017-10-18 11:06:30 -07:00
John L. Villalovos
1695cb18c2 Add missing 'autospec' argument to mock.patch
Add missing 'autospec' keyword argument to mock.patch and
mock.patch.object calls. Use 'autospec=True' except for a few cases
where it fails because the mocked function is a @classmethod and it
doesn't work. In that case explicity set it to 'autospec=False'

Change-Id: I620dce91abaa4440e1803aeefb3e93c0b65d1419
2017-03-19 10:04:19 -07:00
Moshe Levi
1bdcd4449f Add a new Hardware Manager for Mellanox NICs
This patch add Mellanox Manager to support Mellanox
InfiniBand NICs.

It adds client_id to the NetworkInterface for the
InfiniBand network interface.

The Mellanox Manager provides it own implementation of
get_interface_info. The mlnx get_interface_info generate
InfiniBand MAC and client-id from the InfiniBand network
interface address.

Closes-Bug: #1532534

Change-Id: I4e7f7649a1bdeaa3ee99b2748037b0f37fea486c
2016-11-22 15:46:12 +01:00