Debian Codegraph @

ansible_collections/cisco/meraki/plugins/modules/networks_switch_link_aggregations.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_link_aggregations
9 short_description: Resource module for networks _switch _linkaggregations
10 description:
11 - Manage operations create, update and delete of the resource networks _switch _linkaggregations.
12 - Create a link aggregation group.
13 - Split a link aggregation group into separate ports.
14 - Update a link aggregation group.
15 version_added: '1.0.0'
16 extends_documentation_fragment:
17 - cisco.meraki.module
18 author: Francisco Munoz (@fmunoz)
19 options:
20 linkAggregationId:
21 description: LinkAggregationId path parameter. Link aggregation ID.
22 type: str
23 networkId:
24 description: NetworkId path parameter. Network ID.
25 type: str
26 switchPorts:
27 description: Array of switch or stack ports for creating aggregation group. Minimum
28 2 and maximum 8 ports are supported.
29 elements: dict
30 suboptions:
31 portId:
32 description: Port identifier of switch port. For modules, the identifier is
33 "SlotNumber_ModuleType_PortNumber" (Ex "1_8X10G_1"), otherwise it is just
34 the port number (Ex "8").
35 type: str
36 serial:
37 description: Serial number of the switch.
38 type: str
39 type: list
40 switchProfilePorts:
41 description: Array of switch profile ports for creating aggregation group. Minimum
42 2 and maximum 8 ports are supported.
43 elements: dict
44 suboptions:
45 portId:
46 description: Port identifier of switch port. For modules, the identifier is
47 "SlotNumber_ModuleType_PortNumber" (Ex "1_8X10G_1"), otherwise it is just
48 the port number (Ex "8").
49 type: str
50 profile:
51 description: Profile identifier.
52 type: str
53 type: list
54 requirements:
55 - meraki >= 2.4.9
56 - python >= 3.5
57 seealso:
58 - name: Cisco Meraki documentation for switch createNetworkSwitchLinkAggregation
59 description: Complete reference of the createNetworkSwitchLinkAggregation API.
60 link: https://developer.cisco.com/meraki/api-v1/#!create-network-switch-link-aggregation
61 - name: Cisco Meraki documentation for switch deleteNetworkSwitchLinkAggregation
62 description: Complete reference of the deleteNetworkSwitchLinkAggregation API.
63 link: https://developer.cisco.com/meraki/api-v1/#!delete-network-switch-link-aggregation
64 - name: Cisco Meraki documentation for switch updateNetworkSwitchLinkAggregation
65 description: Complete reference of the updateNetworkSwitchLinkAggregation API.
66 link: https://developer.cisco.com/meraki/api-v1/#!update-network-switch-link-aggregation
67 notes:
68 - SDK Method used are
69 switch.Switch.create_network_switch_link_aggregation,
70 switch.Switch.delete_network_switch_link_aggregation,
71 switch.Switch.update_network_switch_link_aggregation,
72 - Paths used are
73 post /networks/{networkId}/switch/linkAggregations,
74 delete /networks/{networkId}/switch/linkAggregations/{linkAggregationId},
75 put /networks/{networkId}/switch/linkAggregations/{linkAggregationId},
76 """
77
78 EXAMPLES = r"""
79 - name: Create
80 cisco.meraki.networks_switch_link_aggregations:
81 meraki_api_key: "{{ meraki_api_key }}"
82 meraki_base_url: "{{ meraki_base_url }}"
83 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
84 meraki_certificate_path: "{{ meraki_certificate_path }}"
85 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
86 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
87 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
88 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
89 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
90 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
91 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
92 meraki_output_log: "{{ meraki_output_log }}"
93 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
94 meraki_log_path: "{{ meraki_log_path }}"
95 meraki_print_console: "{{ meraki_print_console }}"
96 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
97 meraki_simulate: "{{ meraki_simulate }}"
98 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
99 meraki_caller: "{{ meraki_caller }}"
100 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
101 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
102 state: present
103 networkId: string
104 switchPorts:
105 - portId: '1'
106 serial: Q234-ABCD-0001
107 switchProfilePorts:
108 - portId: '2'
109 profile: '1234'
110 - name: Update by id
111 cisco.meraki.networks_switch_link_aggregations:
112 meraki_api_key: "{{ meraki_api_key }}"
113 meraki_base_url: "{{ meraki_base_url }}"
114 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
115 meraki_certificate_path: "{{ meraki_certificate_path }}"
116 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
117 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
118 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
119 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
120 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
121 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
122 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
123 meraki_output_log: "{{ meraki_output_log }}"
124 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
125 meraki_log_path: "{{ meraki_log_path }}"
126 meraki_print_console: "{{ meraki_print_console }}"
127 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
128 meraki_simulate: "{{ meraki_simulate }}"
129 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
130 meraki_caller: "{{ meraki_caller }}"
131 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
132 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
133 state: present
134 linkAggregationId: string
135 networkId: string
136 switchPorts:
137 - portId: '1'
138 serial: Q234-ABCD-0001
139 switchProfilePorts:
140 - portId: '2'
141 profile: '1234'
142 - name: Delete by id
143 cisco.meraki.networks_switch_link_aggregations:
144 meraki_api_key: "{{ meraki_api_key }}"
145 meraki_base_url: "{{ meraki_base_url }}"
146 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
147 meraki_certificate_path: "{{ meraki_certificate_path }}"
148 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
149 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
150 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
151 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
152 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
153 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
154 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
155 meraki_output_log: "{{ meraki_output_log }}"
156 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
157 meraki_log_path: "{{ meraki_log_path }}"
158 meraki_print_console: "{{ meraki_print_console }}"
159 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
160 meraki_simulate: "{{ meraki_simulate }}"
161 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
162 meraki_caller: "{{ meraki_caller }}"
163 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
164 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
165 state: absent
166 linkAggregationId: string
167 networkId: string
168 """
169 RETURN = r"""
170 meraki_response:
171 description: A dictionary or list with the response returned by the Cisco Meraki Python SDK
172 returned: always
173 type: dict
174 sample: >
175 {
176 "id": "string",
177 "switchPorts": [
178 {
179 "serial": "string",
180 "portId": "string"
181 }
182 ]
183 }
184 """