Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def required_bios_settings(pxe_interface: str) -> dict:
}


def update_dell_bios_settings(bmc: Bmc, pxe_interface="NIC.Integrated.1-1") -> dict:
def update_dell_bios_settings(bmc: Bmc, pxe_interface: str) -> dict:
"""Check and update BIOS settings to standard as required.

Any changes take effect on next server reboot.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ def _pxe_preference(interface: InterfaceInfo) -> int:
_name = interface.name.upper()
if "DRAC" in _name or "ILO" in _name or "NIC.EMBEDDED" in _name:
return 0
enabled_result = 100 if (interface.remote_switch_port_name is not None) else 0

NIC_PREFERENCE = {
"NIC.Integrated.1-1-1": 100,
Expand All @@ -124,8 +125,22 @@ def _pxe_preference(interface: InterfaceInfo) -> int:
"NIC.Integrated.1-2": 95,
"NIC.Slot.1-2-1": 94,
"NIC.Slot.1-2": 93,
"NIC.Slot.1-3-1": 92,
"NIC.Slot.1-3": 91,
"NIC.Slot.2-1-1": 90,
"NIC.Slot.2-1": 89,
"NIC.Integrated.2-1-1": 88,
"NIC.Integrated.2-1": 87,
"NIC.Slot.2-2-1": 86,
"NIC.Slot.2-2": 85,
"NIC.Integrated.2-2-1": 84,
"NIC.Integrated.2-2": 83,
"NIC.Slot.3-1-1": 82,
"NIC.Slot.3-1": 81,
"NIC.Slot.3-2-1": 80,
"NIC.Slot.3-2": 79,
}
return NIC_PREFERENCE.get(interface.name, 50)
return NIC_PREFERENCE.get(interface.name, 50) + enabled_result


def argument_parser():
Expand Down
Loading