Debian Codegraph @

ansible_collections/cisco/meraki/plugins/modules/networks_switch_alternate_management_interface.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_alternate_management_interface
9 short_description: Resource module for networks _switch _alternatemanagementinterface
10 description:
11 - Manage operation update of the resource networks _switch _alternatemanagementinterface.
12 - Update the switch alternate management interface for the network.
13 version_added: '1.0.0'
14 extends_documentation_fragment:
15 - cisco.meraki.module
16 author: Francisco Munoz (@fmunoz)
17 options:
18 enabled:
19 description: Boolean value to enable or disable AMI configuration. If enabled,
20 VLAN and protocols must be set.
21 type: bool
22 networkId:
23 description: NetworkId path parameter. Network ID.
24 type: str
25 protocols:
26 description: Can be one or more of the following values 'radius', 'snmp' or 'syslog'.
27 elements: str
28 type: list
29 switches:
30 description: Array of switch serial number and IP assignment. If parameter is
31 present, it cannot have empty body. Note switches parameter is not applicable
32 for template networks, in other words, do not put 'switches' in the body when
33 updating template networks. Also, an empty 'switches' array will remove all
34 previous assignments.
35 elements: dict
36 suboptions:
37 alternateManagementIp:
38 description: Switch alternative management IP. To remove a prior IP setting,
39 provide an empty string.
40 type: str
41 gateway:
42 description: Switch gateway must be in IP format. Only and must be specified
43 for Polaris switches.
44 type: str
45 serial:
46 description: Switch serial number.
47 type: str
48 subnetMask:
49 description: Switch subnet mask must be in IP format. Only and must be specified
50 for Polaris switches.
51 type: str
52 type: list
53 vlanId:
54 description: Alternate management VLAN, must be between 1 and 4094.
55 type: int
56 requirements:
57 - meraki >= 2.4.9
58 - python >= 3.5
59 seealso:
60 - name: Cisco Meraki documentation for switch updateNetworkSwitchAlternateManagementInterface
61 description: Complete reference of the updateNetworkSwitchAlternateManagementInterface
62 API.
63 link: https://developer.cisco.com/meraki/api-v1/#!update-network-switch-alternate-management-interface
64 notes:
65 - SDK Method used are
66 switch.Switch.update_network_switch_alternate_management_interface,
67 - Paths used are
68 put /networks/{networkId}/switch/alternateManagementInterface,
69 """
70
71 EXAMPLES = r"""
72 - name: Update all
73 cisco.meraki.networks_switch_alternate_management_interface:
74 meraki_api_key: "{{ meraki_api_key }}"
75 meraki_base_url: "{{ meraki_base_url }}"
76 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
77 meraki_certificate_path: "{{ meraki_certificate_path }}"
78 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
79 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
80 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
81 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
82 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
83 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
84 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
85 meraki_output_log: "{{ meraki_output_log }}"
86 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
87 meraki_log_path: "{{ meraki_log_path }}"
88 meraki_print_console: "{{ meraki_print_console }}"
89 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
90 meraki_simulate: "{{ meraki_simulate }}"
91 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
92 meraki_caller: "{{ meraki_caller }}"
93 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
94 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
95 state: present
96 enabled: true
97 networkId: string
98 protocols:
99 - radius
100 - snmp
101 - syslog
102 switches:
103 - alternateManagementIp: 1.2.3.4
104 gateway: 1.2.3.5
105 serial: Q234-ABCD-5678
106 subnetMask: 255.255.255.0
107 vlanId: 100
108 """
109 RETURN = r"""
110 meraki_response:
111 description: A dictionary or list with the response returned by the Cisco Meraki Python SDK
112 returned: always
113 type: dict
114 sample: >
115 {
116 "enabled": true,
117 "vlanId": 0,
118 "protocols": [
119 "string"
120 ],
121 "switches": [
122 {
123 "serial": "string",
124 "alternateManagementIp": "string",
125 "subnetMask": "string",
126 "gateway": "string"
127 }
128 ]
129 }
130 """