Debian Codegraph @

ansible_collections/cisco/meraki/plugins/modules/networks_firmware_upgrades.py

raw
1 #!/usr/bin/python
2 # -*- coding: utf-8 -*-
3
4 # Copyright (c) 2021, Cisco Systems
5 # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
6
7 DOCUMENTATION = r"""
8 module: networks_firmware_upgrades
9 short_description: Resource module for networks _firmwareupgrades
10 description:
11 - Manage operation update of the resource networks _firmwareupgrades.
12 - Update firmware upgrade information for a network.
13 version_added: '1.0.0'
14 extends_documentation_fragment:
15 - cisco.meraki.module
16 author: Francisco Munoz (@fmunoz)
17 options:
18 networkId:
19 description: NetworkId path parameter. Network ID.
20 type: str
21 products:
22 description: Contains information about the network to update.
23 suboptions:
24 appliance:
25 description: The network device to be updated.
26 suboptions:
27 nextUpgrade:
28 description: The pending firmware upgrade if it exists.
29 suboptions:
30 time:
31 description: The time of the last successful upgrade.
32 type: str
33 toVersion:
34 description: The version to be updated to.
35 suboptions:
36 id:
37 description: The version ID.
38 type: str
39 type: dict
40 type: dict
41 participateInNextBetaRelease:
42 description: Whether or not the network wants beta firmware.
43 type: bool
44 type: dict
45 camera:
46 description: The network device to be updated.
47 suboptions:
48 nextUpgrade:
49 description: The pending firmware upgrade if it exists.
50 suboptions:
51 time:
52 description: The time of the last successful upgrade.
53 type: str
54 toVersion:
55 description: The version to be updated to.
56 suboptions:
57 id:
58 description: The version ID.
59 type: str
60 type: dict
61 type: dict
62 participateInNextBetaRelease:
63 description: Whether or not the network wants beta firmware.
64 type: bool
65 type: dict
66 cellularGateway:
67 description: The network device to be updated.
68 suboptions:
69 nextUpgrade:
70 description: The pending firmware upgrade if it exists.
71 suboptions:
72 time:
73 description: The time of the last successful upgrade.
74 type: str
75 toVersion:
76 description: The version to be updated to.
77 suboptions:
78 id:
79 description: The version ID.
80 type: str
81 type: dict
82 type: dict
83 participateInNextBetaRelease:
84 description: Whether or not the network wants beta firmware.
85 type: bool
86 type: dict
87 secureConnect:
88 description: The network device to be updated.
89 suboptions:
90 nextUpgrade:
91 description: The pending firmware upgrade if it exists.
92 suboptions:
93 time:
94 description: The time of the last successful upgrade.
95 type: str
96 toVersion:
97 description: The version to be updated to.
98 suboptions:
99 id:
100 description: The version ID.
101 type: str
102 type: dict
103 type: dict
104 participateInNextBetaRelease:
105 description: Whether or not the network wants beta firmware.
106 type: bool
107 type: dict
108 sensor:
109 description: The network device to be updated.
110 suboptions:
111 nextUpgrade:
112 description: The pending firmware upgrade if it exists.
113 suboptions:
114 time:
115 description: The time of the last successful upgrade.
116 type: str
117 toVersion:
118 description: The version to be updated to.
119 suboptions:
120 id:
121 description: The version ID.
122 type: str
123 type: dict
124 type: dict
125 participateInNextBetaRelease:
126 description: Whether or not the network wants beta firmware.
127 type: bool
128 type: dict
129 switch:
130 description: The network device to be updated.
131 suboptions:
132 nextUpgrade:
133 description: The pending firmware upgrade if it exists.
134 suboptions:
135 time:
136 description: The time of the last successful upgrade.
137 type: str
138 toVersion:
139 description: The version to be updated to.
140 suboptions:
141 id:
142 description: The version ID.
143 type: str
144 type: dict
145 type: dict
146 participateInNextBetaRelease:
147 description: Whether or not the network wants beta firmware.
148 type: bool
149 type: dict
150 switchCatalyst:
151 description: The network device to be updated.
152 suboptions:
153 nextUpgrade:
154 description: The pending firmware upgrade if it exists.
155 suboptions:
156 time:
157 description: The time of the last successful upgrade.
158 type: str
159 toVersion:
160 description: The version to be updated to.
161 suboptions:
162 id:
163 description: The version ID.
164 type: str
165 type: dict
166 type: dict
167 participateInNextBetaRelease:
168 description: Whether or not the network wants beta firmware.
169 type: bool
170 type: dict
171 wireless:
172 description: The network device to be updated.
173 suboptions:
174 nextUpgrade:
175 description: The pending firmware upgrade if it exists.
176 suboptions:
177 time:
178 description: The time of the last successful upgrade.
179 type: str
180 toVersion:
181 description: The version to be updated to.
182 suboptions:
183 id:
184 description: The version ID.
185 type: str
186 type: dict
187 type: dict
188 participateInNextBetaRelease:
189 description: Whether or not the network wants beta firmware.
190 type: bool
191 type: dict
192 wirelessController:
193 description: The network device to be updated.
194 suboptions:
195 nextUpgrade:
196 description: The pending firmware upgrade if it exists.
197 suboptions:
198 time:
199 description: The time of the last successful upgrade.
200 type: str
201 toVersion:
202 description: The version to be updated to.
203 suboptions:
204 id:
205 description: The version ID.
206 type: str
207 type: dict
208 type: dict
209 participateInNextBetaRelease:
210 description: Whether or not the network wants beta firmware.
211 type: bool
212 type: dict
213 type: dict
214 timezone:
215 description: The timezone for the network.
216 type: str
217 upgradeWindow:
218 description: Upgrade window for devices in network.
219 suboptions:
220 dayOfWeek:
221 description: Day of the week.
222 type: str
223 hourOfDay:
224 description: Hour of the day.
225 type: str
226 type: dict
227 requirements:
228 - meraki >= 2.4.9
229 - python >= 3.5
230 seealso:
231 - name: Cisco Meraki documentation for networks updateNetworkFirmwareUpgrades
232 description: Complete reference of the updateNetworkFirmwareUpgrades API.
233 link: https://developer.cisco.com/meraki/api-v1/#!update-network-firmware-upgrades
234 notes:
235 - SDK Method used are
236 networks.Networks.update_network_firmware_upgrades,
237 - Paths used are
238 put /networks/{networkId}/firmwareUpgrades,
239 """
240
241 EXAMPLES = r"""
242 - name: Update all
243 cisco.meraki.networks_firmware_upgrades:
244 meraki_api_key: "{{ meraki_api_key }}"
245 meraki_base_url: "{{ meraki_base_url }}"
246 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
247 meraki_certificate_path: "{{ meraki_certificate_path }}"
248 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
249 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
250 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
251 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
252 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
253 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
254 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
255 meraki_output_log: "{{ meraki_output_log }}"
256 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
257 meraki_log_path: "{{ meraki_log_path }}"
258 meraki_print_console: "{{ meraki_print_console }}"
259 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
260 meraki_simulate: "{{ meraki_simulate }}"
261 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
262 meraki_caller: "{{ meraki_caller }}"
263 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
264 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
265 state: present
266 networkId: string
267 products:
268 appliance:
269 nextUpgrade:
270 time: '2019-03-17T17:22:52Z'
271 toVersion:
272 id: '1001'
273 participateInNextBetaRelease: false
274 camera:
275 nextUpgrade:
276 time: '2019-03-17T17:22:52Z'
277 toVersion:
278 id: '1003'
279 participateInNextBetaRelease: false
280 cellularGateway:
281 nextUpgrade:
282 time: '2019-03-17T17:22:52Z'
283 toVersion:
284 id: '1004'
285 participateInNextBetaRelease: false
286 secureConnect:
287 nextUpgrade:
288 time: '2019-03-17T17:22:52Z'
289 toVersion:
290 id: '1008'
291 participateInNextBetaRelease: false
292 sensor:
293 nextUpgrade:
294 time: '2019-03-17T17:22:52Z'
295 toVersion:
296 id: '1005'
297 participateInNextBetaRelease: false
298 switch:
299 nextUpgrade:
300 time: '2019-03-17T17:22:52Z'
301 toVersion:
302 id: '1002'
303 participateInNextBetaRelease: false
304 switchCatalyst:
305 nextUpgrade:
306 time: '2019-03-17T17:22:52Z'
307 toVersion:
308 id: '1234'
309 participateInNextBetaRelease: false
310 wireless:
311 nextUpgrade:
312 time: '2019-03-17T17:22:52Z'
313 toVersion:
314 id: '1000'
315 participateInNextBetaRelease: false
316 wirelessController:
317 nextUpgrade:
318 time: '2019-03-17T17:22:52Z'
319 toVersion:
320 id: '1006'
321 participateInNextBetaRelease: false
322 timezone: America/Los_Angeles
323 upgradeWindow:
324 dayOfWeek: sun
325 hourOfDay: '4:00'
326 """
327 RETURN = r"""
328 meraki_response:
329 description: A dictionary or list with the response returned by the Cisco Meraki Python SDK
330 returned: always
331 type: dict
332 sample: >
333 {
334 "upgradeWindow": {
335 "dayOfWeek": "string",
336 "hourOfDay": "string"
337 },
338 "timezone": "string",
339 "products": {
340 "wireless": {
341 "currentVersion": {
342 "id": "string",
343 "firmware": "string",
344 "shortName": "string",
345 "releaseType": "string",
346 "releaseDate": "string"
347 },
348 "lastUpgrade": {
349 "time": "string",
350 "fromVersion": {
351 "id": "string",
352 "firmware": "string",
353 "shortName": "string",
354 "releaseType": "string",
355 "releaseDate": "string"
356 },
357 "toVersion": {
358 "id": "string",
359 "firmware": "string",
360 "shortName": "string",
361 "releaseType": "string",
362 "releaseDate": "string"
363 }
364 },
365 "nextUpgrade": {
366 "time": "string",
367 "toVersion": {
368 "id": "string",
369 "firmware": "string",
370 "shortName": "string",
371 "releaseType": "string",
372 "releaseDate": "string"
373 }
374 },
375 "isUpgradeAvailable": true,
376 "availableVersions": [
377 {
378 "id": "string",
379 "firmware": "string",
380 "shortName": "string",
381 "releaseType": "string",
382 "releaseDate": "string"
383 }
384 ],
385 "participateInNextBetaRelease": true
386 },
387 "appliance": {
388 "currentVersion": {
389 "id": "string",
390 "firmware": "string",
391 "shortName": "string",
392 "releaseType": "string",
393 "releaseDate": "string"
394 },
395 "lastUpgrade": {
396 "time": "string",
397 "fromVersion": {
398 "id": "string",
399 "firmware": "string",
400 "shortName": "string",
401 "releaseType": "string",
402 "releaseDate": "string"
403 },
404 "toVersion": {
405 "id": "string",
406 "firmware": "string",
407 "shortName": "string",
408 "releaseType": "string",
409 "releaseDate": "string"
410 }
411 },
412 "nextUpgrade": {
413 "time": "string",
414 "toVersion": {
415 "id": "string",
416 "firmware": "string",
417 "shortName": "string",
418 "releaseType": "string",
419 "releaseDate": "string"
420 }
421 },
422 "isUpgradeAvailable": true,
423 "availableVersions": [
424 {
425 "id": "string",
426 "firmware": "string",
427 "shortName": "string",
428 "releaseType": "string",
429 "releaseDate": "string"
430 }
431 ],
432 "participateInNextBetaRelease": true
433 },
434 "switch": {
435 "currentVersion": {
436 "id": "string",
437 "firmware": "string",
438 "shortName": "string",
439 "releaseType": "string",
440 "releaseDate": "string"
441 },
442 "lastUpgrade": {
443 "time": "string",
444 "fromVersion": {
445 "id": "string",
446 "firmware": "string",
447 "shortName": "string",
448 "releaseType": "string",
449 "releaseDate": "string"
450 },
451 "toVersion": {
452 "id": "string",
453 "firmware": "string",
454 "shortName": "string",
455 "releaseType": "string",
456 "releaseDate": "string"
457 }
458 },
459 "nextUpgrade": {
460 "time": "string",
461 "toVersion": {
462 "id": "string",
463 "firmware": "string",
464 "shortName": "string",
465 "releaseType": "string",
466 "releaseDate": "string"
467 }
468 },
469 "isUpgradeAvailable": true,
470 "availableVersions": [
471 {
472 "id": "string",
473 "firmware": "string",
474 "shortName": "string",
475 "releaseType": "string",
476 "releaseDate": "string"
477 }
478 ],
479 "participateInNextBetaRelease": true
480 },
481 "camera": {
482 "currentVersion": {
483 "id": "string",
484 "firmware": "string",
485 "shortName": "string",
486 "releaseType": "string",
487 "releaseDate": "string"
488 },
489 "lastUpgrade": {
490 "time": "string",
491 "fromVersion": {
492 "id": "string",
493 "firmware": "string",
494 "shortName": "string",
495 "releaseType": "string",
496 "releaseDate": "string"
497 },
498 "toVersion": {
499 "id": "string",
500 "firmware": "string",
501 "shortName": "string",
502 "releaseType": "string",
503 "releaseDate": "string"
504 }
505 },
506 "nextUpgrade": {
507 "time": "string",
508 "toVersion": {
509 "id": "string",
510 "firmware": "string",
511 "shortName": "string",
512 "releaseType": "string",
513 "releaseDate": "string"
514 }
515 },
516 "isUpgradeAvailable": true,
517 "availableVersions": [
518 {
519 "id": "string",
520 "firmware": "string",
521 "shortName": "string",
522 "releaseType": "string",
523 "releaseDate": "string"
524 }
525 ],
526 "participateInNextBetaRelease": true
527 },
528 "cellularGateway": {
529 "currentVersion": {
530 "id": "string",
531 "firmware": "string",
532 "shortName": "string",
533 "releaseType": "string",
534 "releaseDate": "string"
535 },
536 "lastUpgrade": {
537 "time": "string",
538 "fromVersion": {
539 "id": "string",
540 "firmware": "string",
541 "shortName": "string",
542 "releaseType": "string",
543 "releaseDate": "string"
544 },
545 "toVersion": {
546 "id": "string",
547 "firmware": "string",
548 "shortName": "string",
549 "releaseType": "string",
550 "releaseDate": "string"
551 }
552 },
553 "nextUpgrade": {
554 "time": "string",
555 "toVersion": {
556 "id": "string",
557 "firmware": "string",
558 "shortName": "string",
559 "releaseType": "string",
560 "releaseDate": "string"
561 }
562 },
563 "isUpgradeAvailable": true,
564 "availableVersions": [
565 {
566 "id": "string",
567 "firmware": "string",
568 "shortName": "string",
569 "releaseType": "string",
570 "releaseDate": "string"
571 }
572 ],
573 "participateInNextBetaRelease": true
574 },
575 "sensor": {
576 "currentVersion": {
577 "id": "string",
578 "firmware": "string",
579 "shortName": "string",
580 "releaseType": "string",
581 "releaseDate": "string"
582 },
583 "lastUpgrade": {
584 "time": "string",
585 "fromVersion": {
586 "id": "string",
587 "firmware": "string",
588 "shortName": "string",
589 "releaseType": "string",
590 "releaseDate": "string"
591 },
592 "toVersion": {
593 "id": "string",
594 "firmware": "string",
595 "shortName": "string",
596 "releaseType": "string",
597 "releaseDate": "string"
598 }
599 },
600 "nextUpgrade": {
601 "time": "string",
602 "toVersion": {
603 "id": "string",
604 "firmware": "string",
605 "shortName": "string",
606 "releaseType": "string",
607 "releaseDate": "string"
608 }
609 },
610 "isUpgradeAvailable": true,
611 "availableVersions": [
612 {
613 "id": "string",
614 "firmware": "string",
615 "shortName": "string",
616 "releaseType": "string",
617 "releaseDate": "string"
618 }
619 ],
620 "participateInNextBetaRelease": true
621 },
622 "wirelessController": {
623 "currentVersion": {
624 "id": "string",
625 "firmware": "string",
626 "shortName": "string",
627 "releaseType": "string",
628 "releaseDate": "string"
629 },
630 "lastUpgrade": {
631 "time": "string",
632 "fromVersion": {
633 "id": "string",
634 "firmware": "string",
635 "shortName": "string",
636 "releaseType": "string",
637 "releaseDate": "string"
638 },
639 "toVersion": {
640 "id": "string",
641 "firmware": "string",
642 "shortName": "string",
643 "releaseType": "string",
644 "releaseDate": "string"
645 }
646 },
647 "nextUpgrade": {
648 "time": "string",
649 "toVersion": {
650 "id": "string",
651 "firmware": "string",
652 "shortName": "string",
653 "releaseType": "string",
654 "releaseDate": "string"
655 }
656 },
657 "isUpgradeAvailable": true,
658 "availableVersions": [
659 {
660 "id": "string",
661 "firmware": "string",
662 "shortName": "string",
663 "releaseType": "string",
664 "releaseDate": "string"
665 }
666 ],
667 "participateInNextBetaRelease": true
668 },
669 "secureConnect": {
670 "currentVersion": {
671 "id": "string",
672 "firmware": "string",
673 "shortName": "string",
674 "releaseType": "string",
675 "releaseDate": "string"
676 },
677 "lastUpgrade": {
678 "time": "string",
679 "fromVersion": {
680 "id": "string",
681 "firmware": "string",
682 "shortName": "string",
683 "releaseType": "string",
684 "releaseDate": "string"
685 },
686 "toVersion": {
687 "id": "string",
688 "firmware": "string",
689 "shortName": "string",
690 "releaseType": "string",
691 "releaseDate": "string"
692 }
693 },
694 "nextUpgrade": {
695 "time": "string",
696 "toVersion": {
697 "id": "string",
698 "firmware": "string",
699 "shortName": "string",
700 "releaseType": "string",
701 "releaseDate": "string"
702 }
703 },
704 "isUpgradeAvailable": true,
705 "availableVersions": [
706 {
707 "id": "string",
708 "firmware": "string",
709 "shortName": "string",
710 "releaseType": "string",
711 "releaseDate": "string"
712 }
713 ],
714 "participateInNextBetaRelease": true
715 }
716 }
717 }
718 """