File tree Expand file tree Collapse file tree
python/understack-workflows/understack_workflows Expand file tree Collapse file tree Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff 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
131146def argument_parser ():
You can’t perform that action at this time.
0 commit comments