Improved support for parameter testing and checks for org_id (#41517)

This commit is contained in:
Kevin Breit
2018-06-20 02:40:10 -05:00
committed by Dag Wieers
parent 4a0b8f5123
commit cccaf951fa
2 changed files with 35 additions and 4 deletions

View File

@@ -234,8 +234,11 @@ def main():
# manipulate or modify the state as needed (this is going to be the
# part where your module will do what it needs to do)
org_id = meraki.params['org_id']
if not meraki.params['org_name'] and not meraki.params['org_id']:
meraki.fail_json(msg='org_name or org_id is required')
org_id = meraki.params['org_id']
if org_id is None:
org_id = meraki.get_org_id(meraki.params['org_name'])