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) path, filter_string = self._construct_url_1(root_class, child_includes)
self.result['path'] = path 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 self.result['filter_string'] = filter_string
def _construct_url_1(self, obj, child_includes): def _construct_url_1(self, obj, child_includes):
@ -395,15 +395,15 @@ class ACIModule(object):
# State is present or absent # State is present or absent
if self.module.params['state'] != 'query': 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 filter_string = '?rsp-prop-include=config-only' + child_includes
# Query for all objects of the module's class # Query for all objects of the module's class
elif mo is None: elif mo is None:
path = 'api/class/{}.json'.format(obj_class) path = 'api/class/{0}.json'.format(obj_class)
filter_string = '' filter_string = ''
# Query for a specific object in the module's class # Query for a specific object in the module's class
else: else:
path = 'api/mo/uni/{}.json'.format(obj_rn) path = 'api/mo/uni/{0}.json'.format(obj_rn)
filter_string = '' filter_string = ''
# Append child_includes to filter_string if filter string is empty # Append child_includes to filter_string if filter string is empty
@ -430,26 +430,26 @@ class ACIModule(object):
# State is present or absent # State is present or absent
if self.module.params['state'] != 'query': 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 filter_string = '?rsp-prop-include=config-only' + child_includes
# Query for all objects of the module's class # Query for all objects of the module's class
elif mo is None and parent_obj is None: 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 = '' filter_string = ''
# Queries when parent object is provided # Queries when parent object is provided
elif parent_obj is not None: elif parent_obj is not None:
# Query for specific object in the module's class # Query for specific object in the module's class
if mo is not None: 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 = '' filter_string = ''
# Query for all object's of the module's class that belong to a specific parent object # Query for all object's of the module's class that belong to a specific parent object
else: else:
path = 'api/mo/uni/{}.json'.format(parent_rn) path = 'api/mo/uni/{0}.json'.format(parent_rn)
filter_string = self_child_includes filter_string = self_child_includes
# Query for all objects of the module's class that match the provided ID value # Query for all objects of the module's class that match the provided ID value
else: else:
path = 'api/class/{}.json'.format(obj_class) path = 'api/class/{0}.json'.format(obj_class)
filter_string = '?query-target-filter={}'.format(obj_filter) + child_includes filter_string = '?query-target-filter={0}'.format(obj_filter) + child_includes
# Append child_includes to filter_string if filter string is empty # Append child_includes to filter_string if filter string is empty
if child_includes is not None and filter_string == '': if child_includes is not None and filter_string == '':
@ -475,20 +475,20 @@ class ACIModule(object):
if not child_includes: if not child_includes:
self_child_includes = '&rsp-subtree=full&rsp-subtree-class=' + obj_class self_child_includes = '&rsp-subtree=full&rsp-subtree-class=' + obj_class
else: else:
self_child_includes = '{},{}'.format(child_includes, obj_class) self_child_includes = '{0},{1}'.format(child_includes, obj_class)
if not child_includes: 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: 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 # State is ablsent or present
if self.module.params['state'] != 'query': 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 filter_string = '?rsp-prop-include=config-only' + child_includes
# Query for all objects of the module's class # Query for all objects of the module's class
elif mo is None and parent_obj is None and root_obj is None: 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 = '' filter_string = ''
# Queries when root object is provided # Queries when root object is provided
elif root_obj is not None: elif root_obj is not None:
@ -496,37 +496,37 @@ class ACIModule(object):
if parent_obj is not None: if parent_obj is not None:
# Query for a specific object of the module's class # Query for a specific object of the module's class
if mo is not None: 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 = '' filter_string = ''
# Query for all objects of the module's class that belong to a specific parent object # Query for all objects of the module's class that belong to a specific parent object
else: 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) 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 # 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: elif mo is not None:
path = 'api/mo/uni/{}.json'.format(root_rn) path = 'api/mo/uni/{0}.json'.format(root_rn)
filter_string = '?rsp-subtree-filter={}{}'.format(obj_filter, self_child_includes) 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 # Query for all objects of the module's class that belong to a specific root object
else: else:
path = 'api/mo/uni/{}.json'.format(root_rn) path = 'api/mo/uni/{0}.json'.format(root_rn)
filter_string = '?' + parent_self_child_includes filter_string = '?' + parent_self_child_includes
# Queries when parent object is provided but root object is not provided # Queries when parent object is provided but root object is not provided
elif parent_obj is not None: elif parent_obj is not None:
# Query for all objects of the module's class that belong to any parent class # 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 # matching the provided ID values for both object and parent object
if mo is not None: if mo is not None:
path = 'api/class/{}.json'.format(parent_class) path = 'api/class/{0}.json'.format(parent_class)
filter_string = '?query-target-filter={}{}&rsp-subtree-filter={}'.format( filter_string = '?query-target-filter={0}{1}&rsp-subtree-filter={2}'.format(
parent_filter, self_child_includes, obj_filter) parent_filter, self_child_includes, obj_filter)
# Query for all objects of the module's class that belong to any parent class # Query for all objects of the module's class that belong to any parent class
# matching the provided ID value for the parent object # matching the provided ID value for the parent object
else: else:
path = 'api/class/{}.json'.format(parent_class) path = 'api/class/{0}.json'.format(parent_class)
filter_string = '?query-target-filter={}{}'.format(parent_filter, self_child_includes) 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 # Query for all objects of the module's class matching the provided ID value of the object
else: else:
path = 'api/class/{}.json'.format(obj_class) path = 'api/class/{0}.json'.format(obj_class)
filter_string = '?query-target-filter={}'.format(obj_filter) + child_includes filter_string = '?query-target-filter={0}'.format(obj_filter) + child_includes
# append child_includes to filter_string if filter string is empty # append child_includes to filter_string if filter string is empty
if child_includes is not None and filter_string == '': if child_includes is not None and filter_string == '':
@ -557,10 +557,10 @@ class ACIModule(object):
# State is ablsent or present # State is ablsent or present
if self.module.params['state'] != 'query': 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 filter_string = '?rsp-prop-include=config-only' + child_includes
else: else:
path = 'api/class/{}.json'.format(obj_class) path = 'api/class/{0}.json'.format(obj_class)
filter_string = child_includes filter_string = child_includes
return path, filter_string 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) short_description: Manage top level Application Profile (AP) objects on Cisco ACI fabrics (fv:Ap)
description: description:
- Manage top level Application Profile (AP) objects on Cisco ACI fabrics - Manage top level Application Profile (AP) objects on Cisco ACI fabrics
- More information from the internal APIC class - More information from the internal APIC class I(fv:Ap) at
I(fv:Ap) at U(https://developer.cisco.com/media/mim-ref/MO-fvAp.html). U(https://developer.cisco.com/media/mim-ref/MO-fvAp.html).
author: author:
- Swetha Chunduri (@schunduri) - Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4' version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes: notes:
- This module does not manage EPGs, see M(aci_epg) to do this. - 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. - The C(tenant) used must exist before using this module in your playbook.
@ -126,14 +122,14 @@ def main():
aci.construct_url( aci.construct_url(
root_class=dict( root_class=dict(
aci_class='fvTenant', aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant), aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant), filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant, module_object=tenant,
), ),
subclass_1=dict( subclass_1=dict(
aci_class='fvAp', aci_class='fvAp',
aci_rn='ap-{}'.format(ap), aci_rn='ap-{0}'.format(ap),
filter_target='eq(fvAp.name, "{}")'.format(ap), filter_target='eq(fvAp.name, "{0}")'.format(ap),
module_object=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) short_description: Manage Bridge Domains (BD) on Cisco ACI Fabrics (fv:BD)
description: description:
- Manages Bridge Domains (BD) on Cisco ACI Fabrics. - Manages Bridge Domains (BD) on Cisco ACI Fabrics.
- More information from the internal APIC class - More information from the internal APIC class I(fv:BD) at
I(fv:BD) at U(https://developer.cisco.com/media/mim-ref/MO-fvBD.html). U(https://developer.cisco.com/media/mim-ref/MO-fvBD.html).
author: author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298) - Jacob McGill (@jmcgill298)
requirements:
- ACI Fabric 1.0(3f)+
version_added: '2.4' version_added: '2.4'
notes: notes:
- The C(tenant) used must exist before using this module in your playbook. - The C(tenant) used must exist before using this module in your playbook.
@ -282,14 +278,14 @@ def main():
aci.construct_url( aci.construct_url(
root_class=dict( root_class=dict(
aci_class='fvTenant', aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant), aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant), filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant, module_object=tenant,
), ),
subclass_1=dict( subclass_1=dict(
aci_class='fvBD', aci_class='fvBD',
aci_rn='BD-{}'.format(bd), aci_rn='BD-{0}'.format(bd),
filter_target='eq(fvBD.name, "{}")'.format(bd), filter_target='eq(fvBD.name, "{0}")'.format(bd),
module_object=bd, module_object=bd,
), ),
child_classes=['fvRsCtx', 'fvRsIgmpsn', 'fvRsBDToNdP', 'fvRsBdToEpRet'], 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) short_description: Manage Subnets on Cisco ACI fabrics (fv:Subnet)
description: description:
- Manage Subnets on Cisco ACI fabrics. - Manage Subnets on Cisco ACI fabrics.
- More information from the internal APIC class - More information from the internal APIC class I(fv:Subnet) at
I(fv:Subnet) at U(https://developer.cisco.com/media/mim-ref/MO-fvSubnet.html). U(https://developer.cisco.com/media/mim-ref/MO-fvSubnet.html).
author: author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298) - Jacob McGill (@jmcgill298)
version_added: '2.4' version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes: notes:
- The C(gateway) parameter is the root key used to access the Subnet (not name), so the C(gateway) - 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). 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 # 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') 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: if gateway is not None:
gateway = '{}/{}'.format(gateway, str(mask)) gateway = '{0}/{1}'.format(gateway, str(mask))
subnet_name = module.params['subnet_name'] subnet_name = module.params['subnet_name']
nd_prefix_policy = module.params['nd_prefix_policy'] nd_prefix_policy = module.params['nd_prefix_policy']
preferred = module.params['preferred'] preferred = module.params['preferred']
@ -271,20 +267,20 @@ def main():
aci.construct_url( aci.construct_url(
root_class=dict( root_class=dict(
aci_class='fvTenant', aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant), aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, \"{}\")'.format(tenant), filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant, module_object=tenant,
), ),
subclass_1=dict( subclass_1=dict(
aci_class='fvBD', aci_class='fvBD',
aci_rn='BD-{}'.format(bd), aci_rn='BD-{0}'.format(bd),
filter_target='eq(fvBD.name, \"{}\")'.format(bd), filter_target='eq(fvBD.name, "{0}")'.format(bd),
module_object=bd, module_object=bd,
), ),
subclass_2=dict( subclass_2=dict(
aci_class='fvSubnet', aci_class='fvSubnet',
aci_rn='subnet-[{}]'.format(gateway), aci_rn='subnet-[{0}]'.format(gateway),
filter_target='eq(fvSubnet.ip, \"{}\")'.format(gateway), filter_target='eq(fvSubnet.ip, "{0}")'.format(gateway),
module_object=gateway, module_object=gateway,
), ),
child_classes=['fvRsBDSubnetToProfile', 'fvRsNdPfxPol'], 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) short_description: Bind Bridge Domain to L3 Out on Cisco ACI fabrics (fv:RsBDToOut)
description: description:
- Bind Bridge Domain to L3 Out on Cisco ACI fabrics. - Bind Bridge Domain to L3 Out on Cisco ACI fabrics.
- More information from the internal APIC class - More information from the internal APIC class I(fv:RsBDToOut) at
I(fv:RsBDToOut) at U(https://developer.cisco.com/media/mim-ref/MO-fvRsBDToOut.html). U(https://developer.cisco.com/media/mim-ref/MO-fvRsBDToOut.html).
author: author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298) - Jacob McGill (@jmcgill298)
version_added: '2.4' version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes: notes:
- The C(bd) and C(l3out) parameters should exist before using this module. - 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. The M(aci_bd) and M(aci_l3out) can be used for these.
@ -88,20 +84,20 @@ def main():
aci.construct_url( aci.construct_url(
root_class=dict( root_class=dict(
aci_class='fvTenant', aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant), aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant), filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant, module_object=tenant,
), ),
subclass_1=dict( subclass_1=dict(
aci_class='fvBD', aci_class='fvBD',
aci_rn='BD-{}'.format(bd), aci_rn='BD-{0}'.format(bd),
filter_target='eq(fvBD.name, "{}")'.format(bd), filter_target='eq(fvBD.name, "{0}")'.format(bd),
module_object=bd, module_object=bd,
), ),
subclass_2=dict( subclass_2=dict(
aci_class='fvRsBDToOut', aci_class='fvRsBDToOut',
aci_rn='rsBDToOut-{}'.format(l3out), aci_rn='rsBDToOut-{0}'.format(l3out),
filter_target='eq(fvRsBDToOut.tnL3extOutName, "{}")'.format(l3out), filter_target='eq(fvRsBDToOut.tnL3extOutName, "{0}")'.format(l3out),
module_object=l3out, module_object=l3out,
), ),
) )

View file

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

View file

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

View file

@ -16,15 +16,11 @@ module: aci_contract
short_description: Manage contract resources on Cisco ACI fabrics (vz:BrCP) short_description: Manage contract resources on Cisco ACI fabrics (vz:BrCP)
description: description:
- Manage Contract resources on Cisco ACI fabrics. - Manage Contract resources on Cisco ACI fabrics.
- More information from the internal APIC class - More information from the internal APIC class I(vz:BrCP) at
I(vz:BrCP) at U(https://developer.cisco.com/media/mim-ref/MO-vzBrCP.html). U(https://developer.cisco.com/media/mim-ref/MO-vzBrCP.html).
author: author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers) - Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4' version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes: notes:
- This module does not manage Contract Subjects, see M(aci_contract_subject) to do this. - This module does not manage Contract Subjects, see M(aci_contract_subject) to do this.
Contract Subjects can still be removed using this module. Contract Subjects can still be removed using this module.
@ -129,14 +125,14 @@ def main():
aci.construct_url( aci.construct_url(
root_class=dict( root_class=dict(
aci_class='fvTenant', aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant), aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant), filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant, module_object=tenant,
), ),
subclass_1=dict( subclass_1=dict(
aci_class='vzBrCP', aci_class='vzBrCP',
aci_rn='brc-{}'.format(contract), aci_rn='brc-{0}'.format(contract),
filter_target='eq(vzBrCP.name, "{}")'.format(contract), filter_target='eq(vzBrCP.name, "{0}")'.format(contract),
module_object=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) short_description: Manage initial Contract Subjects on Cisco ACI fabrics (vz:Subj)
description: description:
- Manage initial Contract Subjects on Cisco ACI fabrics. - Manage initial Contract Subjects on Cisco ACI fabrics.
- More information from the internal APIC class - More information from the internal APIC class I(vz:Subj) at
I(vz:Subj) at U(https://developer.cisco.com/media/mim-ref/MO-vzSubj.html). U(https://developer.cisco.com/media/mim-ref/MO-vzSubj.html).
author: author:
- Swetha Chunduri (@schunduri) - Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4' version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes: notes:
- The C(tenant) and C(contract) used must exist before using this module in your playbook. - 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. - The M(aci_tenant) and M(aci_contract) modules can be used for this.
@ -184,26 +180,26 @@ def main():
tenant = module.params['tenant'] tenant = module.params['tenant']
if directive is not None or filter_name is not None: 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 = ACIModule(module)
aci.construct_url( aci.construct_url(
root_class=dict( root_class=dict(
aci_class='fvTenant', aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant), aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant), filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant, module_object=tenant,
), ),
subclass_1=dict( subclass_1=dict(
aci_class='vzBrCP', aci_class='vzBrCP',
aci_rn='brc-{}'.format(contract), aci_rn='brc-{0}'.format(contract),
filter_target='eq(vzBrCP.name, "{}")'.format(contract), filter_target='eq(vzBrCP.name, "{0}")'.format(contract),
module_object=contract, module_object=contract,
), ),
subclass_2=dict( subclass_2=dict(
aci_class='vzSubj', aci_class='vzSubj',
aci_rn='subj-{}'.format(subject), aci_rn='subj-{0}'.format(subject),
filter_target='eq(vzSubj.name, "{}")'.format(subject), filter_target='eq(vzSubj.name, "{0}")'.format(subject),
module_object=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) short_description: Bind Contract Subjects to Filters on Cisco ACI fabrics (vz:RsSubjFiltAtt)
description: description:
- Bind Contract Subjects to Filters on Cisco ACI fabrics. - Bind Contract Subjects to Filters on Cisco ACI fabrics.
- More information from the internal APIC class - More information from the internal APIC class I(vz:RsSubjFiltAtt) at
I(vz:RsSubjFiltAtt) at U(https://developer.cisco.com/media/mim-ref/MO-vzRsSubjFiltAtt.html). U(https://developer.cisco.com/media/mim-ref/MO-vzRsSubjFiltAtt.html).
author: author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298) - Jacob McGill (@jmcgill298)
version_added: '2.4' version_added: '2.4'
requirements: requirements:
@ -121,26 +119,26 @@ def main():
aci.construct_url( aci.construct_url(
root_class=dict( root_class=dict(
aci_class='fvTenant', aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant), aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant), filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant, module_object=tenant,
), ),
subclass_1=dict( subclass_1=dict(
aci_class='vzBrCP', aci_class='vzBrCP',
aci_rn='brc-{}'.format(contract), aci_rn='brc-{0}'.format(contract),
filter_target='eq(vzBrCP.name, "{}")'.format(contract), filter_target='eq(vzBrCP.name, "{0}")'.format(contract),
module_object=contract, module_object=contract,
), ),
subclass_2=dict( subclass_2=dict(
aci_class='vzSubj', aci_class='vzSubj',
aci_rn='subj-{}'.format(subject), aci_rn='subj-{0}'.format(subject),
filter_target='eq(vzSubj.name, "{}")'.format(subject), filter_target='eq(vzSubj.name, "{0}")'.format(subject),
module_object=subject, module_object=subject,
), ),
subclass_3=dict( subclass_3=dict(
aci_class='vzRsSubjFiltAtt', aci_class='vzRsSubjFiltAtt',
aci_rn='rssubjFiltAtt-{}'.format(filter_name), aci_rn='rssubjFiltAtt-{0}'.format(filter_name),
filter_target='eq(vzRsSubjFiltAtt.tnVzFilterName, "{}")'.format(filter_name), filter_target='eq(vzRsSubjFiltAtt.tnVzFilterName, "{0}")'.format(filter_name),
module_object=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 # Report when vm_provider is set when type is not virtual
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))
# ACI Pool URL requires the allocation mode for vlan and vsan pools (ex: uni/infra/vlanns-[poolname]-static) # ACI Pool URL requires the allocation mode for vlan and vsan pools (ex: uni/infra/vlanns-[poolname]-static)
pool_name = pool pool_name = pool
@ -128,7 +128,7 @@ def main():
if pool_allocation_mode is not None: if pool_allocation_mode is not None:
pool_name = '[{0}]-{1}'.format(pool, pool_allocation_mode) pool_name = '[{0}]-{1}'.format(pool, pool_allocation_mode)
else: 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 # Vxlan pools do not support allocation modes
if pool_type == 'vxlan' and pool_allocation_mode is not None: if pool_type == 'vxlan' and pool_allocation_mode is not None:
@ -137,24 +137,24 @@ def main():
# 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 == 'l2ext': elif domain_type == 'l2ext':
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 == 'l3ext': elif domain_type == 'l3ext':
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 = 'vmmp-{}/dom-{}'.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 pool_mo = POOL_MAPPING[pool_type]["aci_mo"] + pool_name
@ -163,7 +163,7 @@ def main():
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,
), ),
child_classes=['infraRsVlanNs'], child_classes=['infraRsVlanNs'],

View file

@ -165,7 +165,7 @@ def main():
# Report when vm_provider is set when type is not virtual # Report when vm_provider is set when type is not virtual
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))
# ACI Pool URL requires the allocation mode for vlan and vsan pools (ex: uni/infra/vlanns-[poolname]-static) # ACI Pool URL requires the allocation mode for vlan and vsan pools (ex: uni/infra/vlanns-[poolname]-static)
pool_name = pool pool_name = pool
@ -175,24 +175,24 @@ def main():
# 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 == 'l2ext': elif domain_type == 'l2ext':
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 == 'l3ext': elif domain_type == 'l3ext':
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_mo = 'uni/infra/vlanns-' + pool_name aci_mo = 'uni/infra/vlanns-' + pool_name
@ -201,7 +201,7 @@ def main():
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,
), ),
child_classes=['infraRsVlanNs'], 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) short_description: Manage End Point Groups (EPG) on Cisco ACI fabrics (fv:AEPg)
description: description:
- Manage End Point Groups (EPG) on Cisco ACI fabrics. - Manage End Point Groups (EPG) on Cisco ACI fabrics.
- More information from the internal APIC class - More information from the internal APIC class I(fv:AEPg) at
I(fv:AEPg) at U(https://developer.cisco.com/media/mim-ref/MO-fvAEPg.html). U(https://developer.cisco.com/media/mim-ref/MO-fvAEPg.html).
author: author:
- Swetha Chunduri (@schunduri) - Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob Mcgill (@jmcgill298)
version_added: '2.4' version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes: notes:
- The C(tenant) and C(app_profile) used must exist before using this module in your playbook. - 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. The M(aci_tenant) and M(aci_ap) modules can be used for this.
@ -200,20 +196,20 @@ def main():
aci.construct_url( aci.construct_url(
root_class=dict( root_class=dict(
aci_class='fvTenant', aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant), aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant), filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant, module_object=tenant,
), ),
subclass_1=dict( subclass_1=dict(
aci_class='fvAp', aci_class='fvAp',
aci_rn='ap-{}'.format(ap), aci_rn='ap-{0}'.format(ap),
filter_target='eq(fvAp.name, "{}")'.format(ap), filter_target='eq(fvAp.name, "{0}")'.format(ap),
module_object=ap, module_object=ap,
), ),
subclass_2=dict( subclass_2=dict(
aci_class='fvAEPg', aci_class='fvAEPg',
aci_rn='epg-{}'.format(epg), aci_rn='epg-{0}'.format(epg),
filter_target='eq(fvAEPg.name, "{}")'.format(epg), filter_target='eq(fvAEPg.name, "{0}")'.format(epg),
module_object=epg, module_object=epg,
), ),
child_classes=['fvRsBd'], 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) short_description: Manage monitoring policies on Cisco ACI fabrics (mon:EPGPol)
description: description:
- Manage monitoring policies on Cisco ACI fabrics. - Manage monitoring policies on Cisco ACI fabrics.
- More information from the internal APIC class - More information from the internal APIC class I(mon:EPGPol) at
I(mon:EPGPol) at U(https://developer.cisco.com/media/mim-ref/MO-monEPGPol.html). U(https://developer.cisco.com/media/mim-ref/MO-monEPGPol.html).
author: author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers) - Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4' version_added: '2.4'
requirements: requirements:
- ACI Fabric 1.0(3f)+ - ACI Fabric 1.0(3f)+
@ -99,14 +97,14 @@ def main():
aci.construct_url( aci.construct_url(
root_class=dict( root_class=dict(
aci_class='fvTenant', aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant), aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant), filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant, module_object=tenant,
), ),
subclass_1=dict( subclass_1=dict(
aci_class='monEPGPol', aci_class='monEPGPol',
aci_rn='monepg-{}'.format(monitoring_policy), aci_rn='monepg-{0}'.format(monitoring_policy),
filter_target='eq(monEPGPol.name, "{}")'.format(monitoring_policy), filter_target='eq(monEPGPol.name, "{0}")'.format(monitoring_policy),
module_object=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) short_description: Bind EPGs to Contracts on Cisco ACI fabrics (fv:RsCons and fv:RsProv)
description: description:
- Bind EPGs to Contracts on Cisco ACI fabrics. - Bind EPGs to Contracts on Cisco ACI fabrics.
- More information from the internal APIC classes - More information from the internal APIC classes I(fv:RsCons) at
I(fv:RsCons) at U(https://developer.cisco.com/media/mim-ref/MO-fvRsCons.html) and U(https://developer.cisco.com/media/mim-ref/MO-fvRsCons.html)
I(fv:RsProv) at U(https://developer.cisco.com/media/mim-ref/MO-fvRsProv.html). and I(fv:RsProv) at
U(https://developer.cisco.com/media/mim-ref/MO-fvRsProv.html).
author: author:
- Swetha Chunduri (@schunduri) - Jacob McGill (@jmcgill298)
- Dag Wieers (@dagwieers)
- Jacob Mcgill (@jmcgill298)
version_added: '2.4' version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes: notes:
- The C(tenant), C(app_profile), C(EPG), and C(Contract) used must exist before using this module in your playbook. - 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. 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( aci.construct_url(
root_class=dict( root_class=dict(
aci_class='fvTenant', aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant), aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant), filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant, module_object=tenant,
), ),
subclass_1=dict( subclass_1=dict(
aci_class='fvAp', aci_class='fvAp',
aci_rn='ap-{}'.format(ap), aci_rn='ap-{0}'.format(ap),
filter_target='eq(fvAp.name, "{}")'.format(ap), filter_target='eq(fvAp.name, "{0}")'.format(ap),
module_object=ap, module_object=ap,
), ),
subclass_2=dict( subclass_2=dict(
aci_class='fvAEPg', aci_class='fvAEPg',
aci_rn='epg-{}'.format(epg), aci_rn='epg-{0}'.format(epg),
filter_target='eq(fvAEPg.name, "{}")'.format(epg), filter_target='eq(fvAEPg.name, "{0}")'.format(epg),
module_object=epg, module_object=epg,
), ),
subclass_3=dict( subclass_3=dict(
aci_class=aci_class, aci_class=aci_class,
aci_rn='{}{}'.format(aci_rn, contract), aci_rn='{0}{1}'.format(aci_rn, contract),
filter_target='eq({}.tnVzBrCPName, "{}'.format(aci_class, contract), filter_target='eq({0}.tnVzBrCPName, "{1}'.format(aci_class, contract),
module_object=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) short_description: Bind EPGs to Domains on Cisco ACI fabrics (fv:RsDomAtt)
description: description:
- Bind EPGs to Physical and Virtual Domains on Cisco ACI fabrics. - Bind EPGs to Physical and Virtual Domains on Cisco ACI fabrics.
- More information from the internal APIC class - More information from the internal APIC class I(fv:RsDomAtt) at
I(fv:RsDomAtt) at U(https://developer.cisco.com/media/mim-ref/MO-fvRsDomAtt.html). U(https://developer.cisco.com/media/mim-ref/MO-fvRsDomAtt.html).
author: author:
- Swetha Chunduri (@schunduri) - Jacob McGill (@jmcgill298)
- Dag Wieers (@dagwieers)
- Jacob Mcgill (@jmcgill298)
version_added: '2.4' version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes: notes:
- The C(tenant), C(ap), C(epg), and C(domain) used must exist before using this module in your playbook. - 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. 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.network.aci.aci import ACIModule, aci_argument_spec
from ansible.module_utils.basic import AnsibleModule 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(): def main():
@ -151,7 +151,7 @@ def main():
encap = module.params['encap'] encap = module.params['encap']
if encap is not None: if encap is not None:
if encap in range(1, 4097): if encap in range(1, 4097):
encap = 'vlan-{}'.format(encap) encap = 'vlan-{0}'.format(encap)
else: else:
module.fail_json(msg='Valid VLAN assigments are from 1 to 4096') module.fail_json(msg='Valid VLAN assigments are from 1 to 4096')
encap_mode = module.params['encap_mode'] encap_mode = module.params['encap_mode']
@ -160,7 +160,7 @@ def main():
primary_encap = module.params['primary_encap'] primary_encap = module.params['primary_encap']
if primary_encap is not None: if primary_encap is not None:
if primary_encap in range(1, 4097): if primary_encap in range(1, 4097):
primary_encap = 'vlan-{}'.format(primary_encap) primary_encap = 'vlan-{0}'.format(primary_encap)
else: else:
module.fail_json(msg='Valid VLAN assigments are from 1 to 4096') module.fail_json(msg='Valid VLAN assigments are from 1 to 4096')
resolution_immediacy = module.params['resolution_immediacy'] resolution_immediacy = module.params['resolution_immediacy']
@ -172,9 +172,9 @@ def main():
# Compile the full domain for URL building # Compile the full domain for URL building
if domain_type == 'vmm': 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: elif domain_type is not None:
epg_domain = 'uni/phys-{}'.format(domain) epg_domain = 'uni/phys-{0}'.format(domain)
else: else:
epg_domain = None epg_domain = None
@ -182,26 +182,26 @@ def main():
aci.construct_url( aci.construct_url(
root_class=dict( root_class=dict(
aci_class='fvTenant', aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant), aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant), filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant, module_object=tenant,
), ),
subclass_1=dict( subclass_1=dict(
aci_class='fvAp', aci_class='fvAp',
aci_rn='ap-{}'.format(ap), aci_rn='ap-{0}'.format(ap),
filter_target='eq(fvAp.name, "{}")'.format(ap), filter_target='eq(fvAp.name, "{0}")'.format(ap),
module_object=ap, module_object=ap,
), ),
subclass_2=dict( subclass_2=dict(
aci_class='fvAEPg', aci_class='fvAEPg',
aci_rn='epg-{}'.format(epg), aci_rn='epg-{0}'.format(epg),
filter_target='eq(fvTenant.name, "{}")'.format(epg), filter_target='eq(fvTenant.name, "{0}")'.format(epg),
module_object=epg, module_object=epg,
), ),
subclass_3=dict( subclass_3=dict(
aci_class='fvRsDomAtt', aci_class='fvRsDomAtt',
aci_rn='rsdomAtt-[{}]'.format(epg_domain), aci_rn='rsdomAtt-[{0}]'.format(epg_domain),
filter_target='eq(fvRsDomAtt.tDn, "{}")'.format(epg_domain), filter_target='eq(fvRsDomAtt.tDn, "{0}")'.format(epg_domain),
module_object=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) short_description: Manages top level filter objects on Cisco ACI fabrics (vz:Filter)
description: description:
- Manages top level filter objects on Cisco ACI fabrics. - Manages top level filter objects on Cisco ACI fabrics.
- More information from the internal APIC class - More information from the internal APIC class I(vz:Filter) at
I(vz:Filter) at U(https://developer.cisco.com/media/mim-ref/MO-vzFilter.html). 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. - This modules does not manage filter entries, see M(aci_filter_entry) for this functionality.
author: author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers) - Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4' version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes: notes:
- The C(tenant) used must exist before using this module in your playbook. - The C(tenant) used must exist before using this module in your playbook.
The M(aci_tenant) module can be used for this. The M(aci_tenant) module can be used for this.
@ -127,14 +123,14 @@ def main():
aci.construct_url( aci.construct_url(
root_class=dict( root_class=dict(
aci_class='fvTenant', aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant), aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant), filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant, module_object=tenant,
), ),
subclass_1=dict( subclass_1=dict(
aci_class='vzFilter', aci_class='vzFilter',
aci_rn='flt-{}'.format(filter_name), aci_rn='flt-{0}'.format(filter_name),
filter_target='eq(vzFilter.name, "{}")'.format(filter_name), filter_target='eq(vzFilter.name, "{0}")'.format(filter_name),
module_object=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) short_description: Manage filter entries on Cisco ACI fabrics (vz:Entry)
description: description:
- Manage filter entries for a filter on Cisco ACI fabrics. - Manage filter entries for a filter on Cisco ACI fabrics.
- More information from the internal APIC class - More information from the internal APIC class I(vz:Entry) at
I(vz:Entry) at U(https://developer.cisco.com/media/mim-ref/MO-vzEntry.html). U(https://developer.cisco.com/media/mim-ref/MO-vzEntry.html).
author: author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298) - Jacob McGill (@jmcgill298)
version_added: '2.4' version_added: '2.4'
requirements:
- Tested with ACI Fabric 1.0(3f)+
notes: notes:
- The C(tenant) and C(filter) used must exist before using this module in your playbook. - 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. The M(aci_tenant) and M(aci_filter) modules can be used for this.
@ -207,20 +203,20 @@ def main():
aci.construct_url( aci.construct_url(
root_class=dict( root_class=dict(
aci_class='fvTenant', aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant), aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant), filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant, module_object=tenant,
), ),
subclass_1=dict( subclass_1=dict(
aci_class='vzFilter', aci_class='vzFilter',
aci_rn='flt-{}'.format(filter_name), aci_rn='flt-{0}'.format(filter_name),
filter_target='eq(vzFilter.name, "{}")'.format(filter_name), filter_target='eq(vzFilter.name, "{0}")'.format(filter_name),
module_object=filter_name, module_object=filter_name,
), ),
subclass_2=dict( subclass_2=dict(
aci_class='vzEntry', aci_class='vzEntry',
aci_rn='e-{}'.format(entry), aci_rn='e-{0}'.format(entry),
filter_target='eq(vzEntry.name, "{}")'.format(entry), filter_target='eq(vzEntry.name, "{0}")'.format(entry),
module_object=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) short_description: Manage Fibre Channel interface policies on Cisco ACI fabrics (fc:IfPol)
description: description:
- Manage ACI Fiber Channel interface policies on Cisco ACI fabrics. - Manage ACI Fiber Channel interface policies on Cisco ACI fabrics.
- More information from the internal APIC class - More information from the internal APIC class I(fc:IfPol) at
I(fc:IfPol) at U(https://developer.cisco.com/media/mim-ref/MO-fcIfPol.html). U(https://developer.cisco.com/media/mim-ref/MO-fcIfPol.html).
author: author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers) - Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4' version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
options: options:
fc_policy: fc_policy:
description: description:
@ -96,8 +92,8 @@ def main():
aci.construct_url( aci.construct_url(
root_class=dict( root_class=dict(
aci_class='fcIfPol', aci_class='fcIfPol',
aci_rn='infra/fcIfPol-{}'.format(fc_policy), aci_rn='infra/fcIfPol-{0}'.format(fc_policy),
filter_target='eq(fcIfPol.name, "{}")'.format(fc_policy), filter_target='eq(fcIfPol.name, "{0}")'.format(fc_policy),
module_object=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) short_description: Manage Layer 2 interface policies on Cisco ACI fabrics (l2:IfPol)
description: description:
- Manage Layer 2 interface policies on Cisco ACI fabrics. - Manage Layer 2 interface policies on Cisco ACI fabrics.
- More information from the internal APIC class - More information from the internal APIC class I(l2:IfPol) at
I(l2:IfPol) at U(https://developer.cisco.com/media/mim-ref/MO-l2IfPol.html). U(https://developer.cisco.com/media/mim-ref/MO-l2IfPol.html).
author: author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers) - Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4' version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
options: options:
l2_policy: l2_policy:
description: description:
@ -114,8 +110,8 @@ def main():
aci.construct_url( aci.construct_url(
root_class=dict( root_class=dict(
aci_class='l2IfPol', aci_class='l2IfPol',
aci_rn='infra/l2IfP-{}'.format(l2_policy), aci_rn='infra/l2IfP-{0}'.format(l2_policy),
filter_target='eq(l2IfPol.name, "{}")'.format(l2_policy), filter_target='eq(l2IfPol.name, "{0}")'.format(l2_policy),
module_object=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) short_description: Manage LLDP interface policies on Cisco ACI fabrics (lldp:IfPol)
description: description:
- Manage LLDP interface policies on Cisco ACI fabrics. - Manage LLDP interface policies on Cisco ACI fabrics.
- More information from the internal APIC class - More information from the internal APIC class I(lldp:IfPol) at
I(lldp:IfPol) at U(https://developer.cisco.com/media/mim-ref/MO-lldpIfPol.html). U(https://developer.cisco.com/media/mim-ref/MO-lldpIfPol.html).
author: author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers) - Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4' version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
options: options:
lldp_policy: lldp_policy:
description: description:
@ -105,8 +101,8 @@ def main():
aci.construct_url( aci.construct_url(
root_class=dict( root_class=dict(
aci_class='lldpIfPol', aci_class='lldpIfPol',
aci_rn='infra/lldpIfP-{}'.format(lldp_policy), aci_rn='infra/lldpIfP-{0}'.format(lldp_policy),
filter_target='eq(lldpIfPol.name, "{}")'.format(lldp_policy), filter_target='eq(lldpIfPol.name, "{0}")'.format(lldp_policy),
module_object=lldp_policy, module_object=lldp_policy,
), ),
) )

View file

@ -19,12 +19,8 @@ description:
- More information from the internal APIC class - More information from the internal APIC class
I(mcp:IfPol) at U(https://developer.cisco.com/media/mim-ref/MO-mcpIfPol.html). I(mcp:IfPol) at U(https://developer.cisco.com/media/mim-ref/MO-mcpIfPol.html).
author: author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers) - Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4' version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
options: options:
mcp: mcp:
description: description:
@ -96,8 +92,8 @@ def main():
aci.construct_url( aci.construct_url(
root_class=dict( root_class=dict(
aci_class='mcpIfPol', aci_class='mcpIfPol',
aci_rn='infra/mcpIfP-{}'.format(mcp), aci_rn='infra/mcpIfP-{0}'.format(mcp),
filter_target='eq(mcpIfPol.name, "{}")'.format(mcp), filter_target='eq(mcpIfPol.name, "{0}")'.format(mcp),
module_object=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) short_description: Manage port channel interface policies on Cisco ACI fabrics (lacp:LagPol)
description: description:
- Manage port channel interface policies on Cisco ACI fabrics. - Manage port channel interface policies on Cisco ACI fabrics.
- More information from the internal APIC class - More information from the internal APIC class I(lacp:LagPol) at
I(lacp:LagPol) at U(https://developer.cisco.com/media/mim-ref/MO-lacpLagPol.html). U(https://developer.cisco.com/media/mim-ref/MO-lacpLagPol.html).
author: author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers) - Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4' version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
options: options:
port_channel: port_channel:
description: description:
@ -181,8 +177,8 @@ def main():
aci.construct_url( aci.construct_url(
root_class=dict( root_class=dict(
aci_class='lacpLagPol', aci_class='lacpLagPol',
aci_rn='infra/lacplagp-{}'.format(port_channel), aci_rn='infra/lacplagp-{0}'.format(port_channel),
filter_target='eq(lacpLagPol.name, "{}")'.format(port_channel), filter_target='eq(lacpLagPol.name, "{0}")'.format(port_channel),
module_object=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) short_description: Manage port security on Cisco ACI fabrics (l2:PortSecurityPol)
description: description:
- Manage port security on Cisco ACI fabrics. - Manage port security on Cisco ACI fabrics.
- More information from the internal APIC class - More information from the internal APIC class I(l2:PortSecurityPol) at
I(l2:PortSecurityPol) at U(https://developer.cisco.com/media/mim-ref/MO-l2PortSecurityPol.html). U(https://developer.cisco.com/media/mim-ref/MO-l2PortSecurityPol.html).
author: author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers) - Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4' version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
options: options:
port_security: port_security:
description: description:
@ -97,8 +93,8 @@ def main():
aci.construct_url( aci.construct_url(
root_class=dict( root_class=dict(
aci_class='l2PortSecurityPol', aci_class='l2PortSecurityPol',
aci_rn='infra/portsecurityP-{}'.format(port_security), aci_rn='infra/portsecurityP-{0}'.format(port_security),
filter_target='eq(l2PortSecurityPol.name, "{}")'.format(port_security), filter_target='eq(l2PortSecurityPol.name, "{0}")'.format(port_security),
module_object=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) short_description: Manage route tag policies on Cisco ACI fabrics (l3ext:RouteTagPol)
description: description:
- Manage route tag policies on Cisco ACI fabrics. - Manage route tag policies on Cisco ACI fabrics.
- More information from the internal APIC class - More information from the internal APIC class I(l3ext:RouteTagPol) at
I(l3ext:RouteTagPol) at U(https://developer.cisco.com/media/mim-ref/MO-l3extRouteTagPol.html). U(https://developer.cisco.com/media/mim-ref/MO-l3extRouteTagPol.html).
author: author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers) - Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4' version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes: notes:
- The C(tenant) used must exist before using this module in your playbook. - The C(tenant) used must exist before using this module in your playbook.
The M(aci_tenant) module can be used for this. The M(aci_tenant) module can be used for this.
@ -106,14 +102,14 @@ def main():
aci.construct_url( aci.construct_url(
root_class=dict( root_class=dict(
aci_class='fvTenant', aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant), aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant), filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant, module_object=tenant,
), ),
subclass_1=dict( subclass_1=dict(
aci_class='l3extRouteTagPol', aci_class='l3extRouteTagPol',
aci_rn='rttag-{}'.format(rtp), aci_rn='rttag-{0}'.format(rtp),
filter_target='eq(l3extRouteTagPol.name, "{}")'.format(rtp), filter_target='eq(l3extRouteTagPol.name, "{0}")'.format(rtp),
module_object=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). 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: author:
- Dag Wieers (@dagwieers) - Dag Wieers (@dagwieers)
- Swetha Chunduri (@schunduri)
version_added: '2.4' version_added: '2.4'
requirements: requirements:
- lxml (when using XML content) - 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) short_description: Manage taboo contracts on Cisco ACI fabrics (vz:BrCP)
description: description:
- Manage taboo contracts on Cisco ACI fabrics. - Manage taboo contracts on Cisco ACI fabrics.
- More information from the internal APIC class - More information from the internal APIC class I(vz:BrCP) at
I(vz:BrCP) at U(https://developer.cisco.com/media/mim-ref/MO-vzBrCP.html). U(https://developer.cisco.com/media/mim-ref/MO-vzBrCP.html).
author: author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers) - Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4' version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes: notes:
- The C(tenant) used must exist before using this module in your playbook. - The C(tenant) used must exist before using this module in your playbook.
The M(aci_tenant) module can be used for this. The M(aci_tenant) module can be used for this.
@ -107,14 +103,14 @@ def main():
aci.construct_url( aci.construct_url(
root_class=dict( root_class=dict(
aci_class='fvTenant', aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant), aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant), filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant, module_object=tenant,
), ),
subclass_1=dict( subclass_1=dict(
aci_class='vzTaboo', aci_class='vzTaboo',
aci_rn='taboo-{}'.format(taboo_contract), aci_rn='taboo-{0}'.format(taboo_contract),
filter_target='eq(vzTaboo.name, "{}")'.format(taboo_contract), filter_target='eq(vzTaboo.name, "{0}")'.format(taboo_contract),
module_object=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) short_description: Manage tenants on Cisco ACI fabrics (fv:Tenant)
description: description:
- Manage tenants on Cisco ACI fabrics. - Manage tenants on Cisco ACI fabrics.
- More information from the internal APIC class - More information from the internal APIC class I(fv:Tenant) at
I(fv:Tenant) at U(https://developer.cisco.com/media/mim-ref/MO-fvTenant.html). U(https://developer.cisco.com/media/mim-ref/MO-fvTenant.html).
author: author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298) - Jacob McGill (@jmcgill298)
version_added: '2.4' version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
options: options:
tenant: tenant:
description: description:
@ -112,8 +108,8 @@ def main():
aci.construct_url( aci.construct_url(
root_class=dict( root_class=dict(
aci_class='fvTenant', aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant), aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant), filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=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) short_description: Manage action rule profiles on Cisco ACI fabrics (rtctrl:AttrP)
description: description:
- Manage action rule profiles on Cisco ACI fabrics. - Manage action rule profiles on Cisco ACI fabrics.
- More information from the internal APIC class - More information from the internal APIC class I(rtctrl:AttrP) at
I(rtctrl:AttrP) at U(https://developer.cisco.com/media/mim-ref/MO-rtctrlAttrP.html). U(https://developer.cisco.com/media/mim-ref/MO-rtctrlAttrP.html).
author: author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers) - Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4' version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes: notes:
- The C(tenant) used must exist before using this module in your playbook. - The C(tenant) used must exist before using this module in your playbook.
The M(aci_tenant) module can be used for this. The M(aci_tenant) module can be used for this.
@ -97,14 +93,14 @@ def main():
aci.construct_url( aci.construct_url(
root_class=dict( root_class=dict(
aci_class='fvTenant', aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant), aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant), filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant, module_object=tenant,
), ),
subclass_1=dict( subclass_1=dict(
aci_class='rtctrlAttrP', aci_class='rtctrlAttrP',
aci_rn='attr-{}'.format(action_rule), aci_rn='attr-{0}'.format(action_rule),
filter_target='eq(rtctrlAttrP.name, "{}")'.format(action_rule), filter_target='eq(rtctrlAttrP.name, "{0}")'.format(action_rule),
module_object=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) short_description: Manage End Point (EP) retention protocol policies on Cisco ACI fabrics (fv:EpRetPol)
description: description:
- Manage End Point (EP) retention protocol policies on Cisco ACI fabrics. - Manage End Point (EP) retention protocol policies on Cisco ACI fabrics.
- More information from the internal APIC class - More information from the internal APIC class I(fv:EpRetPol) at
I(fv:EpRetPol) at U(https://developer.cisco.com/media/mim-ref/MO-fvEpRetPol.html). U(https://developer.cisco.com/media/mim-ref/MO-fvEpRetPol.html).
author: author:
- Swetha Chunduri (@schunduri) - Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4' version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes: notes:
- The C(tenant) used must exist before using this module in your playbook. - The C(tenant) used must exist before using this module in your playbook.
The M(aci_tenant) module can be used for this. The M(aci_tenant) module can be used for this.
@ -191,14 +187,14 @@ def main():
aci.construct_url( aci.construct_url(
root_class=dict( root_class=dict(
aci_class='fvTenant', aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant), aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant), filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant, module_object=tenant,
), ),
subclass_1=dict( subclass_1=dict(
aci_class='fvEpRetPol', aci_class='fvEpRetPol',
aci_rn='epRPol-{}'.format(epr_policy), aci_rn='epRPol-{0}'.format(epr_policy),
filter_target='eq(fvEpRetPol.name, "{}")'.format(epr_policy), filter_target='eq(fvEpRetPol.name, "{0}")'.format(epr_policy),
module_object=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) short_description: Manage SPAN destination groups on Cisco ACI fabrics (span:DestGrp)
description: description:
- Manage SPAN destination groups on Cisco ACI fabrics. - Manage SPAN destination groups on Cisco ACI fabrics.
- More information from the internal APIC class - More information from the internal APIC class I(span:DestGrp) at
I(span:DestGrp) at U(https://developer.cisco.com/media/mim-ref/MO-spanDestGrp.html). U(https://developer.cisco.com/media/mim-ref/MO-spanDestGrp.html).
author: author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers) - Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298)
version_added: '2.4' version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes: notes:
- The C(tenant) used must exist before using this module in your playbook. - The C(tenant) used must exist before using this module in your playbook.
The M(aci_tenant) module can be used for this. The M(aci_tenant) module can be used for this.
@ -99,14 +95,14 @@ def main():
aci.construct_url( aci.construct_url(
root_class=dict( root_class=dict(
aci_class='fvTenant', aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant), aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant), filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant, module_object=tenant,
), ),
subclass_1=dict( subclass_1=dict(
aci_class='spanDestGrp', aci_class='spanDestGrp',
aci_rn='destgrp-{}'.format(dst_group), aci_rn='destgrp-{0}'.format(dst_group),
filter_target='eq(spanDestGrp.name, "{}")'.format(dst_group), filter_target='eq(spanDestGrp.name, "{0}")'.format(dst_group),
module_object=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) short_description: Manage SPAN source groups on Cisco ACI fabrics (span:SrcGrp)
description: description:
- Manage SPAN source groups on Cisco ACI fabrics. - Manage SPAN source groups on Cisco ACI fabrics.
- More information from the internal APIC class - More information from the internal APIC class I(span:SrcGrp) at
I(span:SrcGrp) at U(https://developer.cisco.com/media/mim-ref/MO-spanSrcGrp.html). U(https://developer.cisco.com/media/mim-ref/MO-spanSrcGrp.html).
author: author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298) - Jacob McGill (@jmcgill298)
version_added: '2.4' version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes: notes:
- The C(tenant) used must exist before using this module in your playbook. - The C(tenant) used must exist before using this module in your playbook.
The M(aci_tenant) module can be used for this. The M(aci_tenant) module can be used for this.
@ -110,14 +106,14 @@ def main():
aci.construct_url( aci.construct_url(
root_class=dict( root_class=dict(
aci_class='fvTenant', aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant), aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant), filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant, module_object=tenant,
), ),
subclass_1=dict( subclass_1=dict(
aci_class='spanSrcGrp', aci_class='spanSrcGrp',
aci_rn='srcgrp-{}'.format(src_group), aci_rn='srcgrp-{0}'.format(src_group),
filter_target='eq(spanSrcGrp.name, "{}")'.format(src_group), filter_target='eq(spanSrcGrp.name, "{0}")'.format(src_group),
module_object=src_group, module_object=src_group,
), ),
child_classes=['spanSpanLbl'], 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) short_description: Manage SPAN source group to destination group bindings on Cisco ACI fabrics (span:SpanLbl)
description: description:
- Manage SPAN source groups' associated destinaton group on Cisco ACI fabrics. - Manage SPAN source groups' associated destinaton group on Cisco ACI fabrics.
- More information from the internal APIC class - More information from the internal APIC class I(span:SrcGrp) at
I(span:SrcGrp) at U(https://developer.cisco.com/media/mim-ref/MO-spanSpanLbl.html). U(https://developer.cisco.com/media/mim-ref/MO-spanSpanLbl.html).
author: author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298) - Jacob McGill (@jmcgill298)
version_added: '2.4' version_added: '2.4'
requirements:
- ACI Fabric 1.0(3f)+
notes: notes:
- The C(tenant), C(src_group), and C(dst_group) must exist before using this module in your playbook. - 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. 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( aci.construct_url(
root_class=dict( root_class=dict(
aci_class='fvTenant', aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant), aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant), filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant, module_object=tenant,
), ),
subclass_1=dict( subclass_1=dict(
aci_class='spanSrcGrp', aci_class='spanSrcGrp',
aci_rn='srcgrp-{}'.format(src_group), aci_rn='srcgrp-{0}'.format(src_group),
filter_target='eq(spanSrcGrp.name, "{}")'.format(src_group), filter_target='eq(spanSrcGrp.name, "{0}")'.format(src_group),
module_object=src_group, module_object=src_group,
), ),
subclass_2=dict( subclass_2=dict(
aci_class='spanSpanLbl', aci_class='spanSpanLbl',
aci_rn='spanlbl-{}'.format(dst_group), aci_rn='spanlbl-{0}'.format(dst_group),
filter_target='eq(spanSpanLbl.name, "{}")'.format(dst_group), filter_target='eq(spanSpanLbl.name, "{0}")'.format(dst_group),
module_object=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: description:
- Manage VRF (private networks aka. contexts) on Cisco ACI fabrics. - Manage VRF (private networks aka. contexts) on Cisco ACI fabrics.
- Each context is a private network associated to a tenant, i.e. VRF. - Each context is a private network associated to a tenant, i.e. VRF.
- More information from the internal APIC class - More information from the internal APIC class I(fv:Ctx) at
I(fv:Ctx) at U(https://developer.cisco.com/media/mim-ref/MO-fvCtx.html). U(https://developer.cisco.com/media/mim-ref/MO-fvCtx.html).
author: author:
- Swetha Chunduri (@schunduri)
- Dag Wieers (@dagwieers)
- Jacob McGill (@jmcgill298) - Jacob McGill (@jmcgill298)
version_added: '2.4' version_added: '2.4'
requirements:
- Tested with ACI Fabric 1.0(3f)+
notes: notes:
- The C(tenant) used must exist before using this module in your playbook. - The C(tenant) used must exist before using this module in your playbook.
The M(aci_tenant) module can be used for this. The M(aci_tenant) module can be used for this.
@ -135,14 +131,14 @@ def main():
aci.construct_url( aci.construct_url(
root_class=dict( root_class=dict(
aci_class='fvTenant', aci_class='fvTenant',
aci_rn='tn-{}'.format(tenant), aci_rn='tn-{0}'.format(tenant),
filter_target='eq(fvTenant.name, "{}")'.format(tenant), filter_target='eq(fvTenant.name, "{0}")'.format(tenant),
module_object=tenant, module_object=tenant,
), ),
subclass_1=dict( subclass_1=dict(
aci_class='fvCtx', aci_class='fvCtx',
aci_rn='ctx-{}'.format(vrf), aci_rn='ctx-{0}'.format(vrf),
filter_target='eq(fvCtx.name, "{}")'.format(vrf), filter_target='eq(fvCtx.name, "{0}")'.format(vrf),
module_object=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/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_api_gateway.py ansible-format-automatic-specification
lib/ansible/modules/cloud/amazon/aws_kms.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/dnsmadeeasy.py ansible-format-automatic-specification
lib/ansible/modules/net_tools/ipinfoio_facts.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/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/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/bcf_switch.py ansible-format-automatic-specification
lib/ansible/modules/network/bigswitch/bigmon_chain.py ansible-format-automatic-specification lib/ansible/modules/network/bigswitch/bigmon_chain.py ansible-format-automatic-specification