Skip to content

Commit 82b3263

Browse files
committed
fix: update BMC code fto set correct pxe interface.
1 parent a53cab6 commit 82b3263

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

python/understack-workflows/understack_workflows/bmc_bios.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def required_bios_settings(pxe_interface: str) -> dict:
1919
}
2020

2121

22-
def update_dell_bios_settings(bmc: Bmc, pxe_interface="NIC.Integrated.1-1") -> dict:
22+
def update_dell_bios_settings(bmc: Bmc, pxe_interface: str) -> dict:
2323
"""Check and update BIOS settings to standard as required.
2424
2525
Any changes take effect on next server reboot.

python/understack-workflows/understack_workflows/main/enroll_server.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ def _pxe_preference(interface: InterfaceInfo) -> int:
114114
_name = interface.name.upper()
115115
if "DRAC" in _name or "ILO" in _name or "NIC.EMBEDDED" in _name:
116116
return 0
117+
enabled_result = 50 if (interface.remote_switch_port_name is not None) else 0
117118

118119
NIC_PREFERENCE = {
119120
"NIC.Integrated.1-1-1": 100,
@@ -124,8 +125,22 @@ def _pxe_preference(interface: InterfaceInfo) -> int:
124125
"NIC.Integrated.1-2": 95,
125126
"NIC.Slot.1-2-1": 94,
126127
"NIC.Slot.1-2": 93,
128+
"NIC.Slot.1-3-1": 92,
129+
"NIC.Slot.1-3": 91,
130+
"NIC.Slot.2-1-1": 90,
131+
"NIC.Slot.2-1": 89,
132+
"NIC.Integrated.2-1-1": 88,
133+
"NIC.Integrated.2-1": 87,
134+
"NIC.Slot.2-2-1": 86,
135+
"NIC.Slot.2-2": 85,
136+
"NIC.Integrated.2-2-1": 84,
137+
"NIC.Integrated.2-2": 83,
138+
"NIC.Slot.3-1-1": 82,
139+
"NIC.Slot.3-1": 81,
140+
"NIC.Slot.3-2-1": 80,
141+
"NIC.Slot.3-2": 79,
127142
}
128-
return NIC_PREFERENCE.get(interface.name, 50)
143+
return NIC_PREFERENCE.get(interface.name, 50) + enabled_result
129144

130145

131146
def argument_parser():

0 commit comments

Comments
 (0)