Using Maas 3.1
I’m using redfish for oob management for our HP servers, and while thing are working ok for the most part. I noticed that when doing the commision and/or deploy the redfish api call made to support the one time boot sets the server to “Network Device” instead of “HTTP boot”. This translate to the Server (HP) defaulting to PXE/TFTP (extremely slow) rather than HTTP (blazing fast)…
Looking over the code (redfish.py) , it seems the following could be customized for our specific need.
For HP / ILO5 - BootSourceOverrideTarget@Redfish.AllowableValues supports “UefiHttp”
it seems we could use the response from BootSourceOverrideTarget@Redfish.AllowableValues and make it available to choose what option we desire to use when doing one time network boot…
Any chance to get this added in some way…? Until then I’ll customize the code below
@inlineCallbacks
def set_pxe_boot(self, url, node_id, headers):
"""Set the machine with node_id to PXE boot."""
endpoint = join(REDFISH_SYSTEMS_ENDPOINT, b"%s" % node_id)
payload = FileBodyProducer(
BytesIO(
json.dumps(
{
"Boot": {
"BootSourceOverrideEnabled": "Once",
"BootSourceOverrideTarget": "Pxe",
}
}
).encode("utf-8")
)
)
etag = yield self.get_etag(url, node_id, headers)
if etag:
headers.addRawHeader(b"If-Match", etag)
yield self.redfish_request(
b"PATCH", join(url, endpoint), headers, payload
)