Mount virtual media ISO - HewlettPackard/python-ilorest-library GitHub Wiki

If not created already, create an instance of Rest or Redfish Object using the RestObject or RedfishObject class respectively. The class constructor takes iLO hostname/ ip address, iLO login username and password as arguments. The class also initializes a login session, gets systems resources and message registries.

Rest Object creation:

:

Redfish Object creation:

:

Example 17: Mount virtual media ISO

The method ex17_mount_virtual_media_iso takes an instance of rest object ( redfish object if using Redfish API ) , ISO image url and boolean boot on next server as arguments. The method mounts an ISO to virtual media and optionally specifies whether it should be the boot target for the next server reset. If iso_url is left out, it unmounts the iso image. If boot_on_next_server_reset is left out the option is not set.

:

Find and get the system resource for manager.

:

Send HTTP GET request to the manager URI(s).

:

Virtual media URI link found from the response body is used for another GET request.

:

For each virtual media link URI send a GET request.

:

For each virtual media link with successful respone status and dvd media type support, prepare the request body.

:

PATCH request is performed and the response is checked, response 400 is found if virtual media is already in this state.

:

⚠️ **GitHub.com Fallback** ⚠️