Debian Codegraph @

ansible_collections/cisco/meraki/plugins/modules/networks_switch_stacks.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_switch_stacks
9 short_description: Resource module for networks _switch _stacks
10 description:
11 - Manage operations create and delete of the resource networks _switch _stacks.
12 - Create a switch stack.
13 - Delete a stack.
14 version_added: '1.0.0'
15 extends_documentation_fragment:
16 - cisco.meraki.module
17 author: Francisco Munoz (@fmunoz)
18 options:
19 name:
20 description: The name of the new stack.
21 type: str
22 networkId:
23 description: NetworkId path parameter. Network ID.
24 type: str
25 serials:
26 description: An array of switch serials to be added into the new stack.
27 elements: str
28 type: list
29 switchStackId:
30 description: SwitchStackId path parameter. Switch stack ID.
31 type: str
32 requirements:
33 - meraki >= 2.4.9
34 - python >= 3.5
35 seealso:
36 - name: Cisco Meraki documentation for switch createNetworkSwitchStack
37 description: Complete reference of the createNetworkSwitchStack API.
38 link: https://developer.cisco.com/meraki/api-v1/#!create-network-switch-stack
39 - name: Cisco Meraki documentation for switch deleteNetworkSwitchStack
40 description: Complete reference of the deleteNetworkSwitchStack API.
41 link: https://developer.cisco.com/meraki/api-v1/#!delete-network-switch-stack
42 notes:
43 - SDK Method used are
44 switch.Switch.create_network_switch_stack,
45 switch.Switch.delete_network_switch_stack,
46 - Paths used are
47 post /networks/{networkId}/switch/stacks,
48 delete /networks/{networkId}/switch/stacks/{switchStackId},
49 """
50
51 EXAMPLES = r"""
52 - name: Create
53 cisco.meraki.networks_switch_stacks:
54 meraki_api_key: "{{ meraki_api_key }}"
55 meraki_base_url: "{{ meraki_base_url }}"
56 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
57 meraki_certificate_path: "{{ meraki_certificate_path }}"
58 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
59 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
60 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
61 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
62 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
63 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
64 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
65 meraki_output_log: "{{ meraki_output_log }}"
66 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
67 meraki_log_path: "{{ meraki_log_path }}"
68 meraki_print_console: "{{ meraki_print_console }}"
69 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
70 meraki_simulate: "{{ meraki_simulate }}"
71 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
72 meraki_caller: "{{ meraki_caller }}"
73 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
74 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
75 state: present
76 name: A cool stack
77 networkId: string
78 serials:
79 - QBZY-XWVU-TSRQ
80 - QBAB-CDEF-GHIJ
81 - name: Delete by id
82 cisco.meraki.networks_switch_stacks:
83 meraki_api_key: "{{ meraki_api_key }}"
84 meraki_base_url: "{{ meraki_base_url }}"
85 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
86 meraki_certificate_path: "{{ meraki_certificate_path }}"
87 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
88 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
89 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
90 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
91 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
92 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
93 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
94 meraki_output_log: "{{ meraki_output_log }}"
95 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
96 meraki_log_path: "{{ meraki_log_path }}"
97 meraki_print_console: "{{ meraki_print_console }}"
98 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
99 meraki_simulate: "{{ meraki_simulate }}"
100 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
101 meraki_caller: "{{ meraki_caller }}"
102 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
103 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
104 state: absent
105 networkId: string
106 switchStackId: string
107 """
108 RETURN = r"""
109 meraki_response:
110 description: A dictionary or list with the response returned by the Cisco Meraki Python SDK
111 returned: always
112 type: dict
113 sample: >
114 {
115 "id": "string",
116 "name": "string",
117 "serials": [
118 "string"
119 ],
120 "workflowId": "string"
121 }
122 """