Skip to content

Commit 434f044

Browse files
committed
[ignore] Modified aci_l4l7_device modules to add appropriate aliases
1 parent e1e3b45 commit 434f044

5 files changed

+40
-39
lines changed

plugins/modules/aci_l4l7_concrete_device.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
module: aci_l4l7_concrete_device
1616
short_description: Manage L4-L7 Concrete Devices (vns:CDev)
1717
description:
18-
- Manage Layer 4-7 (L4-L7) Concrete Devices.
18+
- Manage Layer 4 to Layer 7 (L4-L7) Concrete Devices.
1919
options:
2020
tenant:
2121
description:

plugins/modules/aci_l4l7_concrete_interface.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
module: aci_l4l7_concrete_interface
1616
short_description: Manage L4-L7 Concrete Interfaces (vns:CIf)
1717
description:
18-
- Manage Layer 4-7 (L4-L7) Concrete Interfaces.
18+
- Manage Layer 4 to Layer 7 (L4-L7) Concrete Interfaces.
1919
options:
2020
tenant:
2121
description:
@@ -45,12 +45,13 @@
4545
- For Ports and Port-channels, this is represented as a single node ID.
4646
- For virtual Port Channels (vPCs), this is represented as a hyphen-separated pair of node IDs, such as "201-202".
4747
type: str
48-
path_ep:
48+
interface:
4949
description:
5050
- The path to the physical interface.
5151
- For single ports, this is the port name, e.g. "eth1/15".
5252
- For Port-channels and vPCs, this is the Interface Policy Group name.
5353
type: str
54+
aliases: [ path_ep, interface_name, interface_policy_group, interface_policy_group_name ]
5455
vnic_name:
5556
description:
5657
- The concrete interface vNIC name.
@@ -90,7 +91,7 @@
9091
name: my_concrete_interface
9192
pod_id: 1
9293
node_id: 201
93-
path_ep: eth1/16
94+
interface: eth1/16
9495
state: present
9596
delegate_to: localhost
9697
@@ -105,7 +106,7 @@
105106
name: my_concrete_interface
106107
pod_id: 1
107108
node_id: 201-202
108-
path_ep: my_vpc_ipg
109+
interface: my_vpc_ipg
109110
state: present
110111
delegate_to: localhost
111112
@@ -120,7 +121,7 @@
120121
name: my_concrete_interface
121122
pod_id: 1
122123
node_id: 201-202
123-
path_ep: my_vpc_ipg
124+
interface: my_vpc_ipg
124125
state: query
125126
delegate_to: localhost
126127
register: query_result
@@ -268,7 +269,7 @@ def main():
268269
name=dict(type="str", aliases=["concrete_interface"]),
269270
pod_id=dict(type="int"),
270271
node_id=dict(type="str"),
271-
path_ep=dict(type="str"),
272+
interface=dict(type="str", aliases=["path_ep", "interface_name", "interface_policy_group", "interface_policy_group_name"]),
272273
vnic_name=dict(type="str"),
273274
)
274275

@@ -277,7 +278,7 @@ def main():
277278
supports_check_mode=True,
278279
required_if=[
279280
["state", "absent", ["tenant", "device", "concrete_device", "name"]],
280-
["state", "present", ["tenant", "device", "concrete_device", "name", "pod_id", "node_id", "path_ep"]],
281+
["state", "present", ["tenant", "device", "concrete_device", "name", "pod_id", "node_id", "interface"]],
281282
],
282283
)
283284

@@ -288,7 +289,7 @@ def main():
288289
name = module.params.get("name")
289290
pod_id = module.params.get("pod_id")
290291
node_id = module.params.get("node_id")
291-
path_ep = module.params.get("path_ep")
292+
interface = module.params.get("interface")
292293
vnic_name = module.params.get("vnic_name")
293294

294295
aci = ACIModule(module)
@@ -324,7 +325,7 @@ def main():
324325
aci.get_existing()
325326

326327
if state == "present":
327-
path_dn = "topology/pod-{0}/{1}-{2}/pathep-[{3}]".format(pod_id, "protpaths" if "-" in node_id else "paths", node_id, path_ep)
328+
path_dn = "topology/pod-{0}/{1}-{2}/pathep-[{3}]".format(pod_id, "protpaths" if "-" in node_id else "paths", node_id, interface)
328329
aci.payload(
329330
aci_class="vnsCIf",
330331
class_config=dict(

plugins/modules/aci_l4l7_concrete_interface_attach.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
DOCUMENTATION = r"""
1414
---
1515
module: aci_l4l7_concrete_interface_attach
16-
short_description: Manage L4-L7 Concrete Interface Attach (vns:RsCIfAttN)
16+
short_description: Manage L4-L7 Concrete Interface Attachment (vns:RsCIfAttN)
1717
description:
1818
- Manage Layer 4-7 (L4-L7) Concrete Interface Attachment to Logical Interfaces.
1919
options:

plugins/modules/aci_l4l7_device.py

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
module: aci_l4l7_device
1616
short_description: Manage L4-L7 Devices (vns:LDevVip)
1717
description:
18-
- Manage Layer 4-7 (L4-L7) Devices.
18+
- Manage Layer 4 to Layer 7 (L4-L7) Devices.
1919
options:
2020
tenant:
2121
description:
@@ -33,38 +33,38 @@
3333
- The APIC defaults to C(single) when unset during creation.
3434
type: str
3535
choices: [ multi, single ]
36-
dev_type:
36+
device_type:
3737
description:
3838
- The type of the device.
3939
- The APIC defaults to C(physical) when unset during creation.
4040
type: str
4141
choices: [ physical, virtual ]
42-
aliases: [ device_type ]
43-
func_type:
42+
aliases: [ dev_type ]
43+
function_type:
4444
description:
4545
- The function type of the device.
4646
- The APIC defaults to C(go_to) when unset during creation.
4747
type: str
4848
choices: [ go_to, go_through, l1, l2 ]
49-
aliases: [ function_type ]
49+
aliases: [ func_type ]
5050
managed:
5151
description:
5252
- Is the device a managed device.
5353
- The APIC defaults to C(true) when unset during creation.
5454
type: bool
55-
prom_mode:
55+
promiscuous_mode:
5656
description:
5757
- Enable promiscuous mode.
5858
- The APIC defaults to C(false) when unset during creation.
5959
type: bool
60-
aliases: [ promiscuous_mode ]
61-
svc_type:
60+
aliases: [ prom_mode ]
61+
service_type:
6262
description:
6363
- The service type running on the device.
6464
- The APIC defaults to C(others) when unset during creation.
6565
type: str
6666
choices: [ adc, fw, others ]
67-
aliases: [ service_type ]
67+
aliases: [ svc_type ]
6868
trunking:
6969
description:
7070
- Enable trunking.
@@ -73,7 +73,7 @@
7373
domain:
7474
description:
7575
- The domain to bind to the device.
76-
- The type of domain is controlled by the dev_type setting.
76+
- The type of domain is controlled by the device_type setting.
7777
type: str
7878
state:
7979
description:
@@ -107,13 +107,13 @@
107107
name: my_device
108108
state: present
109109
domain: phys
110-
func_type: go_to
110+
function_type: go_to
111111
context_aware: single
112112
managed: false
113-
dev_type: physical
114-
svc_type: adc
113+
device_type: physical
114+
service_type: adc
115115
trunking: false
116-
prom_mode: true
116+
promiscuous_mode: true
117117
delegate_to: localhost
118118
119119
- name: Query an L4-L7 device
@@ -266,11 +266,11 @@ def main():
266266
name=dict(type="str", aliases=["device", "device_name", "logical_device_name"]),
267267
state=dict(type="str", default="present", choices=["absent", "present", "query"]),
268268
context_aware=dict(type="str", choices=["single", "multi"]),
269-
dev_type=dict(type="str", aliases=["device_type"], choices=["physical", "virtual"]),
270-
func_type=dict(type="str", aliases=["function_type"], choices=list(L4L7_FUNC_TYPES_MAPPING)),
269+
device_type=dict(type="str", aliases=["dev_type"], choices=["physical", "virtual"]),
270+
function_type=dict(type="str", aliases=["func_type"], choices=list(L4L7_FUNC_TYPES_MAPPING)),
271271
managed=dict(type="bool"),
272-
prom_mode=dict(type="bool", aliases=["promiscuous_mode"]),
273-
svc_type=dict(type="str", aliases=["service_type"], choices=["adc", "fw", "others"]),
272+
promiscuous_mode=dict(type="bool", aliases=["prom_mode"]),
273+
service_type=dict(type="str", aliases=["svc_type"], choices=["adc", "fw", "others"]),
274274
trunking=dict(type="bool"),
275275
domain=dict(type="str"),
276276
)
@@ -290,11 +290,11 @@ def main():
290290
state = module.params.get("state")
291291
name = module.params.get("name")
292292
context_aware = module.params.get("context_aware")
293-
dev_type = module.params.get("dev_type")
294-
func_type = L4L7_FUNC_TYPES_MAPPING.get(module.params.get("func_type"))
293+
device_type = module.params.get("device_type")
294+
function_type = L4L7_FUNC_TYPES_MAPPING.get(module.params.get("function_type"))
295295
managed = aci.boolean(module.params.get("managed"))
296-
prom_mode = aci.boolean(module.params.get("prom_mode"))
297-
svc_type = module.params.get("svc_type")
296+
promiscuous_mode = aci.boolean(module.params.get("promiscuous_mode"))
297+
service_type = module.params.get("service_type")
298298
trunking = aci.boolean(module.params.get("trunking"))
299299
domain = module.params.get("domain")
300300

@@ -318,7 +318,7 @@ def main():
318318

319319
if state == "present":
320320
child_configs = []
321-
if dev_type == "virtual":
321+
if device_type == "virtual":
322322
dom_class = "vnsRsALDevToDomP"
323323
tdn = "uni/vmmp-VMware/dom-{0}".format(domain)
324324
else:
@@ -331,11 +331,11 @@ def main():
331331
class_config=dict(
332332
name=name,
333333
contextAware="{0}-Context".format(context_aware),
334-
devtype=dev_type.upper(),
335-
funcType=func_type,
334+
devtype=device_type.upper(),
335+
funcType=function_type,
336336
managed=managed,
337-
promMode=prom_mode,
338-
svcType=svc_type.upper(),
337+
promMode=promiscuous_mode,
338+
svcType=service_type.upper(),
339339
trunking=trunking,
340340
),
341341
child_configs=child_configs,

plugins/modules/aci_l4l7_logical_interface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
module: aci_l4l7_logical_interface
1616
short_description: Manage L4-L7 Logical Interface (vns:LIf)
1717
description:
18-
- Manage Layer 4-7 (L4-L7) Logical Interfaces.
18+
- Manage Layer 4 to Layer 7 (L4-L7) Logical Interfaces.
1919
options:
2020
tenant:
2121
description:

0 commit comments

Comments
 (0)