Skip to content

Commit

Permalink
fix: support for uefi boot mode
Browse files Browse the repository at this point in the history
  • Loading branch information
grafuls committed Jun 4, 2024
1 parent 5a22209 commit 94749e0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions config/idrac_interfaces.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,6 @@ uefi_e28_r750_interfaces: NIC.Slot.3-1-1,HardDisk.List.1-1,NIC.Embedded.1-1-1
# h35 (should resemble other r640 hosts)
#director_f04_h35_r640_interfaces: NIC.Slot.1-2-1,HardDisk.List.1-1,NIC.Integrated.1-1-1
#foreman_f04_h35_r640_interfaces: NIC.Integrated.1-1-1,HardDisk.List.1-1,NIC.Slot.1-2-1

director_r660_interfaces: NIC.PxeDevice.2-1,RAID.SL.3-2,NIC.PxeDevice.1-1
foreman_r660_interfaces: NIC.PxeDevice.1-1,RAID.SL.3-2,NIC.PxeDevice.2-1
2 changes: 1 addition & 1 deletion rpm/python3-badfish.spec.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Summary: %{sum}

License: GPLv3
URL: https://github.com/%{org}/%{project}
Source: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
Source: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz

BuildArch: noarch
BuildRequires: %{py3_dist setuptools}
Expand Down
7 changes: 4 additions & 3 deletions src/badfish/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,7 @@ async def boot_to_type(self, host_type, _interfaces_path):

device = await self.get_host_type_boot_device(host_type, _interfaces_path)

await self.boot_to(device)
await self.boot_to(device, True)

async def boot_to_mac(self, mac_address):
interfaces_endpoints = await self.get_interfaces_endpoints()
Expand All @@ -1116,10 +1116,11 @@ async def boot_to_mac(self, mac_address):
raise BadfishException("MAC Address does not match any of the existing")

async def send_one_time_boot(self, device):
boot_seq = await self.get_boot_seq()
_payload = {
"Attributes": {
"OneTimeBootMode": "OneTimeBootSeq",
"OneTimeBootSeqDev": device,
"OneTimeBootMode": f"OneTime{boot_seq}",
f"OneTime{boot_seq}Dev": device,
}
}
await self.patch_bios(_payload)
Expand Down

0 comments on commit 94749e0

Please sign in to comment.