summaryrefslogtreecommitdiffstats
path: root/ansible_collections/cisco/meraki/plugins/action
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-05 16:18:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-05 16:18:41 +0000
commitb643c52cf29ce5bbab738b43290af3556efa1ca9 (patch)
tree21d5c53d7a9b696627a255777cefdf6f78968824 /ansible_collections/cisco/meraki/plugins/action
parentReleasing progress-linux version 9.5.1+dfsg-1~progress7.99u1. (diff)
downloadansible-b643c52cf29ce5bbab738b43290af3556efa1ca9.tar.xz
ansible-b643c52cf29ce5bbab738b43290af3556efa1ca9.zip
Merging upstream version 10.0.0+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/cisco/meraki/plugins/action')
-rw-r--r--ansible_collections/cisco/meraki/plugins/action/networks_appliance_vlans.py36
-rw-r--r--ansible_collections/cisco/meraki/plugins/action/organizations_appliance_vpn_third_party_vpnpeers_info.py2
2 files changed, 20 insertions, 18 deletions
diff --git a/ansible_collections/cisco/meraki/plugins/action/networks_appliance_vlans.py b/ansible_collections/cisco/meraki/plugins/action/networks_appliance_vlans.py
index 48ebdb4ca..2842327c9 100644
--- a/ansible_collections/cisco/meraki/plugins/action/networks_appliance_vlans.py
+++ b/ansible_collections/cisco/meraki/plugins/action/networks_appliance_vlans.py
@@ -35,7 +35,7 @@ argument_spec.update(dict(
applianceIp=dict(type="str"),
cidr=dict(type="str"),
groupPolicyId=dict(type="str"),
- id=dict(type="str"),
+ id=dict(type="int"),
ipv6=dict(type="dict"),
mandatoryDhcp=dict(type="dict"),
mask=dict(type="int"),
@@ -43,7 +43,7 @@ argument_spec.update(dict(
subnet=dict(type="str"),
templateVlanType=dict(type="str"),
networkId=dict(type="str"),
- vlanId=dict(type="str"),
+ # vlanId=dict(type="str"),
dhcpBootFilename=dict(type="str"),
dhcpBootNextServer=dict(type="str"),
dhcpBootOptionsEnabled=dict(type="bool"),
@@ -58,8 +58,8 @@ argument_spec.update(dict(
))
required_if = [
- ("state", "present", ["name", "networkId", "vlanId"], True),
- ("state", "absent", ["name", "networkId", "vlanId"], True),
+ ("state", "present", ["name", "networkId", "id"], True),
+ ("state", "absent", ["name", "networkId", "id"], True),
]
required_one_of = []
mutually_exclusive = []
@@ -107,9 +107,10 @@ class NetworksApplianceVlans(object):
if self.new_object.get('networkId') is not None or self.new_object.get('network_id') is not None:
new_object_params['networkId'] = self.new_object.get('networkId') or \
self.new_object.get('network_id')
- if self.new_object.get('vlanId') is not None or self.new_object.get('vlan_id') is not None:
- new_object_params['vlanId'] = self.new_object.get('vlanId') or \
- self.new_object.get('vlan_id')
+ if self.new_object.get('vlanId') is not None or self.new_object.get('vlan_id') is not None or \
+ self.new_object.get('id') is not None:
+ new_object_params['vlanId'] = self.new_object.get('id') or \
+ self.new_object.get('id')
return new_object_params
def create_params(self):
@@ -154,9 +155,10 @@ class NetworksApplianceVlans(object):
if self.new_object.get('networkId') is not None or self.new_object.get('network_id') is not None:
new_object_params['networkId'] = self.new_object.get('networkId') or \
self.new_object.get('network_id')
- if self.new_object.get('vlanId') is not None or self.new_object.get('vlan_id') is not None:
- new_object_params['vlanId'] = self.new_object.get('vlanId') or \
- self.new_object.get('vlan_id')
+ if self.new_object.get('vlanId') is not None or self.new_object.get('vlan_id') is not None or \
+ self.new_object.get('id') is not None:
+ new_object_params['vlanId'] = self.new_object.get('id') or \
+ self.new_object.get('id')
return new_object_params
def update_by_id_params(self):
@@ -174,7 +176,8 @@ class NetworksApplianceVlans(object):
new_object_params['dhcpBootNextServer'] = self.new_object.get('dhcpBootNextServer') or \
self.new_object.get('dhcp_boot_next_server')
if self.new_object.get('dhcpBootOptionsEnabled') is not None or self.new_object.get('dhcp_boot_options_enabled') is not None:
- new_object_params['dhcpBootOptionsEnabled'] = self.new_object.get('dhcpBootOptionsEnabled')
+ new_object_params['dhcpBootOptionsEnabled'] = self.new_object.get(
+ 'dhcpBootOptionsEnabled')
if self.new_object.get('dhcpHandling') is not None or self.new_object.get('dhcp_handling') is not None:
new_object_params['dhcpHandling'] = self.new_object.get('dhcpHandling') or \
self.new_object.get('dhcp_handling')
@@ -223,9 +226,10 @@ class NetworksApplianceVlans(object):
if self.new_object.get('networkId') is not None or self.new_object.get('network_id') is not None:
new_object_params['networkId'] = self.new_object.get('networkId') or \
self.new_object.get('network_id')
- if self.new_object.get('vlanId') is not None or self.new_object.get('vlan_id') is not None:
- new_object_params['vlanId'] = self.new_object.get('vlanId') or \
- self.new_object.get('vlan_id')
+ if self.new_object.get('vlanId') is not None or self.new_object.get('vlan_id') is not None or \
+ self.new_object.get('id') is not None:
+ new_object_params['vlanId'] = self.new_object.get('id') or \
+ self.new_object.get('id')
return new_object_params
def get_object_by_name(self, name):
@@ -272,7 +276,7 @@ class NetworksApplianceVlans(object):
o_id = self.new_object.get("id")
o_id = o_id or self.new_object.get(
"vlan_id") or self.new_object.get("vlanId")
- name = self.new_object.get("name")
+ name = None
if o_id:
prev_obj = self.get_object_by_id(o_id)
id_exists = prev_obj is not None and isinstance(prev_obj, dict)
@@ -298,7 +302,6 @@ class NetworksApplianceVlans(object):
obj_params = [
("applianceIp", "applianceIp"),
- ("cidr", "cidr"),
("groupPolicyId", "groupPolicyId"),
("id", "id"),
("ipv6", "ipv6"),
@@ -308,7 +311,6 @@ class NetworksApplianceVlans(object):
("subnet", "subnet"),
("templateVlanType", "templateVlanType"),
("networkId", "networkId"),
- ("vlanId", "vlanId"),
("dhcpBootFilename", "dhcpBootFilename"),
("dhcpBootNextServer", "dhcpBootNextServer"),
("dhcpBootOptionsEnabled", "dhcpBootOptionsEnabled"),
diff --git a/ansible_collections/cisco/meraki/plugins/action/organizations_appliance_vpn_third_party_vpnpeers_info.py b/ansible_collections/cisco/meraki/plugins/action/organizations_appliance_vpn_third_party_vpnpeers_info.py
index 69f7bd061..195a9138c 100644
--- a/ansible_collections/cisco/meraki/plugins/action/organizations_appliance_vpn_third_party_vpnpeers_info.py
+++ b/ansible_collections/cisco/meraki/plugins/action/organizations_appliance_vpn_third_party_vpnpeers_info.py
@@ -82,7 +82,7 @@ class ActionModule(ActionBase):
response = meraki.exec_meraki(
family="appliance",
- function='getOrganizationApplianceVpnThirdPartyVpnpeers',
+ function='getOrganizationApplianceVpnThirdPartyVPNPeers',
params=self.get_all(self._task.args),
)
self._result.update(dict(meraki_response=response))