Debian Codegraph @

ansible_collections/dellemc/enterprise_sonic/docs/dellemc.enterprise_sonic.sonic_image_management_module.rst

raw
1 .. _dellemc.enterprise_sonic.sonic_image_management_module:
2
3
4 ***********************************************
5 dellemc.enterprise_sonic.sonic_image_management
6 ***********************************************
7
8 **Manage installation of Enterprise SONiC image, software patch and firmware updater**
9
10
11 Version added: 2.4.0
12
13 .. contents::
14 :local:
15 :depth: 1
16
17
18 Synopsis
19 --------
20 - Manage installation of Enterprise SONiC image, software patch and firmware updater.
21
22
23
24
25 Parameters
26 ----------
27
28 .. raw:: html
29
30 <table border=0 cellpadding=0 class="documentation-table">
31 <tr>
32 <th colspan="2">Parameter</th>
33 <th>Choices/<font color="blue">Defaults</font></th>
34 <th width="100%">Comments</th>
35 </tr>
36 <tr>
37 <td colspan="2">
38 <div class="ansibleOptionAnchor" id="parameter-"></div>
39 <b>firmware</b>
40 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
41 <div style="font-size: small">
42 <span style="color: purple">dictionary</span>
43 </div>
44 </td>
45 <td>
46 </td>
47 <td>
48 <div>Manage installation of Firmware updater</div>
49 </td>
50 </tr>
51 <tr>
52 <td class="elbow-placeholder"></td>
53 <td colspan="1">
54 <div class="ansibleOptionAnchor" id="parameter-"></div>
55 <b>command</b>
56 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
57 <div style="font-size: small">
58 <span style="color: purple">string</span>
59 / <span style="color: red">required</span>
60 </div>
61 </td>
62 <td>
63 <ul style="margin: 0; padding: 0"><b>Choices:</b>
64 <li>install</li>
65 <li>cancel</li>
66 <li>get-list</li>
67 <li>get-status</li>
68 </ul>
69 </td>
70 <td>
71 <div>Specifies the firmware updater manangement operation to be performed.</div>
72 <div><code>install</code> - Stage firmware updater specified by <em>path</em>.</div>
73 <div><code>cancel</code> - Cancel a pending firmware updater.</div>
74 <div><code>get-list</code> - Retrieve details of pending firmware updater and result of installed firmware updater.</div>
75 <div><code>get-status</code> - Retrieve firmware updater staging status.</div>
76 </td>
77 </tr>
78 <tr>
79 <td class="elbow-placeholder"></td>
80 <td colspan="1">
81 <div class="ansibleOptionAnchor" id="parameter-"></div>
82 <b>path</b>
83 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
84 <div style="font-size: small">
85 <span style="color: purple">string</span>
86 </div>
87 </td>
88 <td>
89 </td>
90 <td>
91 <div>When <em>command=install</em>, specifies the path of the firmware updater to be staged.</div>
92 <div>Path can be a file in the device (file://filepath) or URL (http:// or https://).</div>
93 </td>
94 </tr>
95
96 <tr>
97 <td colspan="2">
98 <div class="ansibleOptionAnchor" id="parameter-"></div>
99 <b>image</b>
100 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
101 <div style="font-size: small">
102 <span style="color: purple">dictionary</span>
103 </div>
104 </td>
105 <td>
106 </td>
107 <td>
108 <div>Manage installation of Enterprise SONiC image.</div>
109 </td>
110 </tr>
111 <tr>
112 <td class="elbow-placeholder"></td>
113 <td colspan="1">
114 <div class="ansibleOptionAnchor" id="parameter-"></div>
115 <b>command</b>
116 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
117 <div style="font-size: small">
118 <span style="color: purple">string</span>
119 / <span style="color: red">required</span>
120 </div>
121 </td>
122 <td>
123 <ul style="margin: 0; padding: 0"><b>Choices:</b>
124 <li>install</li>
125 <li>cancel</li>
126 <li>remove</li>
127 <li>set-default</li>
128 <li>get-list</li>
129 <li>get-status</li>
130 <li>gpg-key</li>
131 <li>verify</li>
132 </ul>
133 </td>
134 <td>
135 <div>Specifies the image manangement operation to be performed.</div>
136 <div><code>install</code> - Install image specified by <em>path</em>.</div>
137 <div><code>cancel</code> - Cancel image installation.</div>
138 <div><code>remove</code> - Remove image specified by <em>name</em>.</div>
139 <div><code>set-default</code> - Set the image specified by <em>name</em> as default boot image.</div>
140 <div><code>get-list</code> - Retrieve list of installed images.</div>
141 <div><code>get-status</code> - Retrieve image installation status.</div>
142 <div><code>gpg-key</code> - Install GPG key.</div>
143 <div><code>verify</code> - Verify the image specified by <em>path</em> using GPG or PKI method.</div>
144 </td>
145 </tr>
146 <tr>
147 <td class="elbow-placeholder"></td>
148 <td colspan="1">
149 <div class="ansibleOptionAnchor" id="parameter-"></div>
150 <b>keyserver</b>
151 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
152 <div style="font-size: small">
153 <span style="color: purple">string</span>
154 </div>
155 <div style="font-style: italic; font-size: small; color: darkgreen">added in 3.0.0</div>
156 </td>
157 <td>
158 </td>
159 <td>
160 <div>GPG Key server URL.</div>
161 <div>Required when <em>command=gpg-key</em>.</div>
162 </td>
163 </tr>
164 <tr>
165 <td class="elbow-placeholder"></td>
166 <td colspan="1">
167 <div class="ansibleOptionAnchor" id="parameter-"></div>
168 <b>name</b>
169 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
170 <div style="font-size: small">
171 <span style="color: purple">string</span>
172 </div>
173 </td>
174 <td>
175 </td>
176 <td>
177 <div>When <em>command=remove</em> or <em>command=set-default</em> specifies the name of the image.</div>
178 <div>When <em>command=remove</em>, name can be specified as <code>all</code> to remove all images which are not current or next.</div>
179 </td>
180 </tr>
181 <tr>
182 <td class="elbow-placeholder"></td>
183 <td colspan="1">
184 <div class="ansibleOptionAnchor" id="parameter-"></div>
185 <b>path</b>
186 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
187 <div style="font-size: small">
188 <span style="color: purple">string</span>
189 </div>
190 </td>
191 <td>
192 </td>
193 <td>
194 <div>When <em>command=install</em> or <em>command=verify</em> specifies the path of the image to be installed.</div>
195 <div>Path can be a file in the device (file://filepath) or URL (http:// or https://).</div>
196 </td>
197 </tr>
198 <tr>
199 <td class="elbow-placeholder"></td>
200 <td colspan="1">
201 <div class="ansibleOptionAnchor" id="parameter-"></div>
202 <b>pubkeyfilename</b>
203 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
204 <div style="font-size: small">
205 <span style="color: purple">string</span>
206 </div>
207 <div style="font-style: italic; font-size: small; color: darkgreen">added in 3.0.0</div>
208 </td>
209 <td>
210 </td>
211 <td>
212 <div>Specifies the certificate for signature file.</div>
213 <div>Required when <em>command=verify</em> and <em>verifymethod=pki</em>.</div>
214 </td>
215 </tr>
216 <tr>
217 <td class="elbow-placeholder"></td>
218 <td colspan="1">
219 <div class="ansibleOptionAnchor" id="parameter-"></div>
220 <b>pubkeyid</b>
221 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
222 <div style="font-size: small">
223 <span style="color: purple">string</span>
224 </div>
225 <div style="font-style: italic; font-size: small; color: darkgreen">added in 3.0.0</div>
226 </td>
227 <td>
228 </td>
229 <td>
230 <div>GPG Key ID to be installed.</div>
231 <div>Required when <em>command=gpg-key</em>.</div>
232 </td>
233 </tr>
234 <tr>
235 <td class="elbow-placeholder"></td>
236 <td colspan="1">
237 <div class="ansibleOptionAnchor" id="parameter-"></div>
238 <b>signaturefile</b>
239 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
240 <div style="font-size: small">
241 <span style="color: purple">string</span>
242 </div>
243 <div style="font-style: italic; font-size: small; color: darkgreen">added in 3.0.0</div>
244 </td>
245 <td>
246 </td>
247 <td>
248 <div>GPG/PKI file to be verified.</div>
249 <div>Required when <em>command=verify</em>.</div>
250 </td>
251 </tr>
252 <tr>
253 <td class="elbow-placeholder"></td>
254 <td colspan="1">
255 <div class="ansibleOptionAnchor" id="parameter-"></div>
256 <b>verifymethod</b>
257 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
258 <div style="font-size: small">
259 <span style="color: purple">string</span>
260 </div>
261 <div style="font-style: italic; font-size: small; color: darkgreen">added in 3.0.0</div>
262 </td>
263 <td>
264 <ul style="margin: 0; padding: 0"><b>Choices:</b>
265 <li>gpg</li>
266 <li>pki</li>
267 </ul>
268 </td>
269 <td>
270 <div>Image verification GPG or PKI method</div>
271 <div>Required when <em>command=verify</em>.</div>
272 </td>
273 </tr>
274
275 <tr>
276 <td colspan="2">
277 <div class="ansibleOptionAnchor" id="parameter-"></div>
278 <b>patch</b>
279 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
280 <div style="font-size: small">
281 <span style="color: purple">dictionary</span>
282 </div>
283 </td>
284 <td>
285 </td>
286 <td>
287 <div>Manage installation of software patch.</div>
288 </td>
289 </tr>
290 <tr>
291 <td class="elbow-placeholder"></td>
292 <td colspan="1">
293 <div class="ansibleOptionAnchor" id="parameter-"></div>
294 <b>command</b>
295 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
296 <div style="font-size: small">
297 <span style="color: purple">string</span>
298 / <span style="color: red">required</span>
299 </div>
300 </td>
301 <td>
302 <ul style="margin: 0; padding: 0"><b>Choices:</b>
303 <li>install</li>
304 <li>rollback</li>
305 <li>get-history</li>
306 <li>get-list</li>
307 <li>get-status</li>
308 </ul>
309 </td>
310 <td>
311 <div>Specifies the patch manangement operation to be performed.</div>
312 <div><code>install</code> - Install patch specified by <em>path</em>.</div>
313 <div><code>rollback</code> - Remove an installed patch specified by <em>name</em>.</div>
314 <div><code>get-history</code> - Retrieve history of patches applied/rolled back.</div>
315 <div><code>get-list</code> - Retrieve list of installed patches.</div>
316 <div><code>get-status</code> - Retrieve patch installation/removal status.</div>
317 </td>
318 </tr>
319 <tr>
320 <td class="elbow-placeholder"></td>
321 <td colspan="1">
322 <div class="ansibleOptionAnchor" id="parameter-"></div>
323 <b>name</b>
324 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
325 <div style="font-size: small">
326 <span style="color: purple">string</span>
327 </div>
328 </td>
329 <td>
330 </td>
331 <td>
332 <div>When <em>command=rollback</em>, specifies the name of the patch.</div>
333 </td>
334 </tr>
335 <tr>
336 <td class="elbow-placeholder"></td>
337 <td colspan="1">
338 <div class="ansibleOptionAnchor" id="parameter-"></div>
339 <b>path</b>
340 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
341 <div style="font-size: small">
342 <span style="color: purple">string</span>
343 </div>
344 </td>
345 <td>
346 </td>
347 <td>
348 <div>When <em>command=install</em>, specifies the path of the patch to be installed.</div>
349 <div>Path can be a file in the device (file://filepath) or URL (http:// or https://).</div>
350 </td>
351 </tr>
352
353 </table>
354 <br/>
355
356
357
358
359 Examples
360 --------
361
362 .. code-block:: yaml
363
364 - name: Install Enterprise SONiC image
365 dellemc.enterprise_sonic.sonic_image_management:
366 image:
367 command: install
368 path: 'file://home/admin/sonic.bin'
369
370 - name: Get image installation status
371 dellemc.enterprise_sonic.sonic_image_management:
372 image:
373 command: get-status
374
375 - name: Get list of installed images
376 dellemc.enterprise_sonic.sonic_image_management:
377 image:
378 command: get-list
379
380 - name: Stage a firmware updater
381 dellemc.enterprise_sonic.sonic_image_management:
382 firmware:
383 command: install
384 path: 'file://home/admin/onie-update-full.bin'
385
386 - name: Install GPG Key for image verification
387 dellemc.enterprise_sonic.sonic_image_management:
388 image:
389 command: gpg-key
390 keyserver: 'hkp://keyserver.ubuntu.com:80'
391 pubkeyid: 'DAFWQGEW12345678'
392
393 - name: Verify Enterprise SONiC image
394 dellemc.enterprise_sonic.sonic_image_management:
395 image:
396 command: verify
397 path: 'home://sonic.bin'
398 verifymethod: 'gpg'
399 signaturefile: 'sign.gpg'
400
401
402
403 Return Values
404 -------------
405 Common return values are documented `here <https://docs.ansible.com/projects/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
406
407 .. raw:: html
408
409 <table border=0 cellpadding=0 class="documentation-table">
410 <tr>
411 <th colspan="1">Key</th>
412 <th>Returned</th>
413 <th width="100%">Description</th>
414 </tr>
415 <tr>
416 <td colspan="1">
417 <div class="ansibleOptionAnchor" id="return-"></div>
418 <b>info</b>
419 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
420 <div style="font-size: small">
421 <span style="color: purple">dictionary</span>
422 </div>
423 </td>
424 <td>when <em>command=get-status</em> or <em>command=get-list</em> or <em>command=get-history</em></td>
425 <td>
426 <div>Details returned by the specified get operation.</div>
427 <br/>
428 <div style="font-size: smaller"><b>Sample:</b></div>
429 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{
430 &quot;file-download-speed&quot; : &quot;106200&quot;,
431 &quot;file-progress&quot; : 100,
432 &quot;file-size&quot; : &quot;1304997870&quot;,
433 &quot;file-transfer-bytes&quot; : &quot;1304997870&quot;,
434 &quot;install-end-time&quot; : &quot;1695714740&quot;,
435 &quot;install-start-time&quot; : &quot;1695714698&quot;,
436 &quot;install-status&quot; : &quot;INSTALL_STATE_SUCCESS&quot;,
437 &quot;install-status-detail&quot; : &quot;Image install success&quot;,
438 &quot;operation-status&quot; : &quot;GLOBAL_STATE_SUCCESS&quot;,
439 &quot;transfer-end-time&quot; : &quot;1695714669&quot;,
440 &quot;transfer-start-time&quot; : &quot;1695714657&quot;,
441 &quot;transfer-status&quot; : &quot;TRANSFER_STATE_SUCCESS&quot;,
442 &quot;transfer-status-detail&quot; : &quot;DOWNLOADING IMAGE&quot;
443 }</div>
444 </td>
445 </tr>
446 <tr>
447 <td colspan="1">
448 <div class="ansibleOptionAnchor" id="return-"></div>
449 <b>status</b>
450 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
451 <div style="font-size: small">
452 <span style="color: purple">string</span>
453 </div>
454 </td>
455 <td>when <em>command</em> is not <code>get-status</code>, <code>get-list</code> and <code>get-history</code></td>
456 <td>
457 <div>Status of the operation performed.</div>
458 <br/>
459 <div style="font-size: smaller"><b>Sample:</b></div>
460 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">SUCCESS</div>
461 </td>
462 </tr>
463 </table>
464 <br/><br/>
465
466
467 Status
468 ------
469
470
471 Authors
472 ~~~~~~~
473
474 - Arun Saravanan Balachandran (@ArunSaravananBalachandran), Aravind Mani (@aravindmani-1)