White Papers

22 Implementation of the DMTF Redfish API on Dell EMC PowerEdge Servers
Output:
Status Code: 400
Extended Info Message: {u'error': {u'code': u'Base.1.0.GeneralError',
u'message': u'A general error has occurred. See ExtendedInfo for more
information', u'@Message.ExtendedInfo': [{u'Severity': u'Warning', u'MessageId':
u'Base.1.0.PropertyValueTypeError', u'RelatedProperties': [u'HostName'],
u'Message': u'The value integer or boolean for the property HostName is of a
different type than the property can accept.', u'Resolution': u'Correct the
value for the property in the request body and resubmit the request if the
operation failed.', u'MessageArgs': [u'integer or boolean', u'HostName']}]}}
If there are internal processing errors for a request, a 500 status code will be returned with an internal error
message:
Output:
Status Code: 500
Extended Info Message: {u'error': {u'code': u'Base.1.0.GeneralError',
u'message': u'A general error has occurred. See ExtendedInfo for more
information', u'@Message.ExtendedInfo': [{u'Severity': u'Critical',
u'MessageId': u'Base.1.0.InternalError', u'RelatedProperties': [u'HostName'],
u'Message': u'The request failed due to an internal service error. The service
is still operational.', u'Resolution': u'Resubmit the request. If the problem
persists, consider resetting the service.'}]}}
The same approach is implemented for POST and DELETE operations.
3.3.9 Change boot device temporarily
Instructing a server to boot once into BIOS or to boot from an alternate source, such as PXE can be done by
modifying the BootSourceOverrideTarget value. Note that a PATCH action is required because the script
updates the existing boot target value.
import requests
import json
url = 'https://<iDRAC IP>/redfish/v1/Systems/System.Embedded.1'
payload = {'Boot': {'BootSourceOverrideTarget': 'BiosSetup'} }
headers = {'content-type': 'application/json'}
response = requests.patch(url, data=json.dumps(payload), headers=headers,
verify=False, auth=('root','calvin'))