Fix new pylint issue (#34772)

Is it all worth it ?
pull/34775/head
Dag Wieers 7 years ago committed by GitHub
parent 00332a49d5
commit 03dd3214b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -144,36 +144,36 @@ def main():
state = module.params['state']
if domain_type != 'vmm' and vm_provider is not None:
module.fail_json(msg="Domain type '{}' cannot have a 'vm_provider'".format(domain_type))
module.fail_json(msg="Domain type '{0}' cannot have a 'vm_provider'".format(domain_type))
# Compile the full domain for URL building
if domain_type == 'fc':
domain_class = 'fcDomP'
domain_mo = 'uni/fc-{}'.format(domain)
domain_rn = 'fc-{}'.format(domain)
domain_mo = 'uni/fc-{0}'.format(domain)
domain_rn = 'fc-{0}'.format(domain)
elif domain_type == 'l2dom':
domain_class = 'l2extDomP'
domain_mo = 'uni/l2dom-{}'.format(domain)
domain_rn = 'l2dom-{}'.format(domain)
domain_mo = 'uni/l2dom-{0}'.format(domain)
domain_rn = 'l2dom-{0}'.format(domain)
elif domain_type == 'l3dom':
domain_class = 'l3extDomP'
domain_mo = 'uni/l3dom-{}'.format(domain)
domain_rn = 'l3dom-{}'.format(domain)
domain_mo = 'uni/l3dom-{0}'.format(domain)
domain_rn = 'l3dom-{0}'.format(domain)
elif domain_type == 'phys':
domain_class = 'physDomP'
domain_mo = 'uni/phys-{}'.format(domain)
domain_rn = 'phys-{}'.format(domain)
domain_mo = 'uni/phys-{0}'.format(domain)
domain_rn = 'phys-{0}'.format(domain)
elif domain_type == 'vmm':
domain_class = 'vmmDomP'
domain_mo = 'uni/vmmp-{}/dom-{}'.format(VM_PROVIDER_MAPPING[vm_provider], domain)
domain_rn = 'dom-{}'.format(domain)
domain_mo = 'uni/vmmp-{0}/dom-{1}'.format(VM_PROVIDER_MAPPING[vm_provider], domain)
domain_rn = 'dom-{0}'.format(domain)
aci = ACIModule(module)
aci.construct_url(
root_class=dict(
aci_class=domain_class,
aci_rn=domain_rn,
filter_target='eq({}.name, "{}")'.format(domain_class, domain),
filter_target='eq({0}.name, "{1}")'.format(domain_class, domain),
module_object=domain_mo,
),
)

@ -47,7 +47,6 @@ lib/ansible/modules/network/aci/aci_config_snapshot.py ansible-format-automatic-
lib/ansible/modules/network/aci/aci_contract.py ansible-format-automatic-specification
lib/ansible/modules/network/aci/aci_contract_subject.py ansible-format-automatic-specification
lib/ansible/modules/network/aci/aci_contract_subject_to_filter.py ansible-format-automatic-specification
lib/ansible/modules/network/aci/aci_domain.py ansible-format-automatic-specification
lib/ansible/modules/network/aci/aci_domain_to_encap_pool.py ansible-format-automatic-specification
lib/ansible/modules/network/aci/aci_domain_to_vlan_pool.py ansible-format-automatic-specification
lib/ansible/modules/network/aci/aci_epg.py ansible-format-automatic-specification

Loading…
Cancel
Save