Added nameAlias field (#67150)

* Added nameAlias field to all the supported ACI modules

* Changed nameAlias to name_alias

* Review changes
pull/67437/head
Nirav Katarmal 5 years ago committed by GitHub
parent 98c1fc9d3a
commit 5ea26b6e5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -82,6 +82,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
notes:
- This module is not idempotent when C(aaa_password) is being used
@ -277,6 +282,7 @@ def main():
last_name=dict(type='str'),
phone=dict(type='str'),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -307,6 +313,7 @@ def main():
last_name = module.params.get('last_name')
phone = module.params.get('phone')
state = module.params.get('state')
name_alias = module.params.get('name_alias')
expiration = module.params.get('expiration')
if expiration is not None and expiration != 'never':
@ -342,6 +349,7 @@ def main():
pwd=aaa_password,
pwdLifeTime=aaa_password_lifetime,
pwdUpdateRequired=aaa_password_update_required,
nameAlias=name_alias,
),
)

@ -47,6 +47,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
notes:
- The C(aaa_user) must exist before using this module in your playbook.
@ -232,6 +237,7 @@ def main():
certificate=dict(type='str', aliases=['cert_data', 'certificate_data']),
certificate_name=dict(type='str', aliases=['cert_name']), # Not required for querying all objects
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -248,6 +254,7 @@ def main():
certificate = module.params.get('certificate')
certificate_name = module.params.get('certificate_name')
state = module.params.get('state')
name_alias = module.params.get('name_alias')
aci = ACIModule(module)
aci.construct_url(
@ -272,6 +279,8 @@ def main():
class_config=dict(
data=certificate,
name=certificate_name,
nameAlias=name_alias,
),
)

@ -45,6 +45,11 @@ options:
type: str
default: present
choices: [ absent, present, query ]
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
seealso:
- module: aci_aep_to_domain
@ -211,6 +216,7 @@ def main():
description=dict(type='str', aliases=['descr']),
infra_vlan=dict(type='bool', aliases=['infrastructure_vlan']),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -226,7 +232,7 @@ def main():
description = module.params.get('description')
infra_vlan = module.params.get('infra_vlan')
state = module.params.get('state')
name_alias = module.params.get('name_alias')
if infra_vlan:
child_configs = [dict(infraProvAcc=dict(attributes=dict(name='provacc')))]
elif infra_vlan is False:
@ -251,6 +257,7 @@ def main():
class_config=dict(
name=aep,
descr=description,
nameAlias=name_alias,
),
child_configs=child_configs,
)

@ -42,6 +42,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
notes:
- This module does not manage EPGs, see M(aci_epg) to do this.
@ -215,6 +220,7 @@ def main():
ap=dict(type='str', aliases=['app_profile', 'app_profile_name', 'name']), # Not required for querying all objects
description=dict(type='str', aliases=['descr']),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -230,6 +236,7 @@ def main():
description = module.params.get('description')
state = module.params.get('state')
tenant = module.params.get('tenant')
name_alias = module.params.get('name_alias')
aci = ACIModule(module)
aci.construct_url(
@ -255,6 +262,7 @@ def main():
class_config=dict(
name=ap,
descr=description,
nameAlias=name_alias,
),
)

@ -123,6 +123,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
tenant:
description:
- The name of the Tenant.
@ -354,6 +359,7 @@ def main():
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
vrf=dict(type='str', aliases=['vrf_name']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -394,6 +400,7 @@ def main():
state = module.params.get('state')
tenant = module.params.get('tenant')
vrf = module.params.get('vrf')
name_alias = module.params.get('name_alias')
aci.construct_url(
root_class=dict(
@ -431,6 +438,7 @@ def main():
unicastRoute=enable_routing,
unkMacUcastAct=l2_unknown_unicast,
unkMcastAct=l3_unknown_multicast,
nameAlias=name_alias,
),
child_configs=[
{'fvRsCtx': {'attributes': {'tnFvCtxName': vrf}}},

@ -104,6 +104,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
notes:
- The C(gateway) parameter is the root key used to access the Subnet (not name), so the C(gateway)
@ -361,6 +366,7 @@ def main():
subnet_control=dict(type='str', choices=['nd_ra', 'no_gw', 'querier_ip', 'unspecified']),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -401,6 +407,7 @@ def main():
subnet_control = module.params.get('subnet_control')
if subnet_control:
subnet_control = SUBNET_CONTROL_MAPPING[subnet_control]
name_alias = module.params.get('name_alias')
aci.construct_url(
root_class=dict(
@ -437,6 +444,7 @@ def main():
preferred=preferred,
scope=scope,
virtual=enable_vip,
nameAlias=name_alias,
),
child_configs=[
{'fvRsBDSubnetToProfile': {'attributes': {'tnL3extOutName': route_profile_l3_out, 'tnRtctrlProfileName': route_profile}}},

@ -61,6 +61,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
notes:
- This module does not manage Contract Subjects, see M(aci_contract_subject) to do this.
@ -243,6 +248,7 @@ def main():
'CS0', 'CS1', 'CS2', 'CS3', 'CS4', 'CS5', 'CS6', 'CS7', 'EF', 'VA', 'unspecified'],
aliases=['target']), # No default provided on purpose
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -261,6 +267,7 @@ def main():
dscp = module.params.get('dscp')
state = module.params.get('state')
tenant = module.params.get('tenant')
name_alias = module.params.get('name_alias')
aci = ACIModule(module)
aci.construct_url(
@ -289,6 +296,7 @@ def main():
scope=scope,
prio=priority,
targetDscp=dscp,
nameAlias=name_alias,
),
)

@ -77,6 +77,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
notes:
- The C(tenant) and C(contract) used must exist before using this module in your playbook.
@ -271,6 +276,7 @@ def main():
consumer_match=dict(type='str', choices=['all', 'at_least_one', 'at_most_one', 'none']),
provider_match=dict(type='str', choices=['all', 'at_least_one', 'at_most_one', 'none']),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -298,6 +304,7 @@ def main():
provider_match = MATCH_MAPPING.get(provider_match)
state = module.params.get('state')
tenant = module.params.get('tenant')
name_alias = module.params.get('name_alias')
aci.construct_url(
root_class=dict(
@ -333,6 +340,7 @@ def main():
consMatchT=consumer_match,
provMatchT=provider_match,
descr=description,
nameAlias=name_alias,
),
)

@ -57,6 +57,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
vm_provider:
description:
- The VM platform for VMM Domains.
@ -286,6 +291,7 @@ def main():
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
vm_provider=dict(type='str', choices=['cloudfoundry', 'kubernetes', 'microsoft', 'openshift', 'openstack', 'redhat', 'vmware']),
vswitch=dict(type='str', choices=['avs', 'default', 'dvs', 'unknown']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -308,6 +314,7 @@ def main():
if vswitch is not None:
vswitch = VSWITCH_MAPPING.get(vswitch)
state = module.params.get('state')
name_alias = module.params.get('name_alias')
if domain_type != 'vmm':
if vm_provider is not None:
@ -369,6 +376,7 @@ def main():
mode=vswitch,
name=domain,
targetDscp=dscp,
nameAlias=name_alias,
),
)

@ -49,6 +49,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
seealso:
- module: aci_encap_pool_range
@ -237,6 +242,7 @@ def main():
pool=dict(type='str', aliases=['name', 'pool_name']), # Not required for querying all objects
pool_allocation_mode=dict(type='str', aliases=['allocation_mode', 'mode'], choices=['dynamic', 'static']),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -253,6 +259,7 @@ def main():
pool_type = module.params.get('pool_type')
pool_allocation_mode = module.params.get('pool_allocation_mode')
state = module.params.get('state')
name_alias = module.params.get('name_alias')
aci_class = ACI_POOL_MAPPING[pool_type]['aci_class']
aci_mo = ACI_POOL_MAPPING[pool_type]['aci_mo']
@ -289,6 +296,7 @@ def main():
allocMode=pool_allocation_mode,
descr=description,
name=pool,
nameAlias=name_alias,
)
)

@ -71,6 +71,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
notes:
- The C(pool) must exist in order to add or delete a range.
@ -310,6 +315,7 @@ def main():
range_name=dict(type='str', aliases=["name", "range"]), # Not required for querying all objects
range_start=dict(type='int', aliases=["start"]), # Not required for querying all objects
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -330,6 +336,7 @@ def main():
range_name = module.params.get('range_name')
range_start = module.params.get('range_start')
state = module.params.get('state')
name_alias = module.params.get('name_alias')
if range_end is not None:
encap_end = '{0}-{1}'.format(pool_type, range_end)
@ -424,6 +431,7 @@ def main():
"from": encap_start,
"name": range_name,
"to": encap_end,
"nameAlias": name_alias,
},
)

@ -77,6 +77,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
notes:
- The C(tenant) and C(app_profile) used must exist before using this module in your playbook.
@ -303,6 +308,7 @@ def main():
fwd_control=dict(type='str', choices=['none', 'proxy-arp']),
preferred_group=dict(type='bool'),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -326,6 +332,7 @@ def main():
state = module.params.get('state')
tenant = module.params.get('tenant')
ap = module.params.get('ap')
name_alias = module.params.get('name_alias')
aci.construct_url(
root_class=dict(
@ -361,6 +368,7 @@ def main():
pcEnfPref=intra_epg_isolation,
fwdCtrl=fwd_control,
prefGrMemb=preferred_group,
nameAlias=name_alias,
),
child_configs=[dict(
fvRsBd=dict(

@ -42,6 +42,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
notes:
- The C(tenant) used must exist before using this module in your playbook.
@ -183,6 +188,7 @@ def main():
tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
description=dict(type='str', aliases=['descr']),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -198,6 +204,7 @@ def main():
description = module.params.get('description')
state = module.params.get('state')
tenant = module.params.get('tenant')
name_alias = module.params.get('name_alias')
aci = ACIModule(module)
aci.construct_url(
@ -223,6 +230,7 @@ def main():
class_config=dict(
name=monitoring_policy,
descr=description,
nameAlias=name_alias,
),
)

@ -55,6 +55,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
seealso:
- name: APIC Management Information Model reference
@ -218,6 +223,7 @@ def main():
serial=dict(type='str', aliases=['serial_number']), # Not required for querying all objects
switch=dict(type='str', aliases=['name', 'switch_name']),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -236,6 +242,7 @@ def main():
description = module.params.get('description')
role = module.params.get('role')
state = module.params.get('state')
name_alias = module.params.get('name_alias')
aci = ACIModule(module)
aci.construct_url(
@ -263,6 +270,7 @@ def main():
# rn='nodep-{0}'.format(serial),
role=role,
serial=serial,
nameAlias=name_alias,
)
)

@ -79,7 +79,11 @@ options:
type: str
default: present
choices: [ absent, present, query ]
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
author:
@ -256,6 +260,7 @@ def main():
minute=dict(type='int'),
day=dict(type='str', default='every-day', choices=['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday',
'Saturday', 'Sunday', 'every-day', 'even-day', 'odd-day']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -278,6 +283,7 @@ def main():
concurCap = module.params.get('concurCap')
day = module.params.get('day')
description = module.params.get('description')
name_alias = module.params.get('name_alias')
if recurring:
child_configs = [dict(trigRecurrWindowP=dict(attributes=dict(name=windowname, hour=hour, minute=minute,
@ -307,6 +313,7 @@ def main():
class_config=dict(
name=name,
descr=description,
nameAlias=name_alias,
),
child_configs=child_configs,

@ -43,6 +43,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
notes:
- The C(tenant) used must exist before using this module in your playbook.
@ -216,6 +221,7 @@ def main():
tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
description=dict(type='str', aliases=['descr']),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -231,6 +237,7 @@ def main():
description = module.params.get('description')
state = module.params.get('state')
tenant = module.params.get('tenant')
name_alias = module.params.get('name_alias')
aci = ACIModule(module)
aci.construct_url(
@ -256,6 +263,7 @@ def main():
class_config=dict(
name=filter_name,
descr=description,
nameAlias=name_alias,
),
)

@ -87,6 +87,11 @@ options:
type: str
default: present
choices: [ absent, present, query ]
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
stateful:
description:
- Determines the statefulness of the filter entry.
@ -266,6 +271,7 @@ def main():
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
stateful=dict(type='bool'),
tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -305,6 +311,7 @@ def main():
state = module.params.get('state')
stateful = aci.boolean(module.params.get('stateful'))
tenant = module.params.get('tenant')
name_alias = module.params.get('name_alias')
# validate that dst_port is not passed with dst_start or dst_end
if dst_port is not None and (dst_end is not None or dst_start is not None):
@ -350,6 +357,7 @@ def main():
name=entry,
prot=ip_protocol,
stateful=stateful,
nameAlias=name_alias,
),
)

@ -39,7 +39,11 @@ options:
type: str
default: present
choices: [ absent, present, query ]
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment:
- aci
author:
@ -173,6 +177,7 @@ def main():
group=dict(type='str', aliases=['group']), # Not required for querying all objects
firmwarepol=dict(type='str'), # Not required for querying all objects
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -187,6 +192,7 @@ def main():
state = module.params.get('state')
group = module.params.get('group')
firmwarepol = module.params.get('firmwarepol')
name_alias = module.params.get('name_alias')
aci = ACIModule(module)
aci.construct_url(
@ -206,6 +212,7 @@ def main():
aci_class='firmwareFwGrp',
class_config=dict(
name=group,
nameAlias=name_alias,
),
child_configs=[
dict(

@ -41,7 +41,11 @@ options:
type: str
default: present
choices: [ absent, present, query ]
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment:
- aci
@ -186,6 +190,7 @@ def main():
group=dict(type='str', aliases=['group']), # Not required for querying all objects
node=dict(type='str', aliases=['node']),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -200,6 +205,7 @@ def main():
state = module.params.get('state')
group = module.params.get('group')
node = module.params.get('node')
name_alias = module.params.get('name_alias')
aci = ACIModule(module)
aci.construct_url(
@ -226,6 +232,7 @@ def main():
class_config=dict(
from_=node,
to_=node,
nameAlias=name_alias,
),

@ -50,7 +50,11 @@ options:
type: str
choices: [absent, present, query]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment:
- aci
@ -189,6 +193,7 @@ def main():
version=dict(type='str', aliases=['version']),
ignoreCompat=dict(type='bool'),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -203,6 +208,7 @@ def main():
state = module.params.get('state')
name = module.params.get('name')
version = module.params.get('version')
name_alias = module.params.get('name_alias')
if module.params.get('ignoreCompat'):
ignore = 'yes'
@ -230,6 +236,7 @@ def main():
name=name,
version=version,
ignoreCompat=ignore,
nameAlias=name_alias,
),
)

@ -55,6 +55,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
seealso:
- name: APIC Management Information Model reference
@ -225,6 +230,7 @@ def main():
url_password=dict(type='str', no_log=True),
url_protocol=dict(type='str', default='scp', choices=['http', 'local', 'scp', 'usbkey'], aliases=['url_proto']),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -243,6 +249,7 @@ def main():
url = module.params.get('url')
url_password = module.params.get('url_password')
url_username = module.params.get('url_username')
name_alias = module.params.get('name_alias')
aci = ACIModule(module)
aci.construct_url(
@ -265,6 +272,7 @@ def main():
pollingInterval=polling_interval,
proto=url_protocol,
user=url_username,
nameAlias=name_alias,
),
)

@ -43,6 +43,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
seealso:
- name: APIC Management Information Model reference
@ -196,6 +201,7 @@ def main():
description=dict(type='str', aliases=['descr']),
admin_state=dict(type='bool'),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -213,6 +219,7 @@ def main():
description = module.params.get('description')
admin_state = aci.boolean(module.params.get('admin_state'), 'enabled', 'disabled')
state = module.params.get('state')
name_alias = module.params.get('name_alias')
aci.construct_url(
root_class=dict(
@ -232,6 +239,7 @@ def main():
name=cdp_policy,
descr=description,
adminSt=admin_state,
nameAlias=name_alias,
),
)

@ -42,6 +42,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
seealso:
- name: APIC Management Information Model reference
@ -179,6 +184,7 @@ def main():
description=dict(type='str', aliases=['descr']),
port_mode=dict(type='str', choices=['f', 'np']), # No default provided on purpose
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -194,6 +200,7 @@ def main():
port_mode = module.params.get('port_mode')
description = module.params.get('description')
state = module.params.get('state')
name_alias = module.params.get('name_alias')
aci = ACIModule(module)
aci.construct_url(
@ -214,6 +221,7 @@ def main():
name=fc_policy,
descr=description,
portMode=port_mode,
nameAlias=name_alias,
),
)

@ -53,6 +53,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
seealso:
- name: APIC Management Information Model reference
@ -198,6 +203,7 @@ def main():
qinq=dict(type='str', choices=['core', 'disabled', 'edge']),
vepa=dict(type='bool'),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -219,6 +225,7 @@ def main():
vepa = aci.boolean(module.params.get('vepa'), 'enabled', 'disabled')
description = module.params.get('description')
state = module.params.get('state')
name_alias = module.params.get('name_alias')
aci.construct_url(
root_class=dict(
@ -239,6 +246,7 @@ def main():
descr=description,
vlanScope=vlan_scope,
qinq=qinq, vepa=vepa,
nameAlias=name_alias,
),
)

@ -126,6 +126,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
notes:
- When using the module please select the appropriate link_aggregation_type (lag_type).
@ -342,6 +347,7 @@ def main():
port_security_policy=dict(type='str', aliases=['port_security_policy_name']),
aep=dict(type='str', aliases=['aep_name']),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -373,6 +379,7 @@ def main():
port_security_policy = module.params.get('port_security_policy')
aep = module.params.get('aep')
state = module.params.get('state')
name_alias = module.params.get('name_alias')
if lag_type == 'leaf':
aci_class_name = 'infraAccPortGrp'
@ -380,6 +387,7 @@ def main():
class_config_dict = dict(
name=policy_group,
descr=description,
nameAlias=name_alias,
)
# Reset for target_filter
lag_type = None
@ -390,6 +398,7 @@ def main():
name=policy_group,
descr=description,
lagT=lag_type,
nameAlias=name_alias,
)
child_configs = [

@ -37,6 +37,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
seealso:
- name: APIC Management Information Model reference
@ -200,6 +205,7 @@ def main():
leaf_interface_profile=dict(type='str', aliases=['name', 'leaf_interface_profile_name']), # Not required for querying all objects
description=dict(type='str', aliases=['descr']),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -214,6 +220,7 @@ def main():
leaf_interface_profile = module.params.get('leaf_interface_profile')
description = module.params.get('description')
state = module.params.get('state')
name_alias = module.params.get('name_alias')
aci = ACIModule(module)
aci.construct_url(
@ -232,6 +239,7 @@ def main():
class_config=dict(
name=leaf_interface_profile,
descr=description,
nameAlias=name_alias,
),
)

@ -46,6 +46,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
seealso:
- name: APIC Management Information Model reference
@ -185,6 +190,7 @@ def main():
receive_state=dict(type='bool'),
transmit_state=dict(type='bool'),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -203,6 +209,7 @@ def main():
receive_state = aci.boolean(module.params.get('receive_state'), 'enabled', 'disabled')
transmit_state = aci.boolean(module.params.get('transmit_state'), 'enabled', 'disabled')
state = module.params.get('state')
name_alias = module.params.get('name_alias')
aci.construct_url(
root_class=dict(
@ -223,6 +230,7 @@ def main():
descr=description,
adminRxSt=receive_state,
adminTxSt=transmit_state,
nameAlias=name_alias,
),
)

@ -41,6 +41,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
seealso:
- name: APIC Management Information Model reference
@ -178,6 +183,7 @@ def main():
description=dict(type='str', aliases=['descr']),
admin_state=dict(type='bool'),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -195,6 +201,7 @@ def main():
description = module.params.get('description')
admin_state = aci.boolean(module.params.get('admin_state'), 'enabled', 'disabled')
state = module.params.get('state')
name_alias = module.params.get('name_alias')
aci.construct_url(
root_class=dict(
@ -214,6 +221,7 @@ def main():
name=mcp,
descr=description,
adminSt=admin_state,
nameAlias=name_alias,
),
)

@ -128,6 +128,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
seealso:
- name: APIC Management Information Model reference
@ -305,6 +310,7 @@ def main():
retransmit_interval=dict(type='int'),
transmit_delay=dict(type='int'),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -321,6 +327,7 @@ def main():
tenant = module.params.get('tenant')
ospf = module.params.get('ospf')
description = module.params.get('description')
name_alias = module.params.get('name_alias')
if module.params.get('controls') is None:
controls = None
@ -381,6 +388,7 @@ def main():
prio=priority,
rexmitIntvl=retransmit_interval,
xmitDelay=transmit_delay,
nameAlias=name_alias,
),
)

@ -90,6 +90,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
seealso:
- name: APIC Management Information Model reference
@ -235,6 +240,7 @@ def main():
suspend_individual=dict(type='bool'),
symmetric_hash=dict(type='bool'),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -256,6 +262,7 @@ def main():
module.fail_json(msg='The "max_links" must be a value between 1 and 16')
mode = module.params.get('mode')
state = module.params.get('state')
name_alias = module.params.get('name_alias')
# Build ctrl value for request
ctrl = []
@ -296,6 +303,7 @@ def main():
minLinks=min_links,
maxLinks=max_links,
mode=mode,
nameAlias=name_alias,
),
)

@ -49,6 +49,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
seealso:
- name: APIC Management Information Model reference
@ -188,6 +193,7 @@ def main():
max_end_points=dict(type='int'),
port_security_timeout=dict(type='int'),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -203,6 +209,7 @@ def main():
description = module.params.get('description')
max_end_points = module.params.get('max_end_points')
port_security_timeout = module.params.get('port_security_timeout')
name_alias = module.params.get('name_alias')
if max_end_points is not None and max_end_points not in range(12001):
module.fail_json(msg='The "max_end_points" must be between 0 and 12000')
if port_security_timeout is not None and port_security_timeout not in range(60, 3601):
@ -228,6 +235,7 @@ def main():
name=port_security,
descr=description,
maximum=max_end_points,
nameAlias=name_alias,
),
)

@ -79,6 +79,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
notes:
- The C(tenant) and C(domain) and C(vrf) used must exist before using this module in your playbook.
@ -255,7 +260,8 @@ def main():
aliases=['target']),
l3protocol=dict(type='list', choices=['bgp', 'eigrp', 'ospf', 'pim', 'static']),
asn=dict(type='int', aliases=['as_number']),
state=dict(type='str', default='present', choices=['absent', 'present', 'query'])
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -279,6 +285,7 @@ def main():
asn = module.params.get('asn')
state = module.params.get('state')
tenant = module.params.get('tenant')
name_alias = module.params.get('name_alias')
if l3protocol:
if 'eigrp' in l3protocol and asn is None:
@ -343,7 +350,8 @@ def main():
descr=description,
dn='uni/tn-{0}/out-{1}'.format(tenant, l3out),
enforceRtctrl=enforce_ctrl,
targetDscp=dscp
targetDscp=dscp,
nameAlias=name_alias,
),
child_configs=child_configs,
)

@ -61,6 +61,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
notes:
- The C(tenant) and C(domain) and C(vrf) used must exist before using this module in your playbook.
@ -234,7 +239,8 @@ def main():
choices=['AF11', 'AF12', 'AF13', 'AF21', 'AF22', 'AF23', 'AF31', 'AF32', 'AF33', 'AF41', 'AF42',
'AF43', 'CS0', 'CS1', 'CS2', 'CS3', 'CS4', 'CS5', 'CS6', 'CS7', 'EF', 'VA', 'unspecified'],
aliases=['target']),
state=dict(type='str', default='present', choices=['absent', 'present', 'query'])
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -255,6 +261,7 @@ def main():
preferred_group = aci.boolean(module.params.get('preferred_group'), 'include', 'exclude')
dscp = module.params.get('dscp')
state = module.params.get('state')
name_alias = module.params.get('name_alias')
aci.construct_url(
root_class=dict(
@ -286,7 +293,8 @@ def main():
name=extepg,
descr=description,
prefGrMemb=preferred_group,
targetDscp=dscp
targetDscp=dscp,
nameAlias=name_alias,
),
)

@ -70,6 +70,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
notes:
- The C(tenant) and C(domain) and C(vrf) used must exist before using this module in your playbook.
@ -245,7 +250,8 @@ def main():
description=dict(type='str', aliases=['descr']),
subnet_name=dict(type='str', aliases=['name']),
scope=dict(type='list', choices=['export-rtctrl', 'import-security', 'shared-rtctrl', 'shared-security']),
state=dict(type='str', default='present', choices=['absent', 'present', 'query'])
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -267,6 +273,7 @@ def main():
subnet_name = module.params.get('subnet_name')
scope = ','.join(sorted(module.params.get('scope')))
state = module.params.get('state')
name_alias = module.params.get('name_alias')
aci.construct_url(
root_class=dict(
@ -305,6 +312,7 @@ def main():
descr=description,
name=subnet_name,
scope=scope,
nameAlias=name_alias,
),
)

@ -48,6 +48,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
notes:
- The C(tenant) used must exist before using this module in your playbook.
@ -191,6 +196,7 @@ def main():
description=dict(type='str', aliases=['descr']),
tag=dict(type='int'),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -207,6 +213,7 @@ def main():
tag = module.params.get('tag')
state = module.params.get('state')
tenant = module.params.get('tenant')
name_alias = module.params.get('name_alias')
aci = ACIModule(module)
aci.construct_url(
@ -232,6 +239,7 @@ def main():
class_config=dict(
name=rtp,
descr=description, tag=tag,
nameAlias=name_alias,
),
)

@ -38,6 +38,11 @@ options:
type: str
choices: [absent, present, query]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment:
- aci
author:
@ -171,6 +176,7 @@ def main():
group=dict(type='str'), # Not required for querying all objects
policy=dict(type='str'), # Not required for querying all objects
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -185,7 +191,7 @@ def main():
state = module.params.get('state')
group = module.params.get('group')
policy = module.params.get('policy')
name_alias = module.params.get('name_alias')
aci = ACIModule(module)
aci.construct_url(
root_class=dict(
@ -204,6 +210,7 @@ def main():
aci_class='maintMaintGrp',
class_config=dict(
name=group,
nameAlias=name_alias,
),
child_configs=[
dict(

@ -37,6 +37,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment:
- aci
author:
@ -181,6 +186,7 @@ def main():
group=dict(type='str'), # Not required for querying all objects
node=dict(type='str'),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -195,6 +201,7 @@ def main():
state = module.params.get('state')
group = module.params.get('group')
node = module.params.get('node')
name_alias = module.params.get('name_alias')
aci = ACIModule(module)
aci.construct_url(
@ -220,6 +227,7 @@ def main():
class_config=dict(
from_=node,
to_=node,
nameAlias=name_alias,
),
)

@ -60,6 +60,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment:
- aci
notes:
@ -201,6 +206,7 @@ def main():
ignoreCompat=dict(type='bool'),
adminst=dict(type='str', default='untriggered', choices=['triggered', 'untriggered']),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -221,6 +227,7 @@ def main():
adminst = module.params.get('adminst')
graceful = aci.boolean(module.params.get('graceful'))
ignoreCompat = aci.boolean(module.params.get('ignoreCompat'))
name_alias = module.params.get('name_alias')
aci.construct_url(
root_class=dict(
@ -244,6 +251,7 @@ def main():
graceful=graceful,
adminSt=adminst,
ignoreCompat=ignoreCompat,
nameAlias=name_alias,
),
child_configs=[
dict(

@ -64,6 +64,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
notes:
- This module is to be used with M(aci_switch_policy_leaf_profile).
@ -250,6 +255,7 @@ def main():
'to': dict(type='int', aliases=['node_blk_range_to', 'to_range', 'range_to']),
'policy_group': dict(type='str', aliases=['policy_group_name']),
'state': dict(type='str', default='present', choices=['absent', 'present', 'query']),
'name_alias': dict(type='str'),
})
module = AnsibleModule(
@ -270,6 +276,7 @@ def main():
to_ = module.params.get('to')
policy_group = module.params.get('policy_group')
state = module.params.get('state')
name_alias = module.params.get('name_alias')
# Build child_configs dynamically
child_configs = [
@ -323,6 +330,7 @@ def main():
class_config=dict(
descr=description,
name=leaf,
nameAlias=name_alias,
),
child_configs=child_configs,
)

@ -36,6 +36,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
seealso:
- module: aci_switch_policy_leaf_profile
@ -192,6 +197,7 @@ def main():
leaf_profile=dict(type='str', aliases=['name', 'leaf_profile_name']), # Not required for querying all objects
description=dict(type='str', aliases=['descr']),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -206,6 +212,7 @@ def main():
leaf_profile = module.params.get('leaf_profile')
description = module.params.get('description')
state = module.params.get('state')
name_alias = module.params.get('name_alias')
aci = ACIModule(module)
aci.construct_url(
@ -225,6 +232,7 @@ def main():
class_config=dict(
name=leaf_profile,
descr=description,
nameAlias=name_alias,
),
)

@ -53,6 +53,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
seealso:
- module: aci_switch_policy_leaf_profile
@ -223,6 +228,7 @@ def main():
switch_1_id=dict(type='int'),
switch_2_id=dict(type='int'),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -240,6 +246,7 @@ def main():
switch_1_id = module.params.get('switch_1_id')
switch_2_id = module.params.get('switch_2_id')
state = module.params.get('state')
name_alias = module.params.get('name_alias')
aci = ACIModule(module)
aci.construct_url(
@ -260,6 +267,7 @@ def main():
class_config=dict(
name=protection_group,
id=protection_group_id,
nameAlias=name_alias,
),
child_configs=[
dict(

@ -49,6 +49,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
notes:
- The C(tenant) used must exist before using this module in your playbook.
@ -221,6 +226,7 @@ def main():
scope=dict(type='str', choices=['application-profile', 'context', 'global', 'tenant']),
description=dict(type='str', aliases=['descr']),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -237,6 +243,7 @@ def main():
scope = module.params.get('scope')
state = module.params.get('state')
tenant = module.params.get('tenant')
name_alias = module.params.get('name_alias')
aci = ACIModule(module)
aci.construct_url(
@ -263,6 +270,7 @@ def main():
name=taboo_contract,
descr=description,
scope=scope,
nameAlias=name_alias,
),
)

@ -36,6 +36,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
seealso:
- module: aci_ap
@ -205,6 +210,7 @@ def main():
tenant=dict(type='str', aliases=['name', 'tenant_name']), # Not required for querying all objects
description=dict(type='str', aliases=['descr']),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -219,6 +225,7 @@ def main():
description = module.params.get('description')
state = module.params.get('state')
tenant = module.params.get('tenant')
name_alias = module.params.get('name_alias')
aci = ACIModule(module)
aci.construct_url(
@ -237,6 +244,7 @@ def main():
class_config=dict(
name=tenant,
descr=description,
nameAlias=name_alias,
),
)

@ -40,6 +40,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
notes:
- The C(tenant) used must exist before using this module in your playbook.
@ -181,6 +186,7 @@ def main():
tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
description=dict(type='str', aliases=['descr']),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -196,6 +202,7 @@ def main():
description = module.params.get('description')
state = module.params.get('state')
tenant = module.params.get('tenant')
name_alias = module.params.get('name_alias')
aci = ACIModule(module)
aci.construct_url(
@ -221,6 +228,7 @@ def main():
class_config=dict(
name=action_rule,
descr=description,
nameAlias=name_alias,
),
)

@ -76,6 +76,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
notes:
- The C(tenant) used must exist before using this module in your playbook.
@ -264,6 +269,7 @@ def main():
description=dict(type='str', aliases=['descr']),
move_frequency=dict(type='int'),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -305,6 +311,7 @@ def main():
remote_ep_interval = "infinite"
state = module.params.get('state')
tenant = module.params.get('tenant')
name_alias = module.params.get('name_alias')
aci = ACIModule(module)
aci.construct_url(
@ -336,6 +343,7 @@ def main():
localEpAgeIntvl=local_ep_interval,
remoteEpAgeIntvl=remote_ep_interval,
moveFreq=move_frequency,
nameAlias=name_alias,
),
)

@ -42,6 +42,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
notes:
- The C(tenant) used must exist before using this module in your playbook.
@ -183,6 +188,7 @@ def main():
dst_group=dict(type='str', aliases=['name']), # Not required for querying all objects
description=dict(type='str', aliases=['descr']),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -198,6 +204,7 @@ def main():
description = module.params.get('description')
state = module.params.get('state')
tenant = module.params.get('tenant')
name_alias = module.params.get('name_alias')
aci = ACIModule(module)
aci.construct_url(
@ -223,6 +230,7 @@ def main():
class_config=dict(
name=dst_group,
descr=description,
nameAlias=name_alias,
),
)

@ -44,6 +44,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
tenant:
description:
- The name of the Tenant.
@ -193,6 +198,7 @@ def main():
description=dict(type='str', aliases=['descr']),
dst_group=dict(type='str'),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -212,6 +218,7 @@ def main():
src_group = module.params.get('src_group')
state = module.params.get('state')
tenant = module.params.get('tenant')
name_alias = module.params.get('name_alias')
aci.construct_url(
root_class=dict(
@ -238,6 +245,7 @@ def main():
adminSt=admin_state,
descr=description,
name=src_group,
nameAlias=name_alias,
),
child_configs=[{'spanSpanLbl': {'attributes': {'name': dst_group}}}],
)

@ -38,6 +38,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
tenant:
description:
- The name of the Tenant.
@ -187,6 +192,7 @@ def main():
src_group=dict(type='str'), # Not required for querying all objects
description=dict(type='str', aliases=['descr']),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -203,6 +209,7 @@ def main():
src_group = module.params.get('src_group')
state = module.params.get('state')
tenant = module.params.get('tenant')
name_alias = module.params.get('name_alias')
aci = ACIModule(module)
aci.construct_url(
@ -234,6 +241,7 @@ def main():
class_config=dict(
descr=description,
name=dst_group,
nameAlias=name_alias,
),
)

@ -43,6 +43,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
seealso:
- module: aci_encap_pool
@ -214,6 +219,7 @@ def main():
description=dict(type='str', aliases=['descr']),
pool_allocation_mode=dict(type='str', aliases=['allocation_mode', 'mode'], choices=['dynamic', 'static']),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -229,6 +235,7 @@ def main():
pool = module.params.get('pool')
pool_allocation_mode = module.params.get('pool_allocation_mode')
state = module.params.get('state')
name_alias = module.params.get('name_alias')
pool_name = pool
@ -258,6 +265,7 @@ def main():
allocMode=pool_allocation_mode,
descr=description,
name=pool,
nameAlias=name_alias,
),
)

@ -64,6 +64,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
notes:
- The C(pool) must exist in order to add or delete a encap block.
@ -253,6 +258,7 @@ def main():
description=dict(type='str', aliases=['descr']),
pool_allocation_mode=dict(type='str', aliases=['pool_mode'], choices=['dynamic', 'static']),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -272,6 +278,7 @@ def main():
block_name = module.params.get('block_name')
block_start = module.params.get('block_start')
state = module.params.get('state')
name_alias = module.params.get('name_alias')
if block_end is not None:
encap_end = 'vlan-{0}'.format(block_end)
@ -337,6 +344,7 @@ def main():
"from": encap_start,
"name": block_name,
"to": encap_end,
"nameAlias": name_alias,
},
)

@ -50,6 +50,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
vm_provider:
description:
- The VM platform for VMM Domains.
@ -243,7 +248,8 @@ def main():
description=dict(type='str', aliases=['descr']),
domain=dict(type='str', aliases=['domain_name', 'domain_profile']),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
vm_provider=dict(type='str', choices=VM_PROVIDER_MAPPING.keys())
vm_provider=dict(type='str', choices=VM_PROVIDER_MAPPING.keys()),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -262,6 +268,7 @@ def main():
domain = module.params.get('domain')
state = module.params.get('state')
vm_provider = module.params.get('vm_provider')
name_alias = module.params.get('name_alias')
credential_class = 'vmmUsrAccP'
usracc_mo = 'uni/vmmp-{0}/dom-{1}/usracc-{2}'.format(VM_PROVIDER_MAPPING.get(vm_provider), domain, name)
@ -290,7 +297,8 @@ def main():
descr=description,
name=name,
pwd=credential_password,
usr=credential_username
usr=credential_username,
nameAlias=name_alias,
),
)

@ -51,6 +51,11 @@ options:
type: str
choices: [ absent, present, query ]
default: present
name_alias:
version_added: '2.10'
description:
- The alias for the current object. This relates to the nameAlias field in ACI.
type: str
extends_documentation_fragment: aci
notes:
- The C(tenant) used must exist before using this module in your playbook.
@ -227,6 +232,7 @@ def main():
policy_control_direction=dict(type='str', choices=['egress', 'ingress']),
policy_control_preference=dict(type='str', choices=['enforced', 'unenforced']),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
name_alias=dict(type='str'),
)
module = AnsibleModule(
@ -244,6 +250,7 @@ def main():
state = module.params.get('state')
tenant = module.params.get('tenant')
vrf = module.params.get('vrf')
name_alias = module.params.get('name_alias')
aci = ACIModule(module)
aci.construct_url(
@ -271,6 +278,7 @@ def main():
pcEnfDir=policy_control_direction,
pcEnfPref=policy_control_preference,
name=vrf,
nameAlias=name_alias,
),
)

Loading…
Cancel
Save