lenovo / python-redfish-lenovo

Sample Python scripts and Ansible playbooks for using the Redfish API on Lenovo servers
Apache License 2.0
88 stars 49 forks source link

How to set a specific Network boot device via Redfish #353

Closed jasmeer closed 6 months ago

jasmeer commented 6 months ago

Hi I have this setting in my server:

image

This was set manually - I would like to set this using Redfish API. I couldn't find any examples on how to set a specific device.

Any help will be appreciated. Thanks Jasmeer

jixj5 commented 6 months ago

Hi, There are examples for setting bootmode and bootorder: python set_bios_bootmode_uefi.py -i ip -u username -p password python lenovo_set_bios_boot_order.py -i ip -u username -p password --bootorder Network

You can try it, any questions please let us know. Thanks

renxulei commented 6 months ago

@jasmeer do you want to control the order of network device list? if so, let me make more investigation, I think some oem functions may help on this. @jixj5 please try this url to see if it can help on jasmeer, "/redfish/v1/Systems/1/Oem/Lenovo/BootSettings/". if it work, please add one sample script for this.

jasmeer commented 6 months ago

Yes @renxulei, yes I would like to change the order of network devices. I couldn't find any docs on how this can be done via Redfish. Thank you both @renxulei and @jixj5 for the response. Jasmeer

jixj5 commented 6 months ago

@jasmeer we have added sample script for changing the order of network devices: lenovo_get_bios_boot_order_network.py to get BootOrderSupported lenovo_set_bios_boot_order_network.py specify bootorder of network devices that gets from BootOrderSupported, use space to seperate them.

You can try it, any questions please let us know. Thanks

jasmeer commented 6 months ago

Thanks a lot @jixj5. I will try and let you know. Jasmeer

jasmeer commented 6 months ago

Thanks @jixj5. I tested and it is working.