Debian Codegraph @

ansible_collections/cisco/meraki/plugins/modules/networks_switch_mtu.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_mtu
9 short_description: Resource module for networks _switch _mtu
10 description:
11 - Manage operation update of the resource networks _switch _mtu.
12 - Update the MTU configuration.
13 version_added: '1.0.0'
14 extends_documentation_fragment:
15 - cisco.meraki.module
16 author: Francisco Munoz (@fmunoz)
17 options:
18 defaultMtuSize:
19 description: MTU size for the entire network. Default value is 9578.
20 type: int
21 networkId:
22 description: NetworkId path parameter. Network ID.
23 type: str
24 overrides:
25 description: Override MTU size for individual switches or switch templates. An
26 empty array will clear overrides.
27 elements: dict
28 suboptions:
29 mtuSize:
30 description: MTU size for the switches or switch templates.
31 type: int
32 switchProfiles:
33 description: List of switch template IDs. Applicable only for template network.
34 elements: str
35 type: list
36 switches:
37 description: List of switch serials. Applicable only for switch network.
38 elements: str
39 type: list
40 type: list
41 requirements:
42 - meraki >= 2.4.9
43 - python >= 3.5
44 seealso:
45 - name: Cisco Meraki documentation for switch updateNetworkSwitchMtu
46 description: Complete reference of the updateNetworkSwitchMtu API.
47 link: https://developer.cisco.com/meraki/api-v1/#!update-network-switch-mtu
48 notes:
49 - SDK Method used are
50 switch.Switch.update_network_switch_mtu,
51 - Paths used are
52 put /networks/{networkId}/switch/mtu,
53 """
54
55 EXAMPLES = r"""
56 - name: Update all
57 cisco.meraki.networks_switch_mtu:
58 meraki_api_key: "{{ meraki_api_key }}"
59 meraki_base_url: "{{ meraki_base_url }}"
60 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
61 meraki_certificate_path: "{{ meraki_certificate_path }}"
62 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
63 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
64 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
65 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
66 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
67 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
68 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
69 meraki_output_log: "{{ meraki_output_log }}"
70 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
71 meraki_log_path: "{{ meraki_log_path }}"
72 meraki_print_console: "{{ meraki_print_console }}"
73 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
74 meraki_simulate: "{{ meraki_simulate }}"
75 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
76 meraki_caller: "{{ meraki_caller }}"
77 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
78 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
79 state: present
80 defaultMtuSize: 9578
81 networkId: string
82 overrides:
83 - mtuSize: 1500
84 switchProfiles:
85 - '1284392014819'
86 - '2983092129865'
87 switches:
88 - Q234-ABCD-0001
89 - Q234-ABCD-0002
90 - Q234-ABCD-0003
91 """
92 RETURN = r"""
93 meraki_response:
94 description: A dictionary or list with the response returned by the Cisco Meraki Python SDK
95 returned: always
96 type: dict
97 sample: >
98 {
99 "defaultMtuSize": 0,
100 "overrides": [
101 {
102 "switches": [
103 "string"
104 ],
105 "switchProfiles": [
106 "string"
107 ],
108 "mtuSize": 0
109 }
110 ]
111 }
112 """