Skip to content

Commit ae20898

Browse files
committed
Fix mac address case sensitivity
1 parent 3ae47bd commit ae20898

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

python/ironic-understack/ironic_understack/port_bios_name_hook.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ def __call__(self, task, inventory, plugin_data):
2222
LOG.error("No interfaces in inventory for node %s", task.node.uuid)
2323
return
2424

25-
interface_names = {i["mac_address"]: i["name"] for i in inspected_interfaces}
25+
interface_names = {
26+
i["mac_address"].upper(): i["name"] for i in inspected_interfaces
27+
}
2628

2729
for baremetal_port in ironic_ports_for_node(task.context, task.node.id):
28-
mac = baremetal_port.address
30+
mac = baremetal_port.address.upper()
2931
name = interface_names.get(mac)
3032
LOG.info("Port %(mac)s bios_name=%(name)s", {"mac": mac, "name": name})
3133
if name:

0 commit comments

Comments
 (0)