1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

ACI: Fixing new pylint issue (#34775)

This commit is contained in:
Dag Wieers 2018-01-12 08:07:59 +01:00 committed by GitHub
parent e3b5be0887
commit 628eca85c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 257 additions and 401 deletions

View file

@ -382,7 +382,7 @@ class ACIModule(object):
path, filter_string = self._construct_url_1(root_class, child_includes)
self.result['path'] = path
self.result['url'] = '{}://{}/{}'.format(self.module.params['protocol'], self.module.params['hostname'], path)
self.result['url'] = '{0}://{1}/{2}'.format(self.module.params['protocol'], self.module.params['hostname'], path)
self.result['filter_string'] = filter_string
def _construct_url_1(self, obj, child_includes):
@ -395,15 +395,15 @@ class ACIModule(object):
# State is present or absent
if self.module.params['state'] != 'query':
path = 'api/mo/uni/{}.json'.format(obj_rn)
path = 'api/mo/uni/{0}.json'.format(obj_rn)
filter_string = '?rsp-prop-include=config-only' + child_includes
# Query for all objects of the module's class
elif mo is None:
path = 'api/class/{}.json'.format(obj_class)
path = 'api/class/{0}.json'.format(obj_class)
filter_string = ''
# Query for a specific object in the module's class
else:
path = 'api/mo/uni/{}.json'.format(obj_rn)
path = 'api/mo/uni/{0}.json'.format(obj_rn)
filter_string = ''
# Append child_includes to filter_string if filter string is empty
@ -430,26 +430,26 @@ class ACIModule(object):
# State is present or absent
if self.module.params['state'] != 'query':
path = 'api/mo/uni/{}/{}.json'.format(parent_rn, obj_rn)
path = 'api/mo/uni/{0}/{1}.json'.format(parent_rn, obj_rn)
filter_string = '?rsp-prop-include=config-only' + child_includes
# Query for all objects of the module's class
elif mo is None and parent_obj is None:
path = 'api/class/{}.json'.format(obj_class)
path = 'api/class/{0}.json'.format(obj_class)
filter_string = ''
# Queries when parent object is provided
elif parent_obj is not None:
# Query for specific object in the module's class
if mo is not None:
path = 'api/mo/uni/{}/{}.json'.format(parent_rn, obj_rn)
path = 'api/mo/uni/{0}/{1}.json'.format(parent_rn, obj_rn)
filter_string = ''
# Query for all object's of the module's class that belong to a specific parent object
else:
path = 'api/mo/uni/{}.json'.format(parent_rn)
path = 'api/mo/uni/{0}.json'.format(parent_rn)
filter_string = self_child_includes
# Query for all objects of the module's class that match the provided ID value
else:
path = 'api/class/{}.json'.format(obj_class)
filter_string = '?query-target-filter={}'.format(obj_filter) + child_includes
path = 'api/class/{0}.json'.format(obj_class)
filter_string = '?query-target-filter={0}'.format(obj_filter) + child_includes
# Append child_includes to filter_string if filter string is empty
if child_includes is not None and filter_string == '':
@ -475,20 +475,20 @@ class ACIModule(object):
if not child_includes:
self_child_includes = '&rsp-subtree=full&rsp-subtree-class=' + obj_class
else:
self_child_includes = '{},{}'.format(child_includes, obj_class)
self_child_includes = '{0},{1}'.format(child_includes, obj_class)
if not child_includes:
parent_self_child_includes = '&rsp-subtree=full&rsp-subtree-class={},{}'.format(parent_class, obj_class)
parent_self_child_includes = '&rsp-subtree=full&rsp-subtree-class={0},{1}'.format(parent_class, obj_class)
else:
parent_self_child_includes = '{},{},{}'.format(child_includes, parent_class, obj_class)
parent_self_child_includes = '{0},{1},{2}'.format(child_includes, parent_class, obj_class)
# State is ablsent or present
if self.module.params['state'] != 'query':
path = 'api/mo/uni/{}/{}/{}.json'.format(root_rn, parent_rn, obj_rn)
path = 'api/mo/uni/{0}/{1}/{2}.json'.format(root_rn, parent_rn, obj_rn)
filter_string = '?rsp-prop-include=config-only' + child_includes
# Query for all objects of the module's class
elif mo is None and parent_obj is None and root_obj is None:
path = 'api/class/{}.json'.format(obj_class)
path = 'api/class/{0}.json'.format(obj_class)
filter_string = ''
# Queries when root object is provided
elif root_obj is not None:
@ -496,37 +496,37 @@ class ACIModule(object):
if parent_obj is not None:
# Query for a specific object of the module's class
if mo is not None:
path = 'api/mo/uni/{}/{}/{}.json'.format(root_rn, parent_rn, obj_rn)
path = 'api/mo/uni/{0}/{1}/{2}.json'.format(root_rn, parent_rn, obj_rn)
filter_string = ''
# Query for all objects of the module's class that belong to a specific parent object
else:
path = 'api/mo/uni/{}/{}.json'.format(root_rn, parent_rn)
path = 'api/mo/uni/{0}/{1}.json'.format(root_rn, parent_rn)
filter_string = self_child_includes.replace('&', '?', 1)
# Query for all objects of the module's class that match the provided ID value and belong to a specefic root object
elif mo is not None:
path = 'api/mo/uni/{}.json'.format(root_rn)
filter_string = '?rsp-subtree-filter={}{}'.format(obj_filter, self_child_includes)
path = 'api/mo/uni/{0}.json'.format(root_rn)
filter_string = '?rsp-subtree-filter={0}{1}'.format(obj_filter, self_child_includes)
# Query for all objects of the module's class that belong to a specific root object
else:
path = 'api/mo/uni/{}.json'.format(root_rn)
path = 'api/mo/uni/{0}.json'.format(root_rn)
filter_string = '?' + parent_self_child_includes
# Queries when parent object is provided but root object is not provided
elif parent_obj is not None:
# Query for all objects of the module's class that belong to any parent class
# matching the provided ID values for both object and parent object
if mo is not None:
path = 'api/class/{}.json'.format(parent_class)
filter_string = '?query-target-filter={}{}&rsp-subtree-filter={}'.format(
path = 'api/class/{0}.json'.format(parent_class)
filter_string = '?query-target-filter={0}{1}&rsp-subtree-filter={2}'.format(
parent_filter, self_child_includes, obj_filter)
# Query for all objects of the module's class that belong to any parent class
# matching the provided ID value for the parent object
else:
path = 'api/class/{}.json'.format(parent_class)
filter_string = '?query-target-filter={}{}'.format(parent_filter, self_child_includes)
path = 'api/class/{0}.json'.format(parent_class)
filter_string = '?query-target-filter={1}{2}'.format(parent_filter, self_child_includes)
# Query for all objects of the module's class matching the provided ID value of the object
else:
path = 'api/class/{}.json'.format(obj_class)
filter_string = '?query-target-filter={}'.format(obj_filter) + child_includes
path = 'api/class/{0}.json'.format(obj_class)
filter_string = '?query-target-filter={0}'.format(obj_filter) + child_includes
# append child_includes to filter_string if filter string is empty
if child_includes is not None and filter_string == '':
@ -557,10 +557,10 @@ class ACIModule(object):
# State is ablsent or present
if self.module.params['state'] != 'query':
path = 'api/mo/uni/{}/{}/{}/{}.json'.format(root_rn, sec_rn, parent_rn, obj_rn)
path = 'api/mo/uni/{0}/{1}/{2}/{3}.json'.format(root_rn, sec_rn, parent_rn, obj_rn)
filter_string = '?rsp-prop-include=config-only' + child_includes
else:
path = 'api/class/{}.json'.format(obj_class)
path = 'api/class/{0}.json'.format(obj_class)
filter_string = child_includes
return path, filter_string

View file

@ -16,15 +16,11 @@ module: aci_ap
short_description: Manage top level Application Profile (AP) objects on Cisco ACI fabrics (fv:Ap)
description:
- Manage top level Application Profile (AP) objects on Cisco ACI fabrics
- More information from the internal APIC class
I(fv:Ap) at U(https://developer.cisco.com/media/mim-ref/MO-fvAp.html).
- More information from the internal APIC class I(fv:Ap) at
U(https://developer.cisco.com/media/mim-ref/MO-fvAp.html).
author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes:
- This module does not manage EPGs, see M(aci_epg) to do this.
- The C(tenant) used must exist before using this module in your playbook.
@ -126,14 +122,14 @@ def main():
aci.construct_url(
root_class=dict(
aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant),
aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant,
),
subclass_1=dict(
aci_class='fvAp',
aci_rn='ap-{}'.format(ap),
filter_target='eq(fvAp.name, "{}")'.format(ap),
aci_rn='ap-{0}'.format(ap),
filter_target='eq(fvAp.name, "{0}")'.format(ap),
module_object=ap,
),
)

View file

@ -16,14 +16,10 @@ module: aci_bd
short_description: Manage Bridge Domains (BD) on Cisco ACI Fabrics (fv:BD)
description:
- Manages Bridge Domains (BD) on Cisco ACI Fabrics.
- More information from the internal APIC class
I(fv:BD) at U(https://developer.cisco.com/media/mim-ref/MO-fvBD.html).
- More information from the internal APIC class I(fv:BD) at
U(https://developer.cisco.com/media/mim-ref/MO-fvBD.html).
author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
requirements:
- ACI Fabric 1.0(3f)+
version_added: '2.4'
notes:
- The C(tenant) used must exist before using this module in your playbook.
@ -282,14 +278,14 @@ def main():
aci.construct_url(
root_class=dict(
aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant),
aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant,
),
subclass_1=dict(
aci_class='fvBD',
aci_rn='BD-{}'.format(bd),
filter_target='eq(fvBD.name, "{}")'.format(bd),
aci_rn='BD-{0}'.format(bd),
filter_target='eq(fvBD.name, "{0}")'.format(bd),
module_object=bd,
),
child_classes=['fvRsCtx', 'fvRsIgmpsn', 'fvRsBDToNdP', 'fvRsBdToEpRet'],

View file

@ -16,15 +16,11 @@ module: aci_bd_subnet
short_description: Manage Subnets on Cisco ACI fabrics (fv:Subnet)
description:
- Manage Subnets on Cisco ACI fabrics.
- More information from the internal APIC class
I(fv:Subnet) at U(https://developer.cisco.com/media/mim-ref/MO-fvSubnet.html).
- More information from the internal APIC class I(fv:Subnet) at
U(https://developer.cisco.com/media/mim-ref/MO-fvSubnet.html).
author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes:
- The C(gateway) parameter is the root key used to access the Subnet (not name), so the C(gateway)
is required when the state is C(absent) or C(present).
@ -248,7 +244,7 @@ def main():
# TODO: split checkes between IPv4 and IPv6 Addresses
module.fail_json(msg='Valid Subnet Masks are 0 to 32 for IPv4 Addresses and 0 to 128 for IPv6 addresses')
if gateway is not None:
gateway = '{}/{}'.format(gateway, str(mask))
gateway = '{0}/{1}'.format(gateway, str(mask))
subnet_name = module.params['subnet_name']
nd_prefix_policy = module.params['nd_prefix_policy']
preferred = module.params['preferred']
@ -271,20 +267,20 @@ def main():
aci.construct_url(
root_class=dict(
aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant),
filter_target='eq(fvTenant.name, \"{}\")'.format(tenant),
aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant,
),
subclass_1=dict(
aci_class='fvBD',
aci_rn='BD-{}'.format(bd),
filter_target='eq(fvBD.name, \"{}\")'.format(bd),
aci_rn='BD-{0}'.format(bd),
filter_target='eq(fvBD.name, "{0}")'.format(bd),
module_object=bd,
),
subclass_2=dict(
aci_class='fvSubnet',
aci_rn='subnet-[{}]'.format(gateway),
filter_target='eq(fvSubnet.ip, \"{}\")'.format(gateway),
aci_rn='subnet-[{0}]'.format(gateway),
filter_target='eq(fvSubnet.ip, "{0}")'.format(gateway),
module_object=gateway,
),
child_classes=['fvRsBDSubnetToProfile', 'fvRsNdPfxPol'],

View file

@ -16,15 +16,11 @@ module: aci_bd_to_l3out
short_description: Bind Bridge Domain to L3 Out on Cisco ACI fabrics (fv:RsBDToOut)
description:
- Bind Bridge Domain to L3 Out on Cisco ACI fabrics.
- More information from the internal APIC class
I(fv:RsBDToOut) at U(https://developer.cisco.com/media/mim-ref/MO-fvRsBDToOut.html).
- More information from the internal APIC class I(fv:RsBDToOut) at
U(https://developer.cisco.com/media/mim-ref/MO-fvRsBDToOut.html).
author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes:
- The C(bd) and C(l3out) parameters should exist before using this module.
The M(aci_bd) and M(aci_l3out) can be used for these.
@ -88,20 +84,20 @@ def main():
aci.construct_url(
root_class=dict(
aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant),
aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant,
),
subclass_1=dict(
aci_class='fvBD',
aci_rn='BD-{}'.format(bd),
filter_target='eq(fvBD.name, "{}")'.format(bd),
aci_rn='BD-{0}'.format(bd),
filter_target='eq(fvBD.name, "{0}")'.format(bd),
module_object=bd,
),
subclass_2=dict(
aci_class='fvRsBDToOut',
aci_rn='rsBDToOut-{}'.format(l3out),
filter_target='eq(fvRsBDToOut.tnL3extOutName, "{}")'.format(l3out),
aci_rn='rsBDToOut-{0}'.format(l3out),
filter_target='eq(fvRsBDToOut.tnL3extOutName, "{0}")'.format(l3out),
module_object=l3out,
),
)

View file

@ -20,12 +20,8 @@ description:
- More information from the internal APIC class
I(config:ImportP) at U(https://developer.cisco.com/media/mim-ref/MO-configImportP.html).
author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
options:
compare_export_policy:
description:
@ -199,8 +195,8 @@ def main():
aci.construct_url(
root_class=dict(
aci_class='configImportP',
aci_rn='fabric/configimp-{}'.format(import_policy),
filter_target='eq(configImportP.name, "{}")'.format(import_policy),
aci_rn='fabric/configimp-{0}'.format(import_policy),
filter_target='eq(configImportP.name, "{0}")'.format(import_policy),
module_object=import_policy,
),
)

View file

@ -18,16 +18,13 @@ description:
- Manage Config Snapshots on Cisco ACI fabrics.
- Creating new Snapshots is done using the configExportP class.
- Removing Snapshots is done using the configSnapshot class.
- More information from the internal APIC classes
I(config:Snapshot) at U(https://developer.cisco.com/media/mim-ref/MO-configSnapshot.html) and
I(config:ExportP) at U(https://developer.cisco.com/media/mim-ref/MO-configExportP.html).
- More information from the internal APIC classes I(config:Snapshot) at
U(https://developer.cisco.com/media/mim-ref/MO-configSnapshot.html)
and I(config:ExportP) at
U(https://developer.cisco.com/media/mim-ref/MO-configExportP.html).
author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4'
requirements:
- Tested with ACI Fabric 1.0(3f)+
notes:
- The APIC does not provide a mechanism for naming the snapshots.
- 'Snapshot files use the following naming structure: ce_<config export policy name>-<yyyy>-<mm>-<dd>T<hh>:<mm>:<ss>.<mss>+<hh>:<mm>.'
@ -155,8 +152,8 @@ def main():
aci.construct_url(
root_class=dict(
aci_class='configExportP',
aci_rn='fabric/configexp-{}'.format(export_policy),
filter_target='eq(configExportP.name, "{}")'.format(export_policy),
aci_rn='fabric/configexp-{0}'.format(export_policy),
filter_target='eq(configExportP.name, "{0}")'.format(export_policy),
module_object=export_policy,
),
)
@ -185,19 +182,19 @@ def main():
else:
# Prefix the proper url to export_policy
if export_policy is not None:
export_policy = 'uni/fabric/configexp-{}'.format(export_policy)
export_policy = 'uni/fabric/configexp-{0}'.format(export_policy)
aci.construct_url(
root_class=dict(
aci_class='configSnapshotCont',
aci_rn='backupst/snapshots-[{}]'.format(export_policy),
filter_target='(configSnapshotCont.name, "{}")'.format(export_policy),
aci_rn='backupst/snapshots-[{0}]'.format(export_policy),
filter_target='(configSnapshotCont.name, "{0}")'.format(export_policy),
module_object=export_policy,
),
subclass_1=dict(
aci_class='configSnapshot',
aci_rn='snapshot-{}'.format(snapshot),
filter_target='(configSnapshot.name, "{}")'.format(snapshot),
aci_rn='snapshot-{0}'.format(snapshot),
filter_target='(configSnapshot.name, "{0}")'.format(snapshot),
module_object=snapshot,
),
)

View file

@ -16,15 +16,11 @@ module: aci_contract
short_description: Manage contract resources on Cisco ACI fabrics (vz:BrCP)
description:
- Manage Contract resources on Cisco ACI fabrics.
- More information from the internal APIC class
I(vz:BrCP) at U(https://developer.cisco.com/media/mim-ref/MO-vzBrCP.html).
- More information from the internal APIC class I(vz:BrCP) at
U(https://developer.cisco.com/media/mim-ref/MO-vzBrCP.html).
author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes:
- This module does not manage Contract Subjects, see M(aci_contract_subject) to do this.
Contract Subjects can still be removed using this module.
@ -129,14 +125,14 @@ def main():
aci.construct_url(
root_class=dict(
aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant),
aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant,
),
subclass_1=dict(
aci_class='vzBrCP',
aci_rn='brc-{}'.format(contract),
filter_target='eq(vzBrCP.name, "{}")'.format(contract),
aci_rn='brc-{0}'.format(contract),
filter_target='eq(vzBrCP.name, "{0}")'.format(contract),
module_object=contract,
),
)

View file

@ -16,15 +16,11 @@ module: aci_contract_subject
short_description: Manage initial Contract Subjects on Cisco ACI fabrics (vz:Subj)
description:
- Manage initial Contract Subjects on Cisco ACI fabrics.
- More information from the internal APIC class
I(vz:Subj) at U(https://developer.cisco.com/media/mim-ref/MO-vzSubj.html).
- More information from the internal APIC class I(vz:Subj) at
U(https://developer.cisco.com/media/mim-ref/MO-vzSubj.html).
author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes:
- The C(tenant) and C(contract) used must exist before using this module in your playbook.
- The M(aci_tenant) and M(aci_contract) modules can be used for this.
@ -184,26 +180,26 @@ def main():
tenant = module.params['tenant']
if directive is not None or filter_name is not None:
module.fail_json(msg='Managing Contract Subjects to Filter bindings has been moved to M(aci_subject_bind_filter)')
module.fail_json(msg="Managing Contract Subjects to Filter bindings has been moved to module 'aci_subject_bind_filter'")
aci = ACIModule(module)
aci.construct_url(
root_class=dict(
aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant),
aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant,
),
subclass_1=dict(
aci_class='vzBrCP',
aci_rn='brc-{}'.format(contract),
filter_target='eq(vzBrCP.name, "{}")'.format(contract),
aci_rn='brc-{0}'.format(contract),
filter_target='eq(vzBrCP.name, "{0}")'.format(contract),
module_object=contract,
),
subclass_2=dict(
aci_class='vzSubj',
aci_rn='subj-{}'.format(subject),
filter_target='eq(vzSubj.name, "{}")'.format(subject),
aci_rn='subj-{0}'.format(subject),
filter_target='eq(vzSubj.name, "{0}")'.format(subject),
module_object=subject,
),
)

View file

@ -16,11 +16,9 @@ module: aci_contract_subject_to_filter
short_description: Bind Contract Subjects to Filters on Cisco ACI fabrics (vz:RsSubjFiltAtt)
description:
- Bind Contract Subjects to Filters on Cisco ACI fabrics.
- More information from the internal APIC class
I(vz:RsSubjFiltAtt) at U(https://developer.cisco.com/media/mim-ref/MO-vzRsSubjFiltAtt.html).
- More information from the internal APIC class I(vz:RsSubjFiltAtt) at
U(https://developer.cisco.com/media/mim-ref/MO-vzRsSubjFiltAtt.html).
author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4'
requirements:
@ -121,26 +119,26 @@ def main():
aci.construct_url(
root_class=dict(
aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant),
aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant,
),
subclass_1=dict(
aci_class='vzBrCP',
aci_rn='brc-{}'.format(contract),
filter_target='eq(vzBrCP.name, "{}")'.format(contract),
aci_rn='brc-{0}'.format(contract),
filter_target='eq(vzBrCP.name, "{0}")'.format(contract),
module_object=contract,
),
subclass_2=dict(
aci_class='vzSubj',
aci_rn='subj-{}'.format(subject),
filter_target='eq(vzSubj.name, "{}")'.format(subject),
aci_rn='subj-{0}'.format(subject),
filter_target='eq(vzSubj.name, "{0}")'.format(subject),
module_object=subject,
),
subclass_3=dict(
aci_class='vzRsSubjFiltAtt',
aci_rn='rssubjFiltAtt-{}'.format(filter_name),
filter_target='eq(vzRsSubjFiltAtt.tnVzFilterName, "{}")'.format(filter_name),
aci_rn='rssubjFiltAtt-{0}'.format(filter_name),
filter_target='eq(vzRsSubjFiltAtt.tnVzFilterName, "{0}")'.format(filter_name),
module_object=filter_name,
),
)

View file

@ -120,7 +120,7 @@ def main():
# Report when vm_provider is set when type is not virtual
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))
# ACI Pool URL requires the allocation mode for vlan and vsan pools (ex: uni/infra/vlanns-[poolname]-static)
pool_name = pool
@ -128,7 +128,7 @@ def main():
if pool_allocation_mode is not None:
pool_name = '[{0}]-{1}'.format(pool, pool_allocation_mode)
else:
module.fail_json(msg='ACI requires the "pool_allocation_mode" for "pool_type" of "vlan" and "vsan" when the "pool" is provided')
module.fail_json(msg="ACI requires the 'pool_allocation_mode' for 'pool_type' of 'vlan' and 'vsan' when 'pool' is provided")
# Vxlan pools do not support allocation modes
if pool_type == 'vxlan' and pool_allocation_mode is not None:
@ -137,24 +137,24 @@ def main():
# 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 == 'l2ext':
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 == 'l3ext':
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 = '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 = 'vmmp-{0}/dom-{1}'.format(VM_PROVIDER_MAPPING[vm_provider], domain)
pool_mo = POOL_MAPPING[pool_type]["aci_mo"] + pool_name
@ -163,7 +163,7 @@ def main():
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,
),
child_classes=['infraRsVlanNs'],

View file

@ -165,7 +165,7 @@ def main():
# Report when vm_provider is set when type is not virtual
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))
# ACI Pool URL requires the allocation mode for vlan and vsan pools (ex: uni/infra/vlanns-[poolname]-static)
pool_name = pool
@ -175,24 +175,24 @@ def main():
# 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 == 'l2ext':
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 == 'l3ext':
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_mo = 'uni/infra/vlanns-' + pool_name
@ -201,7 +201,7 @@ def main():
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,
),
child_classes=['infraRsVlanNs'],

View file

@ -16,15 +16,11 @@ module: aci_epg
short_description: Manage End Point Groups (EPG) on Cisco ACI fabrics (fv:AEPg)
description:
- Manage End Point Groups (EPG) on Cisco ACI fabrics.
- More information from the internal APIC class
I(fv:AEPg) at U(https://developer.cisco.com/media/mim-ref/MO-fvAEPg.html).
- More information from the internal APIC class I(fv:AEPg) at
U(https://developer.cisco.com/media/mim-ref/MO-fvAEPg.html).
author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob Mcgill (@jmcgill298)
version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes:
- The C(tenant) and C(app_profile) used must exist before using this module in your playbook.
The M(aci_tenant) and M(aci_ap) modules can be used for this.
@ -200,20 +196,20 @@ def main():
aci.construct_url(
root_class=dict(
aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant),
aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant,
),
subclass_1=dict(
aci_class='fvAp',
aci_rn='ap-{}'.format(ap),
filter_target='eq(fvAp.name, "{}")'.format(ap),
aci_rn='ap-{0}'.format(ap),
filter_target='eq(fvAp.name, "{0}")'.format(ap),
module_object=ap,
),
subclass_2=dict(
aci_class='fvAEPg',
aci_rn='epg-{}'.format(epg),
filter_target='eq(fvAEPg.name, "{}")'.format(epg),
aci_rn='epg-{0}'.format(epg),
filter_target='eq(fvAEPg.name, "{0}")'.format(epg),
module_object=epg,
),
child_classes=['fvRsBd'],

View file

@ -16,12 +16,10 @@ module: aci_epg_monitoring_policy
short_description: Manage monitoring policies on Cisco ACI fabrics (mon:EPGPol)
description:
- Manage monitoring policies on Cisco ACI fabrics.
- More information from the internal APIC class
I(mon:EPGPol) at U(https://developer.cisco.com/media/mim-ref/MO-monEPGPol.html).
- More information from the internal APIC class I(mon:EPGPol) at
U(https://developer.cisco.com/media/mim-ref/MO-monEPGPol.html).
author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
@ -99,14 +97,14 @@ def main():
aci.construct_url(
root_class=dict(
aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant),
aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant,
),
subclass_1=dict(
aci_class='monEPGPol',
aci_rn='monepg-{}'.format(monitoring_policy),
filter_target='eq(monEPGPol.name, "{}")'.format(monitoring_policy),
aci_rn='monepg-{0}'.format(monitoring_policy),
filter_target='eq(monEPGPol.name, "{0}")'.format(monitoring_policy),
module_object=monitoring_policy,
),
)

View file

@ -16,16 +16,13 @@ module: aci_epg_to_contract
short_description: Bind EPGs to Contracts on Cisco ACI fabrics (fv:RsCons and fv:RsProv)
description:
- Bind EPGs to Contracts on Cisco ACI fabrics.
- More information from the internal APIC classes
I(fv:RsCons) at U(https://developer.cisco.com/media/mim-ref/MO-fvRsCons.html) and
I(fv:RsProv) at U(https://developer.cisco.com/media/mim-ref/MO-fvRsProv.html).
- More information from the internal APIC classes I(fv:RsCons) at
U(https://developer.cisco.com/media/mim-ref/MO-fvRsCons.html)
and I(fv:RsProv) at
U(https://developer.cisco.com/media/mim-ref/MO-fvRsProv.html).
author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob Mcgill (@jmcgill298)
- Jacob McGill (@jmcgill298)
version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes:
- The C(tenant), C(app_profile), C(EPG), and C(Contract) used must exist before using this module in your playbook.
The M(aci_tenant), M(aci_ap), M(aci_epg), and M(aci_contract) modules can be used for this.
@ -127,26 +124,26 @@ def main():
aci.construct_url(
root_class=dict(
aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant),
aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant,
),
subclass_1=dict(
aci_class='fvAp',
aci_rn='ap-{}'.format(ap),
filter_target='eq(fvAp.name, "{}")'.format(ap),
aci_rn='ap-{0}'.format(ap),
filter_target='eq(fvAp.name, "{0}")'.format(ap),
module_object=ap,
),
subclass_2=dict(
aci_class='fvAEPg',
aci_rn='epg-{}'.format(epg),
filter_target='eq(fvAEPg.name, "{}")'.format(epg),
aci_rn='epg-{0}'.format(epg),
filter_target='eq(fvAEPg.name, "{0}")'.format(epg),
module_object=epg,
),
subclass_3=dict(
aci_class=aci_class,
aci_rn='{}{}'.format(aci_rn, contract),
filter_target='eq({}.tnVzBrCPName, "{}'.format(aci_class, contract),
aci_rn='{0}{1}'.format(aci_rn, contract),
filter_target='eq({0}.tnVzBrCPName, "{1}'.format(aci_class, contract),
module_object=contract,
),
)

View file

@ -16,15 +16,11 @@ module: aci_epg_to_domain
short_description: Bind EPGs to Domains on Cisco ACI fabrics (fv:RsDomAtt)
description:
- Bind EPGs to Physical and Virtual Domains on Cisco ACI fabrics.
- More information from the internal APIC class
I(fv:RsDomAtt) at U(https://developer.cisco.com/media/mim-ref/MO-fvRsDomAtt.html).
- More information from the internal APIC class I(fv:RsDomAtt) at
U(https://developer.cisco.com/media/mim-ref/MO-fvRsDomAtt.html).
author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob Mcgill (@jmcgill298)
- Jacob McGill (@jmcgill298)
version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes:
- The C(tenant), C(ap), C(epg), and C(domain) used must exist before using this module in your playbook.
The M(aci_tenant) M(aci_ap), M(aci_epg) M(aci_domain) modules can be used for this.
@ -109,7 +105,11 @@ RETURN = r''' # '''
from ansible.module_utils.network.aci.aci import ACIModule, aci_argument_spec
from ansible.module_utils.basic import AnsibleModule
VM_PROVIDER_MAPPING = dict(microsoft="uni/vmmp-Microsoft/dom-", openstack="uni/vmmp-OpenStack/dom-", vmware="uni/vmmp-VMware/dom-")
VM_PROVIDER_MAPPING = dict(
microsoft="uni/vmmp-Microsoft/dom-",
openstack="uni/vmmp-OpenStack/dom-",
vmware="uni/vmmp-VMware/dom-",
)
def main():
@ -151,7 +151,7 @@ def main():
encap = module.params['encap']
if encap is not None:
if encap in range(1, 4097):
encap = 'vlan-{}'.format(encap)
encap = 'vlan-{0}'.format(encap)
else:
module.fail_json(msg='Valid VLAN assigments are from 1 to 4096')
encap_mode = module.params['encap_mode']
@ -160,7 +160,7 @@ def main():
primary_encap = module.params['primary_encap']
if primary_encap is not None:
if primary_encap in range(1, 4097):
primary_encap = 'vlan-{}'.format(primary_encap)
primary_encap = 'vlan-{0}'.format(primary_encap)
else:
module.fail_json(msg='Valid VLAN assigments are from 1 to 4096')
resolution_immediacy = module.params['resolution_immediacy']
@ -172,9 +172,9 @@ def main():
# Compile the full domain for URL building
if domain_type == 'vmm':
epg_domain = '{}{}'.format(VM_PROVIDER_MAPPING[vm_provider], domain)
epg_domain = '{0}{1}'.format(VM_PROVIDER_MAPPING[vm_provider], domain)
elif domain_type is not None:
epg_domain = 'uni/phys-{}'.format(domain)
epg_domain = 'uni/phys-{0}'.format(domain)
else:
epg_domain = None
@ -182,26 +182,26 @@ def main():
aci.construct_url(
root_class=dict(
aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant),
aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant,
),
subclass_1=dict(
aci_class='fvAp',
aci_rn='ap-{}'.format(ap),
filter_target='eq(fvAp.name, "{}")'.format(ap),
aci_rn='ap-{0}'.format(ap),
filter_target='eq(fvAp.name, "{0}")'.format(ap),
module_object=ap,
),
subclass_2=dict(
aci_class='fvAEPg',
aci_rn='epg-{}'.format(epg),
filter_target='eq(fvTenant.name, "{}")'.format(epg),
aci_rn='epg-{0}'.format(epg),
filter_target='eq(fvTenant.name, "{0}")'.format(epg),
module_object=epg,
),
subclass_3=dict(
aci_class='fvRsDomAtt',
aci_rn='rsdomAtt-[{}]'.format(epg_domain),
filter_target='eq(fvRsDomAtt.tDn, "{}")'.format(epg_domain),
aci_rn='rsdomAtt-[{0}]'.format(epg_domain),
filter_target='eq(fvRsDomAtt.tDn, "{0}")'.format(epg_domain),
module_object=epg_domain,
),
)

View file

@ -16,16 +16,12 @@ module: aci_filter
short_description: Manages top level filter objects on Cisco ACI fabrics (vz:Filter)
description:
- Manages top level filter objects on Cisco ACI fabrics.
- More information from the internal APIC class
I(vz:Filter) at U(https://developer.cisco.com/media/mim-ref/MO-vzFilter.html).
- More information from the internal APIC class I(vz:Filter) at
U(https://developer.cisco.com/media/mim-ref/MO-vzFilter.html).
- This modules does not manage filter entries, see M(aci_filter_entry) for this functionality.
author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes:
- The C(tenant) used must exist before using this module in your playbook.
The M(aci_tenant) module can be used for this.
@ -127,14 +123,14 @@ def main():
aci.construct_url(
root_class=dict(
aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant),
aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant,
),
subclass_1=dict(
aci_class='vzFilter',
aci_rn='flt-{}'.format(filter_name),
filter_target='eq(vzFilter.name, "{}")'.format(filter_name),
aci_rn='flt-{0}'.format(filter_name),
filter_target='eq(vzFilter.name, "{0}")'.format(filter_name),
module_object=filter_name,
),
)

View file

@ -16,15 +16,11 @@ module: aci_filter_entry
short_description: Manage filter entries on Cisco ACI fabrics (vz:Entry)
description:
- Manage filter entries for a filter on Cisco ACI fabrics.
- More information from the internal APIC class
I(vz:Entry) at U(https://developer.cisco.com/media/mim-ref/MO-vzEntry.html).
- More information from the internal APIC class I(vz:Entry) at
U(https://developer.cisco.com/media/mim-ref/MO-vzEntry.html).
author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4'
requirements:
- Tested with ACI Fabric 1.0(3f)+
notes:
- The C(tenant) and C(filter) used must exist before using this module in your playbook.
The M(aci_tenant) and M(aci_filter) modules can be used for this.
@ -207,20 +203,20 @@ def main():
aci.construct_url(
root_class=dict(
aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant),
aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant,
),
subclass_1=dict(
aci_class='vzFilter',
aci_rn='flt-{}'.format(filter_name),
filter_target='eq(vzFilter.name, "{}")'.format(filter_name),
aci_rn='flt-{0}'.format(filter_name),
filter_target='eq(vzFilter.name, "{0}")'.format(filter_name),
module_object=filter_name,
),
subclass_2=dict(
aci_class='vzEntry',
aci_rn='e-{}'.format(entry),
filter_target='eq(vzEntry.name, "{}")'.format(entry),
aci_rn='e-{0}'.format(entry),
filter_target='eq(vzEntry.name, "{0}")'.format(entry),
module_object=entry
),
)

View file

@ -16,15 +16,11 @@ module: aci_intf_policy_fc
short_description: Manage Fibre Channel interface policies on Cisco ACI fabrics (fc:IfPol)
description:
- Manage ACI Fiber Channel interface policies on Cisco ACI fabrics.
- More information from the internal APIC class
I(fc:IfPol) at U(https://developer.cisco.com/media/mim-ref/MO-fcIfPol.html).
- More information from the internal APIC class I(fc:IfPol) at
U(https://developer.cisco.com/media/mim-ref/MO-fcIfPol.html).
author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
options:
fc_policy:
description:
@ -96,8 +92,8 @@ def main():
aci.construct_url(
root_class=dict(
aci_class='fcIfPol',
aci_rn='infra/fcIfPol-{}'.format(fc_policy),
filter_target='eq(fcIfPol.name, "{}")'.format(fc_policy),
aci_rn='infra/fcIfPol-{0}'.format(fc_policy),
filter_target='eq(fcIfPol.name, "{0}")'.format(fc_policy),
module_object=fc_policy,
),
)

View file

@ -16,15 +16,11 @@ module: aci_intf_policy_l2
short_description: Manage Layer 2 interface policies on Cisco ACI fabrics (l2:IfPol)
description:
- Manage Layer 2 interface policies on Cisco ACI fabrics.
- More information from the internal APIC class
I(l2:IfPol) at U(https://developer.cisco.com/media/mim-ref/MO-l2IfPol.html).
- More information from the internal APIC class I(l2:IfPol) at
U(https://developer.cisco.com/media/mim-ref/MO-l2IfPol.html).
author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
options:
l2_policy:
description:
@ -114,8 +110,8 @@ def main():
aci.construct_url(
root_class=dict(
aci_class='l2IfPol',
aci_rn='infra/l2IfP-{}'.format(l2_policy),
filter_target='eq(l2IfPol.name, "{}")'.format(l2_policy),
aci_rn='infra/l2IfP-{0}'.format(l2_policy),
filter_target='eq(l2IfPol.name, "{0}")'.format(l2_policy),
module_object=l2_policy,
),
)

View file

@ -16,15 +16,11 @@ module: aci_intf_policy_lldp
short_description: Manage LLDP interface policies on Cisco ACI fabrics (lldp:IfPol)
description:
- Manage LLDP interface policies on Cisco ACI fabrics.
- More information from the internal APIC class
I(lldp:IfPol) at U(https://developer.cisco.com/media/mim-ref/MO-lldpIfPol.html).
- More information from the internal APIC class I(lldp:IfPol) at
U(https://developer.cisco.com/media/mim-ref/MO-lldpIfPol.html).
author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
options:
lldp_policy:
description:
@ -105,8 +101,8 @@ def main():
aci.construct_url(
root_class=dict(
aci_class='lldpIfPol',
aci_rn='infra/lldpIfP-{}'.format(lldp_policy),
filter_target='eq(lldpIfPol.name, "{}")'.format(lldp_policy),
aci_rn='infra/lldpIfP-{0}'.format(lldp_policy),
filter_target='eq(lldpIfPol.name, "{0}")'.format(lldp_policy),
module_object=lldp_policy,
),
)

View file

@ -19,12 +19,8 @@ description:
- More information from the internal APIC class
I(mcp:IfPol) at U(https://developer.cisco.com/media/mim-ref/MO-mcpIfPol.html).
author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
options:
mcp:
description:
@ -96,8 +92,8 @@ def main():
aci.construct_url(
root_class=dict(
aci_class='mcpIfPol',
aci_rn='infra/mcpIfP-{}'.format(mcp),
filter_target='eq(mcpIfPol.name, "{}")'.format(mcp),
aci_rn='infra/mcpIfP-{0}'.format(mcp),
filter_target='eq(mcpIfPol.name, "{0}")'.format(mcp),
module_object=mcp,
),
)

View file

@ -16,15 +16,11 @@ module: aci_intf_policy_port_channel
short_description: Manage port channel interface policies on Cisco ACI fabrics (lacp:LagPol)
description:
- Manage port channel interface policies on Cisco ACI fabrics.
- More information from the internal APIC class
I(lacp:LagPol) at U(https://developer.cisco.com/media/mim-ref/MO-lacpLagPol.html).
- More information from the internal APIC class I(lacp:LagPol) at
U(https://developer.cisco.com/media/mim-ref/MO-lacpLagPol.html).
author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
options:
port_channel:
description:
@ -181,8 +177,8 @@ def main():
aci.construct_url(
root_class=dict(
aci_class='lacpLagPol',
aci_rn='infra/lacplagp-{}'.format(port_channel),
filter_target='eq(lacpLagPol.name, "{}")'.format(port_channel),
aci_rn='infra/lacplagp-{0}'.format(port_channel),
filter_target='eq(lacpLagPol.name, "{0}")'.format(port_channel),
module_object=port_channel,
),
)

View file

@ -16,15 +16,11 @@ module: aci_intf_policy_port_security
short_description: Manage port security on Cisco ACI fabrics (l2:PortSecurityPol)
description:
- Manage port security on Cisco ACI fabrics.
- More information from the internal APIC class
I(l2:PortSecurityPol) at U(https://developer.cisco.com/media/mim-ref/MO-l2PortSecurityPol.html).
- More information from the internal APIC class I(l2:PortSecurityPol) at
U(https://developer.cisco.com/media/mim-ref/MO-l2PortSecurityPol.html).
author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
options:
port_security:
description:
@ -97,8 +93,8 @@ def main():
aci.construct_url(
root_class=dict(
aci_class='l2PortSecurityPol',
aci_rn='infra/portsecurityP-{}'.format(port_security),
filter_target='eq(l2PortSecurityPol.name, "{}")'.format(port_security),
aci_rn='infra/portsecurityP-{0}'.format(port_security),
filter_target='eq(l2PortSecurityPol.name, "{0}")'.format(port_security),
module_object=port_security,
),
)

View file

@ -16,15 +16,11 @@ module: aci_l3out_route_tag_policy
short_description: Manage route tag policies on Cisco ACI fabrics (l3ext:RouteTagPol)
description:
- Manage route tag policies on Cisco ACI fabrics.
- More information from the internal APIC class
I(l3ext:RouteTagPol) at U(https://developer.cisco.com/media/mim-ref/MO-l3extRouteTagPol.html).
- More information from the internal APIC class I(l3ext:RouteTagPol) at
U(https://developer.cisco.com/media/mim-ref/MO-l3extRouteTagPol.html).
author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes:
- The C(tenant) used must exist before using this module in your playbook.
The M(aci_tenant) module can be used for this.
@ -106,14 +102,14 @@ def main():
aci.construct_url(
root_class=dict(
aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant),
aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant,
),
subclass_1=dict(
aci_class='l3extRouteTagPol',
aci_rn='rttag-{}'.format(rtp),
filter_target='eq(l3extRouteTagPol.name, "{}")'.format(rtp),
aci_rn='rttag-{0}'.format(rtp),
filter_target='eq(l3extRouteTagPol.name, "{0}")'.format(rtp),
module_object=rtp,
),
)

View file

@ -20,7 +20,6 @@ description:
U(http://www.cisco.com/c/en/us/td/docs/switches/datacenter/aci/apic/sw/2-x/rest_cfg/2_1_x/b_Cisco_APIC_REST_API_Configuration_Guide.html).
author:
- Dag Wieers (@dagwieers)
- Swetha Chunduri (@schunduri)
version_added: '2.4'
requirements:
- lxml (when using XML content)

View file

@ -16,15 +16,11 @@ module: aci_taboo_contract
short_description: Manage taboo contracts on Cisco ACI fabrics (vz:BrCP)
description:
- Manage taboo contracts on Cisco ACI fabrics.
- More information from the internal APIC class
I(vz:BrCP) at U(https://developer.cisco.com/media/mim-ref/MO-vzBrCP.html).
- More information from the internal APIC class I(vz:BrCP) at
U(https://developer.cisco.com/media/mim-ref/MO-vzBrCP.html).
author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes:
- The C(tenant) used must exist before using this module in your playbook.
The M(aci_tenant) module can be used for this.
@ -107,14 +103,14 @@ def main():
aci.construct_url(
root_class=dict(
aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant),
aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant,
),
subclass_1=dict(
aci_class='vzTaboo',
aci_rn='taboo-{}'.format(taboo_contract),
filter_target='eq(vzTaboo.name, "{}")'.format(taboo_contract),
aci_rn='taboo-{0}'.format(taboo_contract),
filter_target='eq(vzTaboo.name, "{0}")'.format(taboo_contract),
module_object=taboo_contract,
),
)

View file

@ -16,15 +16,11 @@ module: aci_tenant
short_description: Manage tenants on Cisco ACI fabrics (fv:Tenant)
description:
- Manage tenants on Cisco ACI fabrics.
- More information from the internal APIC class
I(fv:Tenant) at U(https://developer.cisco.com/media/mim-ref/MO-fvTenant.html).
- More information from the internal APIC class I(fv:Tenant) at
U(https://developer.cisco.com/media/mim-ref/MO-fvTenant.html).
author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
options:
tenant:
description:
@ -112,8 +108,8 @@ def main():
aci.construct_url(
root_class=dict(
aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant),
aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant,
),
)

View file

@ -16,15 +16,11 @@ module: aci_tenant_action_rule_profile
short_description: Manage action rule profiles on Cisco ACI fabrics (rtctrl:AttrP)
description:
- Manage action rule profiles on Cisco ACI fabrics.
- More information from the internal APIC class
I(rtctrl:AttrP) at U(https://developer.cisco.com/media/mim-ref/MO-rtctrlAttrP.html).
- More information from the internal APIC class I(rtctrl:AttrP) at
U(https://developer.cisco.com/media/mim-ref/MO-rtctrlAttrP.html).
author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes:
- The C(tenant) used must exist before using this module in your playbook.
The M(aci_tenant) module can be used for this.
@ -97,14 +93,14 @@ def main():
aci.construct_url(
root_class=dict(
aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant),
aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant,
),
subclass_1=dict(
aci_class='rtctrlAttrP',
aci_rn='attr-{}'.format(action_rule),
filter_target='eq(rtctrlAttrP.name, "{}")'.format(action_rule),
aci_rn='attr-{0}'.format(action_rule),
filter_target='eq(rtctrlAttrP.name, "{0}")'.format(action_rule),
module_object=action_rule,
),
)

View file

@ -16,15 +16,11 @@ module: aci_tenant_ep_retention_policy
short_description: Manage End Point (EP) retention protocol policies on Cisco ACI fabrics (fv:EpRetPol)
description:
- Manage End Point (EP) retention protocol policies on Cisco ACI fabrics.
- More information from the internal APIC class
I(fv:EpRetPol) at U(https://developer.cisco.com/media/mim-ref/MO-fvEpRetPol.html).
- More information from the internal APIC class I(fv:EpRetPol) at
U(https://developer.cisco.com/media/mim-ref/MO-fvEpRetPol.html).
author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes:
- The C(tenant) used must exist before using this module in your playbook.
The M(aci_tenant) module can be used for this.
@ -191,14 +187,14 @@ def main():
aci.construct_url(
root_class=dict(
aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant),
aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant,
),
subclass_1=dict(
aci_class='fvEpRetPol',
aci_rn='epRPol-{}'.format(epr_policy),
filter_target='eq(fvEpRetPol.name, "{}")'.format(epr_policy),
aci_rn='epRPol-{0}'.format(epr_policy),
filter_target='eq(fvEpRetPol.name, "{0}")'.format(epr_policy),
module_object=epr_policy,
),
)

View file

@ -16,15 +16,11 @@ module: aci_tenant_span_dst_group
short_description: Manage SPAN destination groups on Cisco ACI fabrics (span:DestGrp)
description:
- Manage SPAN destination groups on Cisco ACI fabrics.
- More information from the internal APIC class
I(span:DestGrp) at U(https://developer.cisco.com/media/mim-ref/MO-spanDestGrp.html).
- More information from the internal APIC class I(span:DestGrp) at
U(https://developer.cisco.com/media/mim-ref/MO-spanDestGrp.html).
author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes:
- The C(tenant) used must exist before using this module in your playbook.
The M(aci_tenant) module can be used for this.
@ -99,14 +95,14 @@ def main():
aci.construct_url(
root_class=dict(
aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant),
aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant,
),
subclass_1=dict(
aci_class='spanDestGrp',
aci_rn='destgrp-{}'.format(dst_group),
filter_target='eq(spanDestGrp.name, "{}")'.format(dst_group),
aci_rn='destgrp-{0}'.format(dst_group),
filter_target='eq(spanDestGrp.name, "{0}")'.format(dst_group),
module_object=dst_group,
),
)

View file

@ -16,15 +16,11 @@ module: aci_tenant_span_src_group
short_description: Manage SPAN source groups on Cisco ACI fabrics (span:SrcGrp)
description:
- Manage SPAN source groups on Cisco ACI fabrics.
- More information from the internal APIC class
I(span:SrcGrp) at U(https://developer.cisco.com/media/mim-ref/MO-spanSrcGrp.html).
- More information from the internal APIC class I(span:SrcGrp) at
U(https://developer.cisco.com/media/mim-ref/MO-spanSrcGrp.html).
author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes:
- The C(tenant) used must exist before using this module in your playbook.
The M(aci_tenant) module can be used for this.
@ -110,14 +106,14 @@ def main():
aci.construct_url(
root_class=dict(
aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant),
aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant,
),
subclass_1=dict(
aci_class='spanSrcGrp',
aci_rn='srcgrp-{}'.format(src_group),
filter_target='eq(spanSrcGrp.name, "{}")'.format(src_group),
aci_rn='srcgrp-{0}'.format(src_group),
filter_target='eq(spanSrcGrp.name, "{0}")'.format(src_group),
module_object=src_group,
),
child_classes=['spanSpanLbl'],

View file

@ -16,15 +16,11 @@ module: aci_tenant_span_src_group_to_dst_group
short_description: Manage SPAN source group to destination group bindings on Cisco ACI fabrics (span:SpanLbl)
description:
- Manage SPAN source groups' associated destinaton group on Cisco ACI fabrics.
- More information from the internal APIC class
I(span:SrcGrp) at U(https://developer.cisco.com/media/mim-ref/MO-spanSpanLbl.html).
- More information from the internal APIC class I(span:SrcGrp) at
U(https://developer.cisco.com/media/mim-ref/MO-spanSpanLbl.html).
author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes:
- The C(tenant), C(src_group), and C(dst_group) must exist before using this module in your playbook.
The M(aci_tenant), M(aci_tenant_span_src_group), and M(aci_tenant_span_dst_group) modules can be used for this.
@ -101,20 +97,20 @@ def main():
aci.construct_url(
root_class=dict(
aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant),
aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant,
),
subclass_1=dict(
aci_class='spanSrcGrp',
aci_rn='srcgrp-{}'.format(src_group),
filter_target='eq(spanSrcGrp.name, "{}")'.format(src_group),
aci_rn='srcgrp-{0}'.format(src_group),
filter_target='eq(spanSrcGrp.name, "{0}")'.format(src_group),
module_object=src_group,
),
subclass_2=dict(
aci_class='spanSpanLbl',
aci_rn='spanlbl-{}'.format(dst_group),
filter_target='eq(spanSpanLbl.name, "{}")'.format(dst_group),
aci_rn='spanlbl-{0}'.format(dst_group),
filter_target='eq(spanSpanLbl.name, "{0}")'.format(dst_group),
module_object=dst_group,
),
)

View file

@ -17,15 +17,11 @@ short_description: Manage VRF (private networks aka. contexts) on Cisco ACI fabr
description:
- Manage VRF (private networks aka. contexts) on Cisco ACI fabrics.
- Each context is a private network associated to a tenant, i.e. VRF.
- More information from the internal APIC class
I(fv:Ctx) at U(https://developer.cisco.com/media/mim-ref/MO-fvCtx.html).
- More information from the internal APIC class I(fv:Ctx) at
U(https://developer.cisco.com/media/mim-ref/MO-fvCtx.html).
author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4'
requirements:
- Tested with ACI Fabric 1.0(3f)+
notes:
- The C(tenant) used must exist before using this module in your playbook.
The M(aci_tenant) module can be used for this.
@ -135,14 +131,14 @@ def main():
aci.construct_url(
root_class=dict(
aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant),
aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant,
),
subclass_1=dict(
aci_class='fvCtx',
aci_rn='ctx-{}'.format(vrf),
filter_target='eq(fvCtx.name, "{}")'.format(vrf),
aci_rn='ctx-{0}'.format(vrf),
filter_target='eq(fvCtx.name, "{0}")'.format(vrf),
module_object=vrf,
),
)

View file

@ -1,4 +1,3 @@
lib/ansible/module_utils/network/aci/aci.py ansible-format-automatic-specification
lib/ansible/module_utils/network/iosxr/iosxr.py ansible-format-automatic-specification
lib/ansible/modules/cloud/amazon/aws_api_gateway.py ansible-format-automatic-specification
lib/ansible/modules/cloud/amazon/aws_kms.py ansible-format-automatic-specification
@ -37,38 +36,6 @@ lib/ansible/modules/monitoring/grafana_plugin.py ansible-format-automatic-specif
lib/ansible/modules/net_tools/dnsmadeeasy.py ansible-format-automatic-specification
lib/ansible/modules/net_tools/ipinfoio_facts.py ansible-format-automatic-specification
lib/ansible/modules/network/a10/a10_server_axapi3.py ansible-format-automatic-specification
lib/ansible/modules/network/aci/aci_ap.py ansible-format-automatic-specification
lib/ansible/modules/network/aci/aci_bd.py ansible-format-automatic-specification
lib/ansible/modules/network/aci/aci_bd_subnet.py ansible-format-automatic-specification
lib/ansible/modules/network/aci/aci_bd_to_l3out.py ansible-format-automatic-specification
lib/ansible/modules/network/aci/aci_config_rollback.py ansible-format-automatic-specification
lib/ansible/modules/network/aci/aci_config_snapshot.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_to_filter.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
lib/ansible/modules/network/aci/aci_epg_monitoring_policy.py ansible-format-automatic-specification
lib/ansible/modules/network/aci/aci_epg_to_contract.py ansible-format-automatic-specification
lib/ansible/modules/network/aci/aci_epg_to_domain.py ansible-format-automatic-specification
lib/ansible/modules/network/aci/aci_filter.py ansible-format-automatic-specification
lib/ansible/modules/network/aci/aci_filter_entry.py ansible-format-automatic-specification
lib/ansible/modules/network/aci/aci_intf_policy_fc.py ansible-format-automatic-specification
lib/ansible/modules/network/aci/aci_intf_policy_l2.py ansible-format-automatic-specification
lib/ansible/modules/network/aci/aci_intf_policy_lldp.py ansible-format-automatic-specification
lib/ansible/modules/network/aci/aci_intf_policy_mcp.py ansible-format-automatic-specification
lib/ansible/modules/network/aci/aci_intf_policy_port_channel.py ansible-format-automatic-specification
lib/ansible/modules/network/aci/aci_intf_policy_port_security.py ansible-format-automatic-specification
lib/ansible/modules/network/aci/aci_l3out_route_tag_policy.py ansible-format-automatic-specification
lib/ansible/modules/network/aci/aci_taboo_contract.py ansible-format-automatic-specification
lib/ansible/modules/network/aci/aci_tenant.py ansible-format-automatic-specification
lib/ansible/modules/network/aci/aci_tenant_action_rule_profile.py ansible-format-automatic-specification
lib/ansible/modules/network/aci/aci_tenant_ep_retention_policy.py ansible-format-automatic-specification
lib/ansible/modules/network/aci/aci_tenant_span_dst_group.py ansible-format-automatic-specification
lib/ansible/modules/network/aci/aci_tenant_span_src_group.py ansible-format-automatic-specification
lib/ansible/modules/network/aci/aci_tenant_span_src_group_to_dst_group.py ansible-format-automatic-specification
lib/ansible/modules/network/aci/aci_vrf.py ansible-format-automatic-specification
lib/ansible/modules/network/avi/avi_api_version.py ansible-format-automatic-specification
lib/ansible/modules/network/bigswitch/bcf_switch.py ansible-format-automatic-specification
lib/ansible/modules/network/bigswitch/bigmon_chain.py ansible-format-automatic-specification