| 1 |
.. _redfish_firmware_module: |
| 2 |
|
| 3 |
|
| 4 |
redfish_firmware -- To perform a component firmware update using the image file available on the local or remote system |
| 5 |
======================================================================================================================= |
| 6 |
|
| 7 |
.. contents:: |
| 8 |
:local: |
| 9 |
:depth: 1 |
| 10 |
|
| 11 |
|
| 12 |
Synopsis |
| 13 |
-------- |
| 14 |
|
| 15 |
This module allows the firmware update of only one component at a time. If the module is run for more than one component, an error message is returned. |
| 16 |
|
| 17 |
Depending on the component, the firmware update is applied after an automatic or manual reboot. |
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
Requirements |
| 22 |
------------ |
| 23 |
The below requirements are needed on the host that executes this module. |
| 24 |
|
| 25 |
- python \>= 3.9.6 |
| 26 |
- urllib3 |
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
Parameters |
| 31 |
---------- |
| 32 |
|
| 33 |
image_uri (True, str, None) |
| 34 |
Firmware Image location URI or local path. |
| 35 |
|
| 36 |
For example- \ http://%3Cweb_address%3E/components.exe\ or /home/firmware\_repo/component.exe. |
| 37 |
|
| 38 |
|
| 39 |
transfer_protocol (optional, str, HTTP) |
| 40 |
Protocol used to transfer the firmware image file. Applicable for URI based update. |
| 41 |
|
| 42 |
|
| 43 |
job_wait (optional, bool, True) |
| 44 |
Provides the option to wait for job completion. |
| 45 |
|
| 46 |
|
| 47 |
job_wait_timeout (optional, int, 3600) |
| 48 |
The maximum wait time of \ :emphasis:`job\_wait`\ in seconds. The job is tracked only for this duration. |
| 49 |
|
| 50 |
This option is applicable when \ :emphasis:`job\_wait`\ is \ :literal:`true`\ . |
| 51 |
|
| 52 |
Note: If a firmware update needs a reboot, the job will get scheduled and waits for no of seconds specfied in \ :emphasis:`job\_wait\_time`\ . to reduce the wait time either give \ :emphasis:`job\_wait\_time`\ minimum or make \ :emphasis:`job\_wait`\ as false and retrigger. |
| 53 |
|
| 54 |
|
| 55 |
baseuri (True, str, None) |
| 56 |
IP address of the target out-of-band controller. For example- \<ipaddress\>:\<port\>. |
| 57 |
|
| 58 |
|
| 59 |
username (False, str, None) |
| 60 |
Username of the target out-of-band controller. |
| 61 |
|
| 62 |
If the username is not provided, then the environment variable \ :envvar:`IDRAC\_USERNAME`\ is used. |
| 63 |
|
| 64 |
Example: export IDRAC\_USERNAME=username |
| 65 |
|
| 66 |
|
| 67 |
password (False, str, None) |
| 68 |
Password of the target out-of-band controller. |
| 69 |
|
| 70 |
If the password is not provided, then the environment variable \ :envvar:`IDRAC\_PASSWORD`\ is used. |
| 71 |
|
| 72 |
Example: export IDRAC\_PASSWORD=password |
| 73 |
|
| 74 |
|
| 75 |
x_auth_token (False, str, None) |
| 76 |
Authentication token. |
| 77 |
|
| 78 |
If the x\_auth\_token is not provided, then the environment variable \ :envvar:`IDRAC\_X\_AUTH\_TOKEN`\ is used. |
| 79 |
|
| 80 |
Example: export IDRAC\_X\_AUTH\_TOKEN=x\_auth\_token |
| 81 |
|
| 82 |
|
| 83 |
validate_certs (optional, bool, True) |
| 84 |
If \ :literal:`false`\ , the SSL certificates will not be validated. |
| 85 |
|
| 86 |
Configure \ :literal:`false`\ only on personally controlled sites where self-signed certificates are used. |
| 87 |
|
| 88 |
Prior to collection version \ :literal:`5.0.0`\ , the \ :emphasis:`validate\_certs`\ is \ :literal:`false`\ by default. |
| 89 |
|
| 90 |
|
| 91 |
ca_path (optional, path, None) |
| 92 |
The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. |
| 93 |
|
| 94 |
|
| 95 |
timeout (optional, int, 30) |
| 96 |
The socket level timeout in seconds. |
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
Notes |
| 103 |
----- |
| 104 |
|
| 105 |
.. note:: |
| 106 |
- Run this module from a system that has direct access to Redfish APIs. |
| 107 |
- This module supports both IPv4 and IPv6 addresses. |
| 108 |
- This module supports only iDRAC9 and above. |
| 109 |
- This module does not support \ :literal:`check\_mode`\ . |
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
Examples |
| 115 |
-------- |
| 116 |
|
| 117 |
.. code-block:: yaml+jinja |
| 118 |
|
| 119 |
|
| 120 |
--- |
| 121 |
- name: Update the firmware from a single executable file available in a HTTP protocol |
| 122 |
dellemc.openmanage.redfish_firmware: |
| 123 |
baseuri: "192.168.0.1" |
| 124 |
username: "user_name" |
| 125 |
password: "user_password" |
| 126 |
ca_path: "/path/to/ca_cert.pem" |
| 127 |
image_uri: "http://192.168.0.2/firmware_repo/component.exe" |
| 128 |
transfer_protocol: "HTTP" |
| 129 |
|
| 130 |
- name: Update the firmware from a single executable file available in a HTTP protocol with job_Wait |
| 131 |
dellemc.openmanage.redfish_firmware: |
| 132 |
baseuri: "192.168.0.1" |
| 133 |
username: "user_name" |
| 134 |
password: "user_password" |
| 135 |
ca_path: "/path/to/ca_cert.pem" |
| 136 |
image_uri: "http://192.168.0.2/firmware_repo/component.exe" |
| 137 |
transfer_protocol: "HTTP" |
| 138 |
job_wait: true |
| 139 |
job_wait_timeout: 600 |
| 140 |
|
| 141 |
- name: Update the firmware from a single executable file available in a local path |
| 142 |
dellemc.openmanage.redfish_firmware: |
| 143 |
baseuri: "192.168.0.1" |
| 144 |
username: "user_name" |
| 145 |
password: "user_password" |
| 146 |
ca_path: "/path/to/ca_cert.pem" |
| 147 |
image_uri: "/home/firmware_repo/component.exe" |
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
Return Values |
| 152 |
------------- |
| 153 |
|
| 154 |
msg (always, str, Successfully updated the firmware.) |
| 155 |
Overall status of the firmware update task. |
| 156 |
|
| 157 |
|
| 158 |
task (success, dict, {'id': 'JID_XXXXXXXXXXXX', 'uri': '/redfish/v1/TaskService/Tasks/JID_XXXXXXXXXXXX'}) |
| 159 |
Returns ID and URI of the created task. |
| 160 |
|
| 161 |
|
| 162 |
error_info (on http error, dict, {'error': {'@Message.ExtendedInfo': [{'Message': 'Unable to complete the operation because the JSON data format entered is invalid.', 'Resolution': 'Do the following and the retry the operation: 1) Enter the correct JSON data format and retry the operation. 2) Make sure that no syntax error is present in JSON data format. 3) Make sure that a duplicate key is not present in JSON data format.', 'Severity': 'Critical'}, {'Message': 'The request body submitted was malformed JSON and could not be parsed by the receiving service.', 'Resolution': 'Ensure that the request body is valid JSON and resubmit the request.', 'Severity': 'Critical'}], 'code': 'Base.1.2.GeneralError', 'message': 'A general error has occurred. See ExtendedInfo for more information.'}}) |
| 163 |
Details of http error. |
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
|
| 169 |
Status |
| 170 |
------ |
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
|
| 176 |
Authors |
| 177 |
~~~~~~~ |
| 178 |
|
| 179 |
- Felix Stephen (@felixs88) |
| 180 |
- Husniya Hameed (@husniya_hameed) |
| 181 |
- Shivam Sharma (@Shivam-Sharma) |
| 182 |
- Kritika Bhateja (@Kritika_Bhateja) |
| 183 |
- Abhishek Sinha (@ABHISHEK-SINHA10) |
| 184 |
|