-
Notifications
You must be signed in to change notification settings - Fork 101
Addition of L4l7 device modules (DCNE-334) #739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
aliases: [ concrete_device, concrete_device_name ] | ||
vcenter_name: | ||
description: | ||
- The virtual center name on which the device is hosted in the L4-L7 device cluster. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the virtual center referring to? is this VMware VCenter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likely because vCenter is a product that solely belongs to VMware?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
path_ep: | ||
description: | ||
- The path to the physical interface. | ||
- For single ports, this is the port name, e.g. "eth1/15". | ||
- For Port-channels and vPCs, this is the Interface Policy Group name. | ||
type: str |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would move path_ep as an alias and have interface as the main attribute and interface_name and interface_policy_group and interface_policy_group_name as additional aliases.
DOCUMENTATION = r""" | ||
--- | ||
module: aci_l4l7_concrete_interface_attach | ||
short_description: Manage L4-L7 Concrete Interface Attach (vns:RsCIfAttN) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
short_description: Manage L4-L7 Concrete Interface Attach (vns:RsCIfAttN) | |
short_description: Manage L4-L7 Concrete Interface Attachment (vns:RsCIfAttN) |
plugins/modules/aci_l4l7_device.py
Outdated
module: aci_l4l7_device | ||
short_description: Manage L4-L7 Devices (vns:LDevVip) | ||
description: | ||
- Manage Layer 4-7 (L4-L7) Devices. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Manage Layer 4-7 (L4-L7) Devices. | |
- Manage Layer 4 to Layer 7 (L4-L7) Devices. |
plugins/modules/aci_l4l7_device.py
Outdated
- The APIC defaults to C(single) when unset during creation. | ||
type: str | ||
choices: [ multi, single ] | ||
dev_type: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
swap attribute and aliases
plugins/modules/aci_l4l7_device.py
Outdated
type: str | ||
choices: [ physical, virtual ] | ||
aliases: [ device_type ] | ||
func_type: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
swap attribute and aliases
plugins/modules/aci_l4l7_device.py
Outdated
dev_type: physical | ||
svc_type: adc | ||
trunking: false | ||
prom_mode: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prom_mode: true | |
promiscuous_mode: true |
module: aci_l4l7_logical_interface | ||
short_description: Manage L4-L7 Logical Interface (vns:LIf) | ||
description: | ||
- Manage Layer 4-7 (L4-L7) Logical Interfaces. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Manage Layer 4-7 (L4-L7) Logical Interfaces. | |
- Manage Layer 4 to Layer 7 (L4-L7) Logical Interfaces. |
module: aci_l4l7_concrete_interface_attach | ||
short_description: Manage L4-L7 Concrete Interface Attach (vns:RsCIfAttN) | ||
description: | ||
- Manage Layer 4-7 (L4-L7) Concrete Interface Attachment to Logical Interfaces. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Manage Layer 4-7 (L4-L7) Concrete Interface Attachment to Logical Interfaces. | |
- Manage Layer 4 to Layer 7 (L4-L7) Concrete Interface Attachment to Logical Interfaces. |
module: aci_l4l7_concrete_interface | ||
short_description: Manage L4-L7 Concrete Interfaces (vns:CIf) | ||
description: | ||
- Manage Layer 4-7 (L4-L7) Concrete Interfaces. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Manage Layer 4-7 (L4-L7) Concrete Interfaces. | |
- Manage Layer 4 to Layer 7 (L4-L7) Concrete Interfaces. |
module: aci_l4l7_concrete_device | ||
short_description: Manage L4-L7 Concrete Devices (vns:CDev) | ||
description: | ||
- Manage Layer 4-7 (L4-L7) Concrete Devices. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Manage Layer 4-7 (L4-L7) Concrete Devices. | |
- Manage Layer 4 to Layer 7 (L4-L7) Concrete Devices. |
ef3845b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
delegate_to: localhost | ||
|
||
- name: Query a concrete interface | ||
cisco.aci.aci_l4l7_service_graph_template: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cisco.aci.aci_l4l7_service_graph_template: | |
cisco.aci.aci_l4l7_concrete_interface: |
register: query_result | ||
|
||
- name: Query all concrete interfaces | ||
cisco.aci.aci_l4l7_service_graph_template: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cisco.aci.aci_l4l7_service_graph_template: | |
cisco.aci.aci_l4l7_concrete_interface: |
#!/usr/bin/python | ||
# -*- coding: utf-8 -*- | ||
|
||
# Copyright: (c) 2025, Tim Cragg (@timcragg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
your name in modules
description: More information about the internal APIC class B(vns:CDev) | ||
link: https://developer.cisco.com/docs/apic-mim-ref/ | ||
author: | ||
- Tim Cragg (@timcragg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
your name in modules
@@ -0,0 +1,196 @@ | |||
# Test code for the ACI modules | |||
# Copyright: (c) 2025, Tim Cragg (@timcragg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
your name in modules tests
|
||
DOCUMENTATION = r""" | ||
--- | ||
module: aci_l4l7_concrete_interface_attach |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not name the module with full name?
module: aci_l4l7_concrete_interface_attach | |
module: aci_l4l7_concrete_interface_attachment |
…s with changed names
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
… with changed names in v3.0.0
seealso: | ||
- module: aci_l4l7_device |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we reference the module for the tenant here as well?
seealso: | |
- module: aci_l4l7_device | |
seealso: | |
- module: aci_tenant | |
- module: aci_l4l7_device |
If so it should be applied it to every module where it was missed
device: | ||
description: | ||
- The name of the logical device (vns:lDevVip) the concrete device is attached to. | ||
type: str | ||
aliases: [ device_name, logical_device_name ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it not better to call it logical_device
and add device
as an alias? It would be less confusing since we have logical device and concrete device but this is just a suggestion
device: | |
description: | |
- The name of the logical device (vns:lDevVip) the concrete device is attached to. | |
type: str | |
aliases: [ device_name, logical_device_name ] | |
logical_device: | |
description: | |
- The name of the logical device (vns:lDevVip) the concrete device is attached to. | |
type: str | |
aliases: [ device, device_name, logical_device_name ] |
If you do make the change, it should be applied to every module where logical device is referenced
plugins/modules/aci_l4l7_device.py
Outdated
description: | ||
- The name of the L4-L7 device. | ||
type: str | ||
aliases: [ device, device_name, logical_device_name ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we add an extra alias? logical_device
?
aliases: [ device, device_name, logical_device_name ] | |
aliases: [ device, device_name, logical_device, logical_device_name ] |
device: | ||
description: | ||
- The name of an existing Logical Device. | ||
type: str |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forgot to add the aliases:
device: | |
description: | |
- The name of an existing Logical Device. | |
type: str | |
device: | |
description: | |
- The name of an existing Logical Device. | |
type: str | |
aliases: [ logical_device, device_name, logical_device_name ] |
logical_interface: | ||
description: | ||
- The name of an existing Logical Interface. | ||
type: str |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we add a few aliases? like name
, logical_interface_name
, interface
, interface_name
, etc...?
device: | ||
description: | ||
- The name of an existing Logical Device. | ||
type: str | ||
logical_interface: | ||
description: | ||
- The name of an existing Logical Interface. | ||
type: str | ||
concrete_device: | ||
description: | ||
- The name of an existing Concrete Device. | ||
type: str | ||
concrete_interface: | ||
description: | ||
- The name of an existing Concrete Interface. | ||
type: str |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we add the aliases we have defined for these attributes in their respective referenced modules?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The single alias of name in other modules become the main attribute name in this module. Made changes to others!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
- cisco.aci.aci | ||
- cisco.aci.annotation | ||
notes: | ||
- The I(tenant) and I(device) must exist before using this module in your playbook. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this use O for option instead.
- The I(tenant) and I(device) must exist before using this module in your playbook. | |
- The O(tenant) and O(logical_device) must exist before using this module in your playbook. |
- cisco.aci.aci | ||
- cisco.aci.annotation | ||
notes: | ||
- The I(tenant), I(device) and I(concrete_device) must exist before using this module in your playbook. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The I(tenant), I(device) and I(concrete_device) must exist before using this module in your playbook. | |
- The O(tenant), O(logical_device) and O(concrete_device) must exist before using this module in your playbook. |
- cisco.aci.aci | ||
- cisco.aci.annotation | ||
notes: | ||
- The I(tenant), I(device), I(logical_interface) and I(concrete_device) must exist before using this module in your playbook. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The I(tenant), I(device), I(logical_interface) and I(concrete_device) must exist before using this module in your playbook. | |
- The O(tenant), O(logical_device), O(logical_interface) and O(concrete_device) must exist before using this module in your playbook. |
- cisco.aci.aci | ||
- cisco.aci.annotation | ||
notes: | ||
- The I(tenant) must exist before using this module in your playbook. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The I(tenant) must exist before using this module in your playbook. | |
- The O(tenant) must exist before using this module in your playbook. |
- cisco.aci.aci | ||
- cisco.aci.annotation | ||
notes: | ||
- The I(tenant) and I(device) must exist before using this module in your playbook. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The I(tenant) and I(device) must exist before using this module in your playbook. | |
- The O(tenant) and O(logical_device) must exist before using this module in your playbook. |
No description provided.