Debian Codegraph @

ansible_collections/cisco/meraki/plugins/modules/networks_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: networks_settings
9 short_description: Resource module for networks _settings
10 description:
11 - Manage operation update of the resource networks _settings.
12 - Update the settings for a network.
13 version_added: '1.0.0'
14 extends_documentation_fragment:
15 - cisco.meraki.module
16 author: Francisco Munoz (@fmunoz)
17 options:
18 localStatusPage:
19 description: A hash of Local Status page(s)' authentication options applied to
20 the Network.
21 suboptions:
22 authentication:
23 description: A hash of Local Status page(s)' authentication options applied
24 to the Network.
25 suboptions:
26 enabled:
27 description: Enables / disables the authentication on Local Status page(s).
28 type: bool
29 password:
30 description: The password used for Local Status Page(s). Set this to null
31 to clear the password.
32 type: str
33 username:
34 description: The username used for Local Status Page(s). Setting this
35 to null or empty string will clear the value, allowing you to use the
36 default of 'admin'.
37 type: str
38 type: dict
39 type: dict
40 localStatusPageEnabled:
41 description: Enables / disables the local device status pages (<a target='_blank'
42 href='http //my.meraki.com/'>my.meraki.com, </a><a target='_blank' href='http
43 //ap.meraki.com/'>ap.meraki.com, </a><a target='_blank' href='http //switch.meraki.com/'>switch.meraki.com,
44 </a><a target='_blank' href='http //wired.meraki.com/'>wired.meraki.com</a>).
45 Optional (defaults to false).
46 type: bool
47 namedVlans:
48 description: A hash of Named VLANs options applied to the Network.
49 suboptions:
50 enabled:
51 description: Enables / disables Named VLANs on the Network.
52 type: bool
53 type: dict
54 networkId:
55 description: NetworkId path parameter. Network ID.
56 type: str
57 remoteStatusPageEnabled:
58 description: Enables / disables access to the device status page (<a target='_blank'>http
59 //device's LAN IP)</a>. Optional. Can only be set if localStatusPageEnabled
60 is set to true.
61 type: bool
62 securePort:
63 description: A hash of SecureConnect options applied to the Network.
64 suboptions:
65 enabled:
66 description: Enables / disables SecureConnect on the network. Optional.
67 type: bool
68 type: dict
69 requirements:
70 - meraki >= 2.4.9
71 - python >= 3.5
72 seealso:
73 - name: Cisco Meraki documentation for networks updateNetworkSettings
74 description: Complete reference of the updateNetworkSettings API.
75 link: https://developer.cisco.com/meraki/api-v1/#!update-network-settings
76 notes:
77 - SDK Method used are
78 networks.Networks.update_network_settings,
79 - Paths used are
80 put /networks/{networkId}/settings,
81 """
82
83 EXAMPLES = r"""
84 - name: Update all
85 cisco.meraki.networks_settings:
86 meraki_api_key: "{{ meraki_api_key }}"
87 meraki_base_url: "{{ meraki_base_url }}"
88 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
89 meraki_certificate_path: "{{ meraki_certificate_path }}"
90 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
91 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
92 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
93 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
94 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
95 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
96 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
97 meraki_output_log: "{{ meraki_output_log }}"
98 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
99 meraki_log_path: "{{ meraki_log_path }}"
100 meraki_print_console: "{{ meraki_print_console }}"
101 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
102 meraki_simulate: "{{ meraki_simulate }}"
103 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
104 meraki_caller: "{{ meraki_caller }}"
105 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
106 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
107 state: present
108 localStatusPage:
109 authentication:
110 enabled: false
111 password: miles123
112 username: admin
113 localStatusPageEnabled: true
114 namedVlans:
115 enabled: true
116 networkId: string
117 remoteStatusPageEnabled: true
118 securePort:
119 enabled: false
120 """
121 RETURN = r"""
122 meraki_response:
123 description: A dictionary or list with the response returned by the Cisco Meraki Python SDK
124 returned: always
125 type: dict
126 sample: >
127 {
128 "localStatusPageEnabled": true,
129 "remoteStatusPageEnabled": true,
130 "localStatusPage": {
131 "authentication": {
132 "enabled": true,
133 "username": "string"
134 }
135 },
136 "securePort": {
137 "enabled": true
138 },
139 "fips": {
140 "enabled": true
141 },
142 "namedVlans": {
143 "enabled": true
144 }
145 }
146 """