2
0
mirror of https://opendev.org/x/pyghmi synced 2026-08-25 08:06:48 +00:00

Merge "Add http boot dev"

This commit is contained in:
Zuul
2026-06-03 13:33:33 +00:00
committed by Gerrit Code Review
3 changed files with 8 additions and 0 deletions
+1
View File
@@ -53,6 +53,7 @@ boot_devices = {
'net': 4,
'network': 4,
'pxe': 4,
'http': 4,
'hd': 8,
'safe': 0xc,
'cd': 0x14,
+1
View File
@@ -60,6 +60,7 @@ boot_devices_read = {
'Pxe': 'network',
'Usb': 'usb',
'SDCard': 'sdcard',
'UefiHttp': 'http',
}
+6
View File
@@ -107,6 +107,7 @@ boot_devices_write = {
'net': 'Pxe',
'network': 'Pxe',
'pxe': 'Pxe',
'http': 'UefiHttp',
'hd': 'Hdd',
'usb': 'Usb',
'cd': 'Cd',
@@ -129,6 +130,7 @@ boot_devices_read = {
'Pxe': 'network',
'Usb': 'usb',
'SDCard': 'sdcard',
'UefiHttp': 'http',
}
@@ -736,6 +738,10 @@ class OEMHandler(object):
raise exc.InvalidParameterValue('Unsupported device %s'
% repr(bootdev))
bootdev = boot_devices_write.get(bootdev, bootdev)
if bootdev == 'UefiHttp':
allowvals = fishclient.sysinfo.get('Boot', {}).get('BootSourceOverrideTarget@Redfish.AllowableValues', [])
if bootdev not in allowvals:
bootdev = 'Pxe'
if bootdev == 'None':
payload = {'Boot': {'BootSourceOverrideEnabled': 'Disabled'}}
else: