diff options
Diffstat (limited to 'lib/ansible/modules/network/aci/aci_epg_to_domain.py')
-rw-r--r-- | lib/ansible/modules/network/aci/aci_epg_to_domain.py | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/lib/ansible/modules/network/aci/aci_epg_to_domain.py b/lib/ansible/modules/network/aci/aci_epg_to_domain.py index b735ebfafe..5c8c3d2f4c 100644 --- a/lib/ansible/modules/network/aci/aci_epg_to_domain.py +++ b/lib/ansible/modules/network/aci/aci_epg_to_domain.py @@ -326,31 +326,31 @@ def main(): aci = ACIModule(module) - allow_useg = module.params['allow_useg'] - ap = module.params['ap'] - deploy_immediacy = module.params['deploy_immediacy'] - domain = module.params['domain'] - domain_type = module.params['domain_type'] - vm_provider = module.params['vm_provider'] - encap = module.params['encap'] + allow_useg = module.params.get('allow_useg') + ap = module.params.get('ap') + deploy_immediacy = module.params.get('deploy_immediacy') + domain = module.params.get('domain') + domain_type = module.params.get('domain_type') + vm_provider = module.params.get('vm_provider') + encap = module.params.get('encap') if encap is not None: if encap in range(1, 4097): encap = 'vlan-{0}'.format(encap) else: module.fail_json(msg='Valid VLAN assignments are from 1 to 4096') - encap_mode = module.params['encap_mode'] - switching_mode = module.params['switching_mode'] - epg = module.params['epg'] - netflow = aci.boolean(module.params['netflow'], 'enabled', 'disabled') - primary_encap = module.params['primary_encap'] + encap_mode = module.params.get('encap_mode') + switching_mode = module.params.get('switching_mode') + epg = module.params.get('epg') + netflow = aci.boolean(module.params.get('netflow'), 'enabled', 'disabled') + primary_encap = module.params.get('primary_encap') if primary_encap is not None: if primary_encap in range(1, 4097): primary_encap = 'vlan-{0}'.format(primary_encap) else: module.fail_json(msg='Valid VLAN assignments are from 1 to 4096') - resolution_immediacy = module.params['resolution_immediacy'] - state = module.params['state'] - tenant = module.params['tenant'] + resolution_immediacy = module.params.get('resolution_immediacy') + state = module.params.get('state') + tenant = module.params.get('tenant') if domain_type in ['l2dom', 'phys'] and vm_provider is not None: module.fail_json(msg="Domain type '%s' cannot have a 'vm_provider'" % domain_type) |