Skip to content

Commit 828864b

Browse files
sajaganalhercot
authored andcommitted
[ignore] Renamed the aci_endpoint_ip_tag, aci_endpoint_mac_tag to aci_endpoint_tag_ip, aci_endpoint_tag_mac
1 parent d82a230 commit 828864b

File tree

6 files changed

+116
-116
lines changed

6 files changed

+116
-116
lines changed

plugins/modules/aci_endpoint_ip_tag.py renamed to plugins/modules/aci_endpoint_tag_ip.py

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@
1212

1313
DOCUMENTATION = r"""
1414
---
15-
module: aci_endpoint_ip_tag
16-
short_description: Manage Endpoint IP Tag (fv:EpIpTag)
15+
module: aci_endpoint_tag_ip
16+
short_description: Manage Endpoint Tag IP (fv:EpIpTag)
1717
description:
18-
- Manage Endpoint IP Tag on Cisco ACI fabrics.
18+
- Manage Endpoint Tag IP on Cisco ACI fabrics.
1919
options:
2020
tenant:
2121
description:
2222
- The name of the Tenant.
2323
type: str
24-
endpoint_ip_address:
24+
ip:
2525
description:
26-
- The IPv4 or IPv6 address of the Endpoint IP Tag.
26+
- The IPv4 or IPv6 address of the Endpoint Tag IP.
2727
type: str
28-
aliases: [ ip_addr, ip ]
28+
aliases: [ ip_address, endpoint_ip_address ]
2929
vrf:
3030
description:
3131
- The name of the VRF.
@@ -62,40 +62,40 @@
6262

6363
EXAMPLES = r"""
6464
- name: Add an IP Tag
65-
cisco.aci.aci_endpoint_ip_tag:
65+
cisco.aci.aci_endpoint_tag_ip:
6666
host: apic
6767
username: admin
6868
password: SomeSecretPassword
6969
tenant: endpoint_tenant
70-
endpoint_ip_address: 1.1.1.1
70+
ip: 1.1.1.1
7171
vrf: endpoint_vrf
7272
name_alias: endpoint_ip_tag
7373
state: present
7474
7575
- name: Update an IP Tag
76-
cisco.aci.aci_endpoint_ip_tag:
76+
cisco.aci.aci_endpoint_tag_ip:
7777
host: apic
7878
username: admin
7979
password: SomeSecretPassword
8080
tenant: endpoint_tenant
81-
endpoint_ip_address: 1.1.1.1
81+
ip: 1.1.1.1
8282
vrf: endpoint_vrf
8383
name_alias: endpoint_ip_tag_updated
8484
state: present
8585
8686
- name: Query an IP Tag with specific IP and VRF
87-
cisco.aci.aci_endpoint_ip_tag:
87+
cisco.aci.aci_endpoint_tag_ip:
8888
host: apic
8989
username: admin
9090
password: SomeSecretPassword
9191
tenant: endpoint_tenant
92-
endpoint_ip_address: 1.1.1.1
92+
ip: 1.1.1.1
9393
vrf: endpoint_vrf
9494
state: query
9595
register: query_one
9696
9797
- name: Query all IP Tag Objects with only VRF
98-
cisco.aci.aci_endpoint_ip_tag:
98+
cisco.aci.aci_endpoint_tag_ip:
9999
host: apic
100100
username: admin
101101
password: SomeSecretPassword
@@ -104,29 +104,29 @@
104104
register: query_with_vrf
105105
106106
- name: Query all IP Tag Objects with only IP
107-
cisco.aci.aci_endpoint_ip_tag:
107+
cisco.aci.aci_endpoint_tag_ip:
108108
host: apic
109109
username: admin
110110
password: SomeSecretPassword
111-
endpoint_ip_address: 1.1.1.1
111+
ip: 1.1.1.1
112112
state: query
113113
register: query_with_ip
114114
115115
- name: Query all IP Tags
116-
cisco.aci.aci_endpoint_ip_tag:
116+
cisco.aci.aci_endpoint_tag_ip:
117117
host: apic
118118
username: admin
119119
password: SomeSecretPassword
120120
state: query
121121
register: query_all
122122
123123
- name: Delete an IP Tag
124-
cisco.aci.aci_endpoint_ip_tag:
124+
cisco.aci.aci_endpoint_tag_ip:
125125
host: apic
126126
username: admin
127127
password: SomeSecretPassword
128128
tenant: endpoint_tenant
129-
endpoint_ip_address: 1.1.1.1
129+
ip: 1.1.1.1
130130
vrf: endpoint_vrf
131131
state: present
132132
"""
@@ -246,7 +246,7 @@ def main():
246246
argument_spec.update(aci_owner_spec())
247247
argument_spec.update(
248248
tenant=dict(type="str"),
249-
endpoint_ip_address=dict(type="str", aliases=["ip_addr", "ip"]),
249+
ip=dict(type="str", aliases=["ip_address", "endpoint_ip_address"]),
250250
vrf=dict(type="str", aliases=["vrf_name"]),
251251
name_alias=dict(type="str"),
252252
state=dict(type="str", default="present", choices=["absent", "present", "query"]),
@@ -256,24 +256,24 @@ def main():
256256
argument_spec=argument_spec,
257257
supports_check_mode=True,
258258
required_if=[
259-
["state", "absent", ["tenant", "vrf", "endpoint_ip_address"]],
260-
["state", "present", ["tenant", "vrf", "endpoint_ip_address"]],
259+
["state", "absent", ["tenant", "vrf", "ip"]],
260+
["state", "present", ["tenant", "vrf", "ip"]],
261261
],
262262
)
263263

264264
aci = ACIModule(module)
265265

266266
tenant = module.params.get("tenant")
267-
endpoint_ip_address = module.params.get("endpoint_ip_address")
267+
ip = module.params.get("ip")
268268
vrf = module.params.get("vrf")
269269
name_alias = module.params.get("name_alias")
270270
annotation = module.params.get("annotation")
271271
state = module.params.get("state")
272272

273273
aci = ACIModule(module)
274274

275-
if endpoint_ip_address and vrf:
276-
endpoint_ip_tag_module_object = "[{0}]-{1}".format(endpoint_ip_address, vrf)
275+
if ip and vrf:
276+
endpoint_ip_tag_module_object = "[{0}]-{1}".format(ip, vrf)
277277
endpoint_ip_tag_rn = "eptags/epiptag-{0}".format(endpoint_ip_tag_module_object)
278278
else:
279279
endpoint_ip_tag_rn = None
@@ -290,7 +290,7 @@ def main():
290290
aci_class="fvEpIpTag",
291291
aci_rn=endpoint_ip_tag_rn,
292292
module_object=endpoint_ip_tag_module_object,
293-
target_filter=dict(ip=endpoint_ip_address, ctxName=vrf),
293+
target_filter=dict(ip=ip, ctxName=vrf),
294294
),
295295
)
296296
aci.get_existing()
@@ -301,7 +301,7 @@ def main():
301301
class_config=dict(
302302
annotation=annotation,
303303
ctxName=vrf,
304-
ip=endpoint_ip_address,
304+
ip=ip,
305305
nameAlias=name_alias,
306306
),
307307
)

plugins/modules/aci_endpoint_mac_tag.py renamed to plugins/modules/aci_endpoint_tag_mac.py

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@
1212

1313
DOCUMENTATION = r"""
1414
---
15-
module: aci_endpoint_mac_tag
16-
short_description: Manage Endpoint MAC Tag (fv:EpMacTag)
15+
module: aci_endpoint_tag_mac
16+
short_description: Manage Endpoint Tag MAC (fv:EpMacTag)
1717
description:
18-
- Manage Endpoint MAC Tag on Cisco ACI fabrics.
18+
- Manage Endpoint Tag MAC on Cisco ACI fabrics.
1919
options:
2020
tenant:
2121
description:
2222
- The name of the Tenant.
2323
type: str
24-
endpoint_mac_address:
24+
mac:
2525
description:
26-
- The MAC address of the Endpoint MAC Tag.
26+
- The MAC address of the Endpoint Tag MAC.
2727
type: str
28-
aliases: [ mac_addr, mac ]
28+
aliases: [ mac_address, endpoint_mac_address ]
2929
bd:
3030
description:
3131
- The name of the Bridge Domain.
@@ -62,40 +62,40 @@
6262

6363
EXAMPLES = r"""
6464
- name: Add a MAC Tag
65-
cisco.aci.aci_endpoint_mac_tag:
65+
cisco.aci.aci_endpoint_tag_mac:
6666
host: apic
6767
username: admin
6868
password: SomeSecretPassword
6969
tenant: endpoint_tenant
70-
endpoint_mac_address: AE:ED:EE:EE:AA:AA
70+
mac: AE:ED:EE:EE:AA:AA
7171
bd: endpoint_bd
7272
name_alias: endpoint_mac_tag
7373
state: present
7474
7575
- name: Update a MAC Tag
76-
cisco.aci.aci_endpoint_mac_tag:
76+
cisco.aci.aci_endpoint_tag_mac:
7777
host: apic
7878
username: admin
7979
password: SomeSecretPassword
8080
tenant: endpoint_tenant
81-
endpoint_mac_address: AE:ED:EE:EE:AA:AA
81+
mac: AE:ED:EE:EE:AA:AA
8282
bd: endpoint_bd
8383
name_alias: endpoint_mac_tag_updated
8484
state: present
8585
8686
- name: Query a MAC Tag with specific MAC and BD
87-
cisco.aci.aci_endpoint_mac_tag:
87+
cisco.aci.aci_endpoint_tag_mac:
8888
host: apic
8989
username: admin
9090
password: SomeSecretPassword
9191
tenant: endpoint_tenant
92-
endpoint_mac_address: AE:ED:EE:EE:AA:AA
92+
mac: AE:ED:EE:EE:AA:AA
9393
bd: endpoint_bd
9494
state: query
9595
register: query_one
9696
9797
- name: Query all MAC Tag Objects with only BD
98-
cisco.aci.aci_endpoint_mac_tag:
98+
cisco.aci.aci_endpoint_tag_mac:
9999
host: apic
100100
username: admin
101101
password: SomeSecretPassword
@@ -104,29 +104,29 @@
104104
register: query_with_bd
105105
106106
- name: Query all MAC Tag Objects with only MAC
107-
cisco.aci.aci_endpoint_mac_tag:
107+
cisco.aci.aci_endpoint_tag_mac:
108108
host: apic
109109
username: admin
110110
password: SomeSecretPassword
111-
endpoint_mac_address: AE:ED:EE:EE:AA:AA
111+
mac: AE:ED:EE:EE:AA:AA
112112
state: query
113113
register: query_with_mac
114114
115115
- name: Query all MAC Tags
116-
cisco.aci.aci_endpoint_mac_tag:
116+
cisco.aci.aci_endpoint_tag_mac:
117117
host: apic
118118
username: admin
119119
password: SomeSecretPassword
120120
state: query
121121
register: query_all
122122
123123
- name: Delete a MAC Tag
124-
cisco.aci.aci_endpoint_mac_tag:
124+
cisco.aci.aci_endpoint_tag_mac:
125125
host: apic
126126
username: admin
127127
password: SomeSecretPassword
128128
tenant: endpoint_tenant
129-
endpoint_mac_address: AE:ED:EE:EE:AA:AA
129+
mac: AE:ED:EE:EE:AA:AA
130130
bd: endpoint_bd
131131
state: absent
132132
"""
@@ -246,7 +246,7 @@ def main():
246246
argument_spec.update(aci_owner_spec())
247247
argument_spec.update(
248248
tenant=dict(type="str"),
249-
endpoint_mac_address=dict(type="str", aliases=["mac_addr", "mac"]),
249+
mac=dict(type="str", aliases=["mac_address", "endpoint_mac_address"]),
250250
bd=dict(type="str", aliases=["bd_name"]),
251251
name_alias=dict(type="str"),
252252
state=dict(type="str", default="present", choices=["absent", "present", "query"]),
@@ -256,24 +256,24 @@ def main():
256256
argument_spec=argument_spec,
257257
supports_check_mode=True,
258258
required_if=[
259-
["state", "absent", ["tenant", "bd", "endpoint_mac_address"]],
260-
["state", "present", ["tenant", "bd", "endpoint_mac_address"]],
259+
["state", "absent", ["tenant", "bd", "mac"]],
260+
["state", "present", ["tenant", "bd", "mac"]],
261261
],
262262
)
263263

264264
aci = ACIModule(module)
265265

266266
tenant = module.params.get("tenant")
267-
endpoint_mac_address = module.params.get("endpoint_mac_address")
267+
mac = module.params.get("mac")
268268
bd = module.params.get("bd")
269269
name_alias = module.params.get("name_alias")
270270
annotation = module.params.get("annotation")
271271
state = module.params.get("state")
272272

273273
aci = ACIModule(module)
274274

275-
if endpoint_mac_address and bd:
276-
endpoint_mac_tag_module_object = "{0}-[{1}]".format(endpoint_mac_address, bd)
275+
if mac and bd:
276+
endpoint_mac_tag_module_object = "{0}-[{1}]".format(mac, bd)
277277
endpoint_mac_tag_rn = "eptags/epmactag-{0}".format(endpoint_mac_tag_module_object)
278278
else:
279279
endpoint_mac_tag_rn = None
@@ -290,7 +290,7 @@ def main():
290290
aci_class="fvEpMacTag",
291291
aci_rn=endpoint_mac_tag_rn,
292292
module_object=endpoint_mac_tag_module_object,
293-
target_filter=dict(mac=endpoint_mac_address, bdName=bd),
293+
target_filter=dict(mac=mac, bdName=bd),
294294
),
295295
)
296296

@@ -302,7 +302,7 @@ def main():
302302
class_config=dict(
303303
annotation=annotation,
304304
bdName=bd,
305-
mac=endpoint_mac_address,
305+
mac=mac,
306306
nameAlias=name_alias,
307307
),
308308
)

0 commit comments

Comments
 (0)