| 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_appliance_single_lan |
| 9 |
short_description: Resource module for networks _appliance _singlelan |
| 10 |
description: |
| 11 |
- Manage operation update of the resource networks _appliance _singlelan. |
| 12 |
- Update single LAN configuration. |
| 13 |
version_added: '1.0.0' |
| 14 |
extends_documentation_fragment: |
| 15 |
- cisco.meraki.module |
| 16 |
author: Francisco Munoz (@fmunoz) |
| 17 |
options: |
| 18 |
applianceIp: |
| 19 |
description: The appliance IP address of the single LAN. |
| 20 |
type: str |
| 21 |
ipv6: |
| 22 |
description: IPv6 configuration on the VLAN. |
| 23 |
suboptions: |
| 24 |
enabled: |
| 25 |
description: Enable IPv6 on VLAN. |
| 26 |
type: bool |
| 27 |
prefixAssignments: |
| 28 |
description: Prefix assignments on the VLAN. |
| 29 |
elements: dict |
| 30 |
suboptions: |
| 31 |
autonomous: |
| 32 |
description: Auto assign a /64 prefix from the origin to the VLAN. |
| 33 |
type: bool |
| 34 |
disabled: |
| 35 |
description: Disable the prefix assignment. |
| 36 |
type: bool |
| 37 |
origin: |
| 38 |
description: The origin of the prefix. |
| 39 |
suboptions: |
| 40 |
interfaces: |
| 41 |
description: Interfaces associated with the prefix. |
| 42 |
elements: str |
| 43 |
type: list |
| 44 |
type: |
| 45 |
description: Type of the origin. |
| 46 |
type: str |
| 47 |
type: dict |
| 48 |
staticApplianceIp6: |
| 49 |
description: Manual configuration of the IPv6 Appliance IP. |
| 50 |
type: str |
| 51 |
staticPrefix: |
| 52 |
description: Manual configuration of a /64 prefix on the VLAN. |
| 53 |
type: str |
| 54 |
type: list |
| 55 |
type: dict |
| 56 |
mandatoryDhcp: |
| 57 |
description: Mandatory DHCP will enforce that clients connecting to this LAN must |
| 58 |
use the IP address assigned by the DHCP server. Clients who use a static IP |
| 59 |
address won't be able to associate. Only available on firmware versions 17.0 |
| 60 |
and above. |
| 61 |
suboptions: |
| 62 |
enabled: |
| 63 |
description: Enable Mandatory DHCP on LAN. |
| 64 |
type: bool |
| 65 |
type: dict |
| 66 |
networkId: |
| 67 |
description: NetworkId path parameter. Network ID. |
| 68 |
type: str |
| 69 |
subnet: |
| 70 |
description: The subnet of the single LAN configuration. |
| 71 |
type: str |
| 72 |
requirements: |
| 73 |
- meraki >= 2.4.9 |
| 74 |
- python >= 3.5 |
| 75 |
seealso: |
| 76 |
- name: Cisco Meraki documentation for appliance updateNetworkApplianceSingleLan |
| 77 |
description: Complete reference of the updateNetworkApplianceSingleLan API. |
| 78 |
link: https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-single-lan |
| 79 |
notes: |
| 80 |
- SDK Method used are |
| 81 |
appliance.Appliance.update_network_appliance_single_lan, |
| 82 |
- Paths used are |
| 83 |
put /networks/{networkId}/appliance/singleLan, |
| 84 |
""" |
| 85 |
|
| 86 |
EXAMPLES = r""" |
| 87 |
- name: Update all |
| 88 |
cisco.meraki.networks_appliance_single_lan: |
| 89 |
meraki_api_key: "{{ meraki_api_key }}" |
| 90 |
meraki_base_url: "{{ meraki_base_url }}" |
| 91 |
meraki_single_request_timeout: "{{ meraki_single_request_timeout }}" |
| 92 |
meraki_certificate_path: "{{ meraki_certificate_path }}" |
| 93 |
meraki_requests_proxy: "{{ meraki_requests_proxy }}" |
| 94 |
meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}" |
| 95 |
meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}" |
| 96 |
meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}" |
| 97 |
meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}" |
| 98 |
meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}" |
| 99 |
meraki_maximum_retries: "{{ meraki_maximum_retries }}" |
| 100 |
meraki_output_log: "{{ meraki_output_log }}" |
| 101 |
meraki_log_file_prefix: "{{ meraki_log_file_prefix }}" |
| 102 |
meraki_log_path: "{{ meraki_log_path }}" |
| 103 |
meraki_print_console: "{{ meraki_print_console }}" |
| 104 |
meraki_suppress_logging: "{{ meraki_suppress_logging }}" |
| 105 |
meraki_simulate: "{{ meraki_simulate }}" |
| 106 |
meraki_be_geo_id: "{{ meraki_be_geo_id }}" |
| 107 |
meraki_caller: "{{ meraki_caller }}" |
| 108 |
meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}" |
| 109 |
meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}" |
| 110 |
state: present |
| 111 |
applianceIp: string |
| 112 |
ipv6: |
| 113 |
enabled: true |
| 114 |
prefixAssignments: |
| 115 |
- autonomous: true |
| 116 |
disabled: true |
| 117 |
origin: |
| 118 |
interfaces: |
| 119 |
- string |
| 120 |
type: string |
| 121 |
staticApplianceIp6: string |
| 122 |
staticPrefix: string |
| 123 |
mandatoryDhcp: |
| 124 |
enabled: true |
| 125 |
networkId: string |
| 126 |
subnet: string |
| 127 |
""" |
| 128 |
RETURN = r""" |
| 129 |
meraki_response: |
| 130 |
description: A dictionary or list with the response returned by the Cisco Meraki Python SDK |
| 131 |
returned: always |
| 132 |
type: dict |
| 133 |
sample: > |
| 134 |
{ |
| 135 |
"subnet": "string", |
| 136 |
"applianceIp": "string", |
| 137 |
"mandatoryDhcp": { |
| 138 |
"enabled": true |
| 139 |
}, |
| 140 |
"ipv6": { |
| 141 |
"enabled": true, |
| 142 |
"prefixAssignments": [ |
| 143 |
{ |
| 144 |
"autonomous": true, |
| 145 |
"staticPrefix": "string", |
| 146 |
"staticApplianceIp6": "string", |
| 147 |
"origin": { |
| 148 |
"type": "string", |
| 149 |
"interfaces": [ |
| 150 |
"string" |
| 151 |
] |
| 152 |
} |
| 153 |
} |
| 154 |
] |
| 155 |
} |
| 156 |
} |
| 157 |
""" |