From 1b4a973d2821a39591215850508d367db0bdac4b Mon Sep 17 00:00:00 2001 From: Kevin Breit Date: Fri, 15 Mar 2019 19:12:12 -0700 Subject: [PATCH] Parameter change from orgAccess to org_access (#53574) - It should be in another PR, not sure why it got removed --- .../modules/network/meraki/meraki_admin.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/ansible/modules/network/meraki/meraki_admin.py b/lib/ansible/modules/network/meraki/meraki_admin.py index 9a047fb2a7f..7feb130541e 100644 --- a/lib/ansible/modules/network/meraki/meraki_admin.py +++ b/lib/ansible/modules/network/meraki/meraki_admin.py @@ -32,9 +32,10 @@ options: - Email cannot be updated. - Required when creating or editing an administrator. type: str - orgAccess: + org_access: description: - Privileges assigned to the administrator in the organization. + aliases: [ orgAccess ] choices: [ full, none, read-only ] type: str tags: @@ -97,7 +98,7 @@ EXAMPLES = r''' org_name: YourOrg state: present name: Jane Doe - orgAccess: read-only + org_access: read-only email: jane@doe.com - name: Create new administrator with organization access @@ -106,7 +107,7 @@ EXAMPLES = r''' org_name: YourOrg state: present name: Jane Doe - orgAccess: read-only + org_access: read-only email: jane@doe.com - name: Create a new administrator with organization access @@ -115,7 +116,7 @@ EXAMPLES = r''' org_name: YourOrg state: present name: Jane Doe - orgAccess: read-only + org_access: read-only email: jane@doe.com - name: Revoke access to an organization for an administrator @@ -284,8 +285,8 @@ def create_admin(meraki, org_id, name, email): is_admin_existing = find_admin(meraki, get_admins(meraki, org_id), email) - if meraki.params['orgAccess'] is not None: - payload['orgAccess'] = meraki.params['orgAccess'] + if meraki.params['org_access'] is not None: + payload['orgAccess'] = meraki.params['org_access'] if meraki.params['tags'] is not None: payload['tags'] = json.loads(meraki.params['tags']) if meraki.params['networks'] is not None: @@ -329,7 +330,7 @@ def main(): argument_spec.update(state=dict(type='str', choices=['present', 'query', 'absent'], required=True), name=dict(type='str'), email=dict(type='str'), - orgAccess=dict(type='str', choices=['full', 'read-only', 'none']), + org_access=dict(type='str', aliases=['orgAccess'], choices=['full', 'read-only', 'none']), tags=dict(type='json'), networks=dict(type='json'), org_name=dict(type='str', aliases=['organization']),