So I am using redfish to try and mount a virtual media to the iso and not sure what to do exactly and i need it so when I mount it , it then reboots into to the iso as well.
I am using python for this.
What I have tried:
def ex17_mount_virtual_media_iso(restobj, iso_url, boot_on_next_server_reset):
instances = restobj.search_for_type("Manager.")
for instance in instances:
rsp = restobj.rest_get(instance["href"])
rsp = restobj.rest_get(rsp.dict["links"]["VirtualMedia"]["href"])
for vmlink in rsp.dict["links"]["Member"]:
response = restobj.rest_get(vmlink["href"])
if response.status == 200 and "DVD" in response.dict["MediaTypes"]:
body = {"Image": iso_url}
if (iso_url is not None and \
boot_on_next_server_reset is not None):
body["Oem"] = {"Hp": {"BootOnNextServerReset": \
boot_on_next_server_reset}}
response = restobj.rest_patch(vmlink["href"], body)
restobj.error_handler(response)
This code here helps a little but i need it so when rebooting it, it reboots straight into the iso.