mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
parent
00332a49d5
commit
03dd3214b4
2 changed files with 12 additions and 13 deletions
|
@ -144,36 +144,36 @@ def main():
|
||||||
state = module.params['state']
|
state = module.params['state']
|
||||||
|
|
||||||
if domain_type != 'vmm' and vm_provider is not None:
|
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
|
# Compile the full domain for URL building
|
||||||
if domain_type == 'fc':
|
if domain_type == 'fc':
|
||||||
domain_class = 'fcDomP'
|
domain_class = 'fcDomP'
|
||||||
domain_mo = 'uni/fc-{}'.format(domain)
|
domain_mo = 'uni/fc-{0}'.format(domain)
|
||||||
domain_rn = 'fc-{}'.format(domain)
|
domain_rn = 'fc-{0}'.format(domain)
|
||||||
elif domain_type == 'l2dom':
|
elif domain_type == 'l2dom':
|
||||||
domain_class = 'l2extDomP'
|
domain_class = 'l2extDomP'
|
||||||
domain_mo = 'uni/l2dom-{}'.format(domain)
|
domain_mo = 'uni/l2dom-{0}'.format(domain)
|
||||||
domain_rn = 'l2dom-{}'.format(domain)
|
domain_rn = 'l2dom-{0}'.format(domain)
|
||||||
elif domain_type == 'l3dom':
|
elif domain_type == 'l3dom':
|
||||||
domain_class = 'l3extDomP'
|
domain_class = 'l3extDomP'
|
||||||
domain_mo = 'uni/l3dom-{}'.format(domain)
|
domain_mo = 'uni/l3dom-{0}'.format(domain)
|
||||||
domain_rn = 'l3dom-{}'.format(domain)
|
domain_rn = 'l3dom-{0}'.format(domain)
|
||||||
elif domain_type == 'phys':
|
elif domain_type == 'phys':
|
||||||
domain_class = 'physDomP'
|
domain_class = 'physDomP'
|
||||||
domain_mo = 'uni/phys-{}'.format(domain)
|
domain_mo = 'uni/phys-{0}'.format(domain)
|
||||||
domain_rn = 'phys-{}'.format(domain)
|
domain_rn = 'phys-{0}'.format(domain)
|
||||||
elif domain_type == 'vmm':
|
elif domain_type == 'vmm':
|
||||||
domain_class = 'vmmDomP'
|
domain_class = 'vmmDomP'
|
||||||
domain_mo = 'uni/vmmp-{}/dom-{}'.format(VM_PROVIDER_MAPPING[vm_provider], domain)
|
domain_mo = 'uni/vmmp-{0}/dom-{1}'.format(VM_PROVIDER_MAPPING[vm_provider], domain)
|
||||||
domain_rn = 'dom-{}'.format(domain)
|
domain_rn = 'dom-{0}'.format(domain)
|
||||||
|
|
||||||
aci = ACIModule(module)
|
aci = ACIModule(module)
|
||||||
aci.construct_url(
|
aci.construct_url(
|
||||||
root_class=dict(
|
root_class=dict(
|
||||||
aci_class=domain_class,
|
aci_class=domain_class,
|
||||||
aci_rn=domain_rn,
|
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,
|
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.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.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_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_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_domain_to_vlan_pool.py ansible-format-automatic-specification
|
||||||
lib/ansible/modules/network/aci/aci_epg.py ansible-format-automatic-specification
|
lib/ansible/modules/network/aci/aci_epg.py ansible-format-automatic-specification
|
||||||
|
|
Loading…
Reference in a new issue