CiscoDevNet / ansible-dcnm

Apache License 2.0
45 stars 36 forks source link

Add support for creating VPC pair #79

Closed gve-vse-tim closed 4 months ago

gve-vse-tim commented 3 years ago

Community Note

Description

Aside from spines in a VXLAN fabric, most other switch types (border gateways or leafs) are frequently added as a VPC pair. There's support for adding switches to a fabric but no support for the next logical step: vpc pairing.

For VXLAN fabrics, the required information is very minimal: namely, which two switches are going to be paired. The remaining settings are derived from fabric settings.

For external fabrics, the domain configuration information is required (PKA, Peer link port channel, etc.).

The example below shows all the options for external fabrics but only the "ip" attribute would be required for VXLAN fabrics. So, as a matter of software, you'd validate the inputs based on fabric type.

New or Affected modules(s):

DCNM version

Potential ansible task config

      dcnm_vpc_domain:
        fabric: "{{ local_fabric }}"
        state: merged
        deploy: false
        config:
          - ip: 10.60.66.231                        # switch management ip (for DCNM lookup)
            pka_ip: 10.60.66.231                    # optional: what PKA source IP to use
            pka_vrf: management                     # optional: provide if non-default
            peerlink_po_id: 1
            peerlink_members: eth1/53-54
            peerlink_description: Ansible created
            peerlink_allowed_vlans: all
          - ip: 10.60.66.232                        # switch management ip (for DCNM lookup)
            pka_ip: 10.60.66.232                    # optional: what PKA source IP to use
            pka_vrf: management                     # optional: provide if non-default
            peerlink_po_id: 1
            peerlink_members: eth1/53-54
            peerlink_description: Ansible created
            peerlink_allowed_vlans: all

References

DCNM 11.5 section on configuring vPC in external fabric

Additional context

micruzz82 commented 3 years ago

would this module also support day 0 provisioning of border leafs to be configured as vpc peers using vpc fabric peering?

gve-vse-tim commented 3 years ago

Adding a module level attribute boolean of "fabric_peering" would be a great add on. So an updated example would be:

      dcnm_vpc_domain:
        fabric: "{{ local_fabric }}"
        fabric_peering: false
        state: merged
        deploy: false
        config:
          - ip: 10.60.66.231                        # switch management ip (for DCNM lookup)
            pka_ip: 10.60.66.231                    # optional: what PKA source IP to use
            pka_vrf: management                     # optional: provide if non-default
            peerlink_po_id: 1
            peerlink_members: eth1/53-54
            peerlink_description: Ansible created
            peerlink_allowed_vlans: all
          - ip: 10.60.66.232                        # switch management ip (for DCNM lookup)
            pka_ip: 10.60.66.232                    # optional: what PKA source IP to use
            pka_vrf: management                     # optional: provide if non-default
            peerlink_po_id: 1
            peerlink_members: eth1/53-54
            peerlink_description: Ansible created
            peerlink_allowed_vlans: all
praveenramoorthy commented 4 months ago

Feature added as part #273