Skip to content

Commit f691f1d

Browse files
authored
Merge branch 'meraki:main' into switch_query_file
2 parents b3aefae + 7a214a6 commit f691f1d

File tree

7 files changed

+48
-37
lines changed

7 files changed

+48
-37
lines changed

CHANGELOG.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ Cisco.Meraki Release Notes
44

55
.. contents:: Topics
66

7+
v2.21.9
8+
=======
9+
10+
Bugfixes
11+
--------
12+
13+
- administered_licensing_subscription_subscriptions_bind - Fixed parameter naming from 'subscription_id' to 'subscriptionId' for proper API compatibility
14+
- networks_appliance_content_filtering - Enhanced idempotency by extracting category IDs from blockedUrlCategories before comparison
15+
- meraki.py plugin utils - Added type checking in has_diff_elem2 function to prevent errors when comparing lists of non-dictionary elements
16+
717
v2.21.8
818
=======
919

changelogs/changelog.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,5 +1303,16 @@ releases:
13031303
2.21.8:
13041304
changes:
13051305
bugfixes:
1306-
- "networks_switch_qos_rules_order: extend object lookup to include srcPortRange and dstPortRange when matching existing QoS rules to improve idempotency"
1307-
release_date: "2025-06-10"
1306+
- "networks_switch_qos_rules_order: extend object lookup to include srcPortRange and dstPortRange when matching existing QoS rules
1307+
to improve idempotency"
1308+
release_date: "2025-06-10"
1309+
2.21.9:
1310+
changes:
1311+
bugfixes:
1312+
- "administered_licensing_subscription_subscriptions_bind - Fixed parameter naming from 'subscription_id' to 'subscriptionId'
1313+
for proper API compatibility"
1314+
- "networks_appliance_content_filtering - Enhanced idempotency by extracting category IDs from blockedUrlCategories
1315+
before comparison"
1316+
- "meraki.py plugin utils - Added type checking in has_diff_elem2 function to prevent errors when comparing lists
1317+
of non-dictionary elements"
1318+
release_date: "2025-11-26"

galaxy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
namespace: cisco
33
name: meraki
4-
version: 2.21.8
4+
version: 2.21.9
55
readme: README.md
66
authors:
77
- Francisco Muñoz <[email protected]>

playbooks/test.yml

Lines changed: 8 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,16 @@
11
- name: Play Name
22
hosts: localhost
33
vars:
4-
network_id: L_828099381482771185
4+
network_id: L_828099381482778041
55
org_id: "828099381482762270"
6+
blocked_url_category_ids:
7+
- meraki:contentFiltering/category/C1
8+
- meraki:contentFiltering/category/C3
69
gather_facts: false
710
tasks:
8-
# - name: Get all networks _clients
9-
# cisco.meraki.networks_clients_info:
10-
# meraki_suppress_logging: false
11-
# timespan: 1
12-
# perPage: 3
13-
# networkId: L_828099381482771185
14-
# total_pages: -1
15-
# direction: next
16-
# register: result
1711
- name: Update all
18-
cisco.meraki.devices_cellular_sims:
19-
meraki_base_url: "http://localhost:3002"
12+
cisco.meraki.networks_appliance_content_filtering:
13+
meraki_suppress_logging: false
14+
networkId: "{{ network_id }}"
15+
blockedUrlCategories: "{{ blocked_url_category_ids }}"
2016
state: present
21-
serial: string
22-
simFailover:
23-
enabled: true
24-
timeout: 300
25-
simOrdering:
26-
- sim1
27-
- sim2
28-
- sim3
29-
sims:
30-
- apns:
31-
- allowedIpTypes:
32-
- ipv4
33-
- ipv6
34-
authentication:
35-
password: secret
36-
type: pap
37-
username: milesmeraki
38-
name: internet
39-
isPrimary: false
40-
simOrder: 3
41-
slot: sim2

plugins/action/administered_licensing_subscription_subscriptions_bind.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def _check_argspec(self):
6767
def get_object(self, params):
6868
new_object = dict(
6969
networkIds=params.get("networkIds"),
70-
subscription_id=params.get("subscriptionId"),
70+
subscriptionId=params.get("subscriptionId"),
7171
validate=params.get("validate"),
7272
)
7373
return new_object

plugins/action/networks_appliance_content_filtering.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,12 @@ def requires_update(self, current_obj):
144144
]
145145
# Method 1. Params present in request (Ansible) obj are the same as the current (ISE) params
146146
# If any does not have eq params, it requires update
147+
148+
new_blocked_url_categories = []
149+
for category in current_obj.get("blockedUrlCategories"):
150+
new_blocked_url_categories.append(category.get("id"))
151+
152+
current_obj["blockedUrlCategories"] = new_blocked_url_categories
147153
return any(not meraki_compare_equality2(current_obj.get(meraki_param),
148154
requested_obj.get(ansible_param))
149155
for (meraki_param, ansible_param) in obj_params)

plugins/plugin_utils/meraki.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,15 @@ def has_diff_elem2(ls1, ls2):
6868
"""Compares two lists, with dictionaries inside them, to detect differences."""
6969
if len(ls1) != len(ls2):
7070
return True
71+
72+
# Check if first elements are dictionaries before accessing keys
73+
if not (isinstance(ls1[0], dict) and isinstance(ls2[0], dict)):
74+
# If not both dicts, fall back to simple comparison
75+
for i, elem in enumerate(ls2):
76+
if str(ls1[i]) != str(elem):
77+
return True
78+
return False
79+
7180
# Only compare common keys between ls1 and ls2
7281
common_keys = set(ls1[0].keys()) & set(ls2[0].keys())
7382
for i, elem in enumerate(ls2):

0 commit comments

Comments
 (0)