From 03dd3214b466c7135e253a84c3e6f74f505e39f8 Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Fri, 12 Jan 2018 02:25:03 +0100 Subject: [PATCH] Fix new pylint issue (#34772) Is it all worth it ? --- lib/ansible/modules/network/aci/aci_domain.py | 24 +++++++++---------- test/sanity/pylint/ignore.txt | 1 - 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/lib/ansible/modules/network/aci/aci_domain.py b/lib/ansible/modules/network/aci/aci_domain.py index 0390eacc81d..cc66780538e 100644 --- a/lib/ansible/modules/network/aci/aci_domain.py +++ b/lib/ansible/modules/network/aci/aci_domain.py @@ -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, ), ) diff --git a/test/sanity/pylint/ignore.txt b/test/sanity/pylint/ignore.txt index 2b3be608673..7a17321237a 100644 --- a/test/sanity/pylint/ignore.txt +++ b/test/sanity/pylint/ignore.txt @@ -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