Debian Codegraph @

ansible_collections/cisco/meraki/plugins/modules/devices_appliance_uplinks_settings.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: devices_appliance_uplinks_settings
9 short_description: Resource module for devices _appliance _uplinks _settings
10 description:
11 - Manage operation update of the resource devices _appliance _uplinks _settings.
12 - Update the uplink settings for an MX appliance.
13 version_added: '1.0.0'
14 extends_documentation_fragment:
15 - cisco.meraki.module
16 author: Francisco Munoz (@fmunoz)
17 options:
18 interfaces:
19 description: Interface settings.
20 suboptions:
21 wan1:
22 description: WAN 1 settings.
23 suboptions:
24 enabled:
25 description: Enable or disable the interface.
26 type: bool
27 pppoe:
28 description: Configuration options for PPPoE.
29 suboptions:
30 authentication:
31 description: Settings for PPPoE Authentication.
32 suboptions:
33 enabled:
34 description: Whether PPPoE authentication is enabled.
35 type: bool
36 password:
37 description: Password for PPPoE authentication. This parameter
38 is not returned.
39 type: str
40 username:
41 description: Username for PPPoE authentication.
42 type: str
43 type: dict
44 enabled:
45 description: Whether PPPoE is enabled.
46 type: bool
47 type: dict
48 svis:
49 description: SVI settings by protocol.
50 suboptions:
51 ipv4:
52 description: IPv4 settings for static/dynamic mode.
53 suboptions:
54 address:
55 description: IP address and subnet mask when in static mode.
56 type: str
57 assignmentMode:
58 description: The assignment mode for this SVI. Applies only when
59 PPPoE is disabled.
60 type: str
61 gateway:
62 description: Gateway IP address when in static mode.
63 type: str
64 nameservers:
65 description: The nameserver settings for this SVI.
66 suboptions:
67 addresses:
68 description: Up to 2 nameserver addresses to use, ordered
69 in priority from highest to lowest priority.
70 elements: str
71 type: list
72 type: dict
73 type: dict
74 ipv6:
75 description: IPv6 settings for static/dynamic mode.
76 suboptions:
77 address:
78 description: Static address that will override the one(s) received
79 by SLAAC.
80 type: str
81 assignmentMode:
82 description: The assignment mode for this SVI. Applies only when
83 PPPoE is disabled.
84 type: str
85 gateway:
86 description: Static gateway that will override the one received
87 by autoconf.
88 type: str
89 nameservers:
90 description: The nameserver settings for this SVI.
91 suboptions:
92 addresses:
93 description: Up to 2 nameserver addresses to use, ordered
94 in priority from highest to lowest priority.
95 elements: str
96 type: list
97 type: dict
98 type: dict
99 type: dict
100 vlanTagging:
101 description: VLAN tagging settings.
102 suboptions:
103 enabled:
104 description: Whether VLAN tagging is enabled.
105 type: bool
106 vlanId:
107 description: The ID of the VLAN to use for VLAN tagging.
108 type: int
109 type: dict
110 type: dict
111 wan2:
112 description: WAN 2 settings.
113 suboptions:
114 enabled:
115 description: Enable or disable the interface.
116 type: bool
117 pppoe:
118 description: Configuration options for PPPoE.
119 suboptions:
120 authentication:
121 description: Settings for PPPoE Authentication.
122 suboptions:
123 enabled:
124 description: Whether PPPoE authentication is enabled.
125 type: bool
126 password:
127 description: Password for PPPoE authentication. This parameter
128 is not returned.
129 type: str
130 username:
131 description: Username for PPPoE authentication.
132 type: str
133 type: dict
134 enabled:
135 description: Whether PPPoE is enabled.
136 type: bool
137 type: dict
138 svis:
139 description: SVI settings by protocol.
140 suboptions:
141 ipv4:
142 description: IPv4 settings for static/dynamic mode.
143 suboptions:
144 address:
145 description: IP address and subnet mask when in static mode.
146 type: str
147 assignmentMode:
148 description: The assignment mode for this SVI. Applies only when
149 PPPoE is disabled.
150 type: str
151 gateway:
152 description: Gateway IP address when in static mode.
153 type: str
154 nameservers:
155 description: The nameserver settings for this SVI.
156 suboptions:
157 addresses:
158 description: Up to 2 nameserver addresses to use, ordered
159 in priority from highest to lowest priority.
160 elements: str
161 type: list
162 type: dict
163 type: dict
164 ipv6:
165 description: IPv6 settings for static/dynamic mode.
166 suboptions:
167 address:
168 description: Static address that will override the one(s) received
169 by SLAAC.
170 type: str
171 assignmentMode:
172 description: The assignment mode for this SVI. Applies only when
173 PPPoE is disabled.
174 type: str
175 gateway:
176 description: Static gateway that will override the one received
177 by autoconf.
178 type: str
179 nameservers:
180 description: The nameserver settings for this SVI.
181 suboptions:
182 addresses:
183 description: Up to 2 nameserver addresses to use, ordered
184 in priority from highest to lowest priority.
185 elements: str
186 type: list
187 type: dict
188 type: dict
189 type: dict
190 vlanTagging:
191 description: VLAN tagging settings.
192 suboptions:
193 enabled:
194 description: Whether VLAN tagging is enabled.
195 type: bool
196 vlanId:
197 description: The ID of the VLAN to use for VLAN tagging.
198 type: int
199 type: dict
200 type: dict
201 type: dict
202 serial:
203 description: Serial path parameter.
204 type: str
205 requirements:
206 - meraki >= 2.4.9
207 - python >= 3.5
208 seealso:
209 - name: Cisco Meraki documentation for appliance updateDeviceApplianceUplinksSettings
210 description: Complete reference of the updateDeviceApplianceUplinksSettings API.
211 link: https://developer.cisco.com/meraki/api-v1/#!update-device-appliance-uplinks-settings
212 notes:
213 - SDK Method used are
214 appliance.Appliance.update_device_appliance_uplinks_settings,
215 - Paths used are
216 put /devices/{serial}/appliance/uplinks/settings,
217 """
218
219 EXAMPLES = r"""
220 - name: Update all
221 cisco.meraki.devices_appliance_uplinks_settings:
222 meraki_api_key: "{{ meraki_api_key }}"
223 meraki_base_url: "{{ meraki_base_url }}"
224 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
225 meraki_certificate_path: "{{ meraki_certificate_path }}"
226 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
227 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
228 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
229 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
230 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
231 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
232 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
233 meraki_output_log: "{{ meraki_output_log }}"
234 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
235 meraki_log_path: "{{ meraki_log_path }}"
236 meraki_print_console: "{{ meraki_print_console }}"
237 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
238 meraki_simulate: "{{ meraki_simulate }}"
239 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
240 meraki_caller: "{{ meraki_caller }}"
241 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
242 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
243 state: present
244 interfaces:
245 wan1:
246 enabled: true
247 pppoe:
248 authentication:
249 enabled: true
250 password: password
251 username: username
252 enabled: true
253 svis:
254 ipv4:
255 address: 9.10.11.10/16
256 assignmentMode: static
257 gateway: 13.14.15.16
258 nameservers:
259 addresses:
260 - 1.2.3.4
261 ipv6:
262 address: 1:2:3::4
263 assignmentMode: static
264 gateway: 1:2:3::5
265 nameservers:
266 addresses:
267 - 1001:4860:4860::8888
268 - 1001:4860:4860::8844
269 vlanTagging:
270 enabled: true
271 vlanId: 1
272 wan2:
273 enabled: true
274 pppoe:
275 authentication:
276 enabled: true
277 password: password
278 username: username
279 enabled: true
280 svis:
281 ipv4:
282 address: 9.10.11.10/16
283 assignmentMode: static
284 gateway: 13.14.15.16
285 nameservers:
286 addresses:
287 - 1.2.3.4
288 ipv6:
289 address: 1:2:3::4
290 assignmentMode: static
291 gateway: 1:2:3::5
292 nameservers:
293 addresses:
294 - 1001:4860:4860::8888
295 - 1001:4860:4860::8844
296 vlanTagging:
297 enabled: true
298 vlanId: 1
299 serial: string
300 """
301 RETURN = r"""
302 meraki_response:
303 description: A dictionary or list with the response returned by the Cisco Meraki Python SDK
304 returned: always
305 type: dict
306 sample: >
307 {
308 "wan1": {
309 "enabled": true,
310 "vlanTagging": {
311 "enabled": true,
312 "vlanId": 0
313 },
314 "svis": {
315 "ipv4": {
316 "assignmentMode": "string",
317 "address": "string",
318 "gateway": "string",
319 "nameservers": {
320 "addresses": [
321 "string"
322 ]
323 }
324 },
325 "ipv6": {
326 "assignmentMode": "string",
327 "address": "string",
328 "gateway": "string",
329 "nameservers": {
330 "addresses": [
331 "string"
332 ]
333 }
334 }
335 },
336 "pppoe": {
337 "enabled": true,
338 "authentication": {
339 "enabled": true,
340 "username": "string"
341 }
342 }
343 },
344 "wan2": {
345 "enabled": true,
346 "vlanTagging": {
347 "enabled": true,
348 "vlanId": 0
349 },
350 "svis": {
351 "ipv4": {
352 "assignmentMode": "string",
353 "address": "string",
354 "gateway": "string",
355 "nameservers": {
356 "addresses": [
357 "string"
358 ]
359 }
360 },
361 "ipv6": {
362 "assignmentMode": "string",
363 "address": "string",
364 "gateway": "string",
365 "nameservers": {
366 "addresses": [
367 "string"
368 ]
369 }
370 }
371 },
372 "pppoe": {
373 "enabled": true,
374 "authentication": {
375 "enabled": true,
376 "username": "string"
377 }
378 }
379 }
380 }
381 """