Debian Codegraph @

ansible_collections/cisco/meraki/plugins/modules/organizations_wireless_mqtt_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: organizations_wireless_mqtt_settings
9 short_description: Resource module for organizations _wireless _mqtt _settings
10 description:
11 - Manage operation update of the resource organizations _wireless _mqtt _settings.
12 - Add new broker config for wireless MQTT.
13 version_added: '1.0.0'
14 extends_documentation_fragment:
15 - cisco.meraki.module
16 author: Francisco Munoz (@fmunoz)
17 options:
18 ble:
19 description: MQTT BLE Settings for network.
20 suboptions:
21 allowLists:
22 description: Allowed List for MAC and UUID.
23 suboptions:
24 macs:
25 description: Allowed MAC List.
26 elements: str
27 type: list
28 uuids:
29 description: Allowed UUID List.
30 elements: str
31 type: list
32 type: dict
33 enabled:
34 description: BLE Enabled.
35 type: bool
36 flush:
37 description: BLE Flush frequency.
38 suboptions:
39 frequency:
40 description: BLE Flush frequency in seconds. Will be between 1 and 2147483647.
41 Default is 60 seconds.
42 type: int
43 type: dict
44 hysteresis:
45 description: BLE Hysteresis Settings for network.
46 suboptions:
47 enabled:
48 description: BLE Hysteresis Enabled.
49 type: bool
50 threshold:
51 description: BLE Threshold. Will be between 1 and 2147483647. Default
52 is 1 second.
53 type: int
54 type: dict
55 type:
56 description: BLE type of clients to publish telemetry. Valid types are all,
57 ibeacon, eddystone, unknown.
58 type: str
59 type: dict
60 mqtt:
61 description: MQTT Settings for network.
62 suboptions:
63 broker:
64 description: MQTT Broker Settings for network.
65 suboptions:
66 name:
67 description: Broker Config Name.
68 type: str
69 type: dict
70 enabled:
71 description: MQTT Enabled.
72 type: bool
73 messageFields:
74 description: Select fields to populate in MQTT messages. Valid types are RSSI,
75 AP MAC address, Client MAC address, Timestamp, Radio, Network ID, Beacon
76 type, Raw payload, Client UUID, Client major value, Client minor value,
77 Signal power, Band, Slot ID.
78 elements: str
79 type: list
80 publishing:
81 description: MQTT Publishing Settings.
82 suboptions:
83 frequency:
84 description: MQTT Publishing Frequency in seconds. Will be between 1 and
85 2147483647. Default is 1 second.
86 type: int
87 qos:
88 description: MQTT Publishing QoS. Valid types are 0, 1, 2.
89 type: int
90 type: dict
91 topic:
92 description: MQTT Topic.
93 type: str
94 type: dict
95 network:
96 description: Add MQTT Settings for network.
97 suboptions:
98 id:
99 description: Network ID.
100 type: str
101 type: dict
102 organizationId:
103 description: OrganizationId path parameter. Organization ID.
104 type: str
105 wifi:
106 description: MQTT Wi-Fi Settings for network.
107 suboptions:
108 allowLists:
109 description: Allowed List for MAC and UUID.
110 suboptions:
111 macs:
112 description: Allowed MAC List.
113 elements: str
114 type: list
115 type: dict
116 enabled:
117 description: Wi-Fi Enabled.
118 type: bool
119 flush:
120 description: BLE Flush frequency.
121 suboptions:
122 frequency:
123 description: Wi-Fi Flush frequency in seconds. Will be between 1 and 2147483647.
124 Default is 60 seconds.
125 type: int
126 type: dict
127 hysteresis:
128 description: Wi-Fi Hysteresis Settings for network.
129 suboptions:
130 enabled:
131 description: Wi-Fi Hysteresis Enabled.
132 type: bool
133 threshold:
134 description: Wi-Fi Threshold. Will be between 1 and 2147483647. Default
135 is 1 second.
136 type: int
137 type: dict
138 type:
139 description: Wi-Fi client type. Valid types are visible, associated.
140 type: str
141 type: dict
142 requirements:
143 - meraki >= 2.4.9
144 - python >= 3.5
145 seealso:
146 - name: Cisco Meraki documentation for wireless updateOrganizationWirelessMqttSettings
147 description: Complete reference of the updateOrganizationWirelessMqttSettings
148 API.
149 link: https://developer.cisco.com/meraki/api-v1/#!update-organization-wireless-mqtt-settings
150 notes:
151 - SDK Method used are
152 wireless.Wireless.update_organization_wireless_mqtt_settings,
153 - Paths used are
154 put /organizations/{organizationId}/wireless/mqtt/settings,
155 """
156
157 EXAMPLES = r"""
158 - name: Update all
159 cisco.meraki.organizations_wireless_mqtt_settings:
160 meraki_api_key: "{{ meraki_api_key }}"
161 meraki_base_url: "{{ meraki_base_url }}"
162 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
163 meraki_certificate_path: "{{ meraki_certificate_path }}"
164 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
165 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
166 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
167 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
168 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
169 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
170 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
171 meraki_output_log: "{{ meraki_output_log }}"
172 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
173 meraki_log_path: "{{ meraki_log_path }}"
174 meraki_print_console: "{{ meraki_print_console }}"
175 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
176 meraki_simulate: "{{ meraki_simulate }}"
177 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
178 meraki_caller: "{{ meraki_caller }}"
179 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
180 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
181 state: present
182 ble:
183 allowLists:
184 macs: []
185 uuids: []
186 enabled: false
187 flush:
188 frequency: 60
189 hysteresis:
190 enabled: true
191 threshold: 1
192 type: ibeacon
193 mqtt:
194 broker:
195 name: My Broker
196 enabled: true
197 messageFields:
198 - RSSI
199 - AP MAC address
200 - Client MAC address
201 - Timestamp
202 - Radio
203 - Network ID
204 - Beacon type
205 - Raw payload
206 - Client UUID
207 - Client major value
208 - Client minor value
209 - Signal power
210 - Band
211 - Slot ID
212 publishing:
213 frequency: 1
214 qos: 1
215 topic: Test Topic
216 network:
217 id: L_1234
218 organizationId: string
219 wifi:
220 allowLists:
221 macs: []
222 enabled: false
223 flush:
224 frequency: 60
225 hysteresis:
226 enabled: false
227 threshold: 1
228 type: associated
229 """
230 RETURN = r"""
231 meraki_response:
232 description: A dictionary or list with the response returned by the Cisco Meraki Python SDK
233 returned: always
234 type: dict
235 sample: >
236 {
237 "network": {
238 "id": "string",
239 "name": "string"
240 },
241 "mqtt": {
242 "settingsId": "string",
243 "enabled": true,
244 "topic": "string",
245 "messageFields": [
246 "string"
247 ],
248 "publishing": {
249 "frequency": 0,
250 "qos": 0
251 },
252 "broker": {
253 "id": "string",
254 "name": "string"
255 }
256 },
257 "ble": {
258 "enabled": true,
259 "type": "string",
260 "flush": {
261 "frequency": 0
262 },
263 "allowLists": {
264 "uuids": [
265 "string"
266 ],
267 "macs": [
268 "string"
269 ]
270 },
271 "hysteresis": {
272 "enabled": true,
273 "threshold": 0
274 }
275 },
276 "wifi": {
277 "enabled": true,
278 "type": "string",
279 "flush": {
280 "frequency": 0
281 },
282 "allowLists": {
283 "macs": [
284 "string"
285 ]
286 },
287 "hysteresis": {
288 "enabled": true,
289 "threshold": 0
290 }
291 }
292 }
293 """