Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

Commit

Permalink
Fix error where net_id was always ignored
Browse files Browse the repository at this point in the history
- Add integration test as well
- Pending on issue CiscoDevNet#6
  • Loading branch information
kbreit committed Dec 23, 2019
1 parent 43f0683 commit deeb541
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/modules/meraki_content_filtering.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def main():
org_id = meraki.params['org_id']
if not org_id:
org_id = meraki.get_org_id(meraki.params['org_name'])
net_id = None
net_id = meraki.params['net_id']
if net_id is None:
nets = meraki.get_nets(org_id=org_id)
net_id = meraki.get_net_id(org_id, meraki.params['net_name'], data=nets)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
delegate_to: localhost
register: create_net_appliance

- set_fact:
net_id: '{{create_net_appliance.data.id}}'

- name: Test net_name and id exclusivity
meraki_content_filtering:
auth_key: '{{auth_key}}'
Expand Down Expand Up @@ -139,11 +142,11 @@
- two_allowed.changed == True
- two_allowed.data.allowed_url_patterns | length == 2

- name: Set blocked URL category
- name: Set blocked URL category using net_id
meraki_content_filtering:
auth_key: '{{auth_key}}'
org_name: '{{test_org_name}}'
net_name: '{{test_net_name}}'
net_id: '{{net_id}}'
state: present
category_list_size: full list
blocked_categories:
Expand Down

0 comments on commit deeb541

Please sign in to comment.