Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New module - meraki_firewalled_services #57289

Open
wants to merge 5 commits into
base: devel
from
Open
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Move mutual exclusive to build in approach

  • Loading branch information...
kbreit committed Jun 18, 2019
commit 29b889aa1cdbbfd35faf6f5ff31bd8e7fff7d036
@@ -158,12 +158,15 @@ def main():
allowed_ips=dict(type='list', element='str'),
)

mutually_exclusive = [('net_name', 'net_id')]

# the AnsibleModule object will be our abstraction working with Ansible
# this includes instantiation, a couple of common attr would be the
# args/params passed to the execution, as well as if the module
# supports check mode
module = AnsibleModule(argument_spec=argument_spec,
supports_check_mode=True,
mutually_exclusive=mutually_exclusive
)

meraki = MerakiModule(module, function='firewalled_services')
@@ -175,9 +178,6 @@ def main():
meraki.url_catalog['network_services'] = net_services_urls
meraki.url_catalog['service'] = services_urls

if meraki.params['net_name'] and meraki.params['net_id']:
meraki.fail_json(msg='net_name and net_id are mutually exclusive')

# manipulate or modify the state as needed (this is going to be the
# part where your module will do what it needs to do)

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.