Closed mikewiebe closed 7 months ago
@mikewiebe , @mtarking
i renamed this to vPC Peering
Looks like we may need an Interface vPC issue like below in addition to this vPC peering issue.
https://github.com/netascode/ansible-dc-vxlan/issues/12
CC: @juburnet , @devegupt
@mikewiebe
let me know once vpc peering module is ready.
is this the one >> https://github.com/CiscoDevNet/ansible-dcnm/issues/79
I have patched in the changes for the dcnm_vpc_pair
module.
Here is how you pick up the change
https://github.com/netascode/ansible-dc-vxlan.git
to make sure you have the latest updatesansible-galaxy install -r requirements.yml -f
commandIssue the ansible-galaxy collection list
command and make sure the version installed is cisco.dcnm 3.4.3-dev-fv
Here is a sample playbook for calling the module
- name: Create VPC switch pair using replaced state
cisco.dcnm.dcnm_vpc_pair:
src_fabric: "{{ MD.fabric.name }}"
deploy: true # Flag indicating whether changes are to be deployed, Mandatory: False, Type: bool, default: True
state: replaced # only choose form [merged, replaced, deleted, overridden, query. fetch]
config:
- peerOneId: "10.122.84.55" # IP Address/Host Name of Peer1 of VPC switch pair, Mandatory: True, Type: str
peerTwoId: "10.122.84.56" # IP Address/Host Name of Peer2 of VPC switch pair, Mandatory: True, Type: str
templateName: "vpc_pair" # Template to be applied to this VPC switch pair
profile:
ADMIN_STATE: True # Uncheck to disable the vPC Peerlink port-channel, Mandatory: True, Type: bool, Default: true"
ALLOWED_VLANS: "all" # Allowed values: 'none', 'all', or vlan ranges (ex: 1-200,500-2000,3000), Mandatory: True, Type: str, Default: all"
DOMAIN_ID: "1" # vPC Domain ID, Mandatory: True, Min: 1, Max: 1000, Type: int, Default: ''"
FABRIC_NAME: "{ MD.fabric.name }}" # Fabric Name, Mandatory: True, Type: str, Default: ''"
KEEP_ALIVE_HOLD_TIMEOUT: 3 # Hold timeout to ignore stale peer alive messages, default is 3 if not specified, Mandatory: False, Min: 3, Max: 10, Type: int, Default: 3"
KEEP_ALIVE_VRF: management # Name of VRF used for keep-alive, enter 'default' for default VRF, Mandatory: True, Type: str, Default: ''"
PC_MODE: active # Channel mode options: on, active and passive, Mandatory: False, ValidValues: ['on', 'active', 'passive'], Type: str, Default: active"
PEER1_DOMAIN_CONF: "fast-convergence" # Additional CLI for Peer-1 vPC Domain, Mandatory: False, Type: str, Default: ''"
PEER1_KEEP_ALIVE_LOCAL_IP: "10.122.84.55" # IP address of a L3 interface in non-default VRF on Peer 1, Mandatory: True, Type: str, Default: ''"
PEER1_MEMBER_INTERFACES: e1/20 # A list of member interfaces for Peer-1 [e.g. e1/5,eth1/7-9], Mandatory: False, Type: list, Default: []"
PEER1_PCID: 101 # Peer-1 Peerlink port-channel number (Min:1, Max:4096), Mandatory: False, Min: 1, Max: 4096, Type: int, Default: ''"
PEER1_PO_CONF: "bandwidth inherit" # Additional CLI for Peer-1 vPC Peerlink port-channel, Mandatory: False, Type: str, Default: ''"
PEER1_PO_DESC: "This is peer1 PC" # Add description to the port-channel (Max Size 254), Mandatory: False, MinLen: 1, MaxLen: 254, Type: str, Default: ''"
PEER2_DOMAIN_CONF: "fast-convergence" # Additional CLI for Peer-2 vPC Domain, Mandatory: False, Type: str, Default: ''"
PEER2_KEEP_ALIVE_LOCAL_IP: "10.122.84.56" # IP address of a L3 interface in non-default VRF on Peer 2, Mandatory: True, Type: str, Default: ''"
PEER2_MEMBER_INTERFACES: e1/20 # A list of member interfaces for Peer-2 [e.g. e1/5,eth1/7-9], Mandatory: False, Type: list, Default: []"
PEER2_PCID: 102 # Peer-2 Peerlink port-channel number (Min:1, Max:4096), Mandatory: False, Min: 1, Max: 4096, Type: int, Default: ''"
PEER2_PO_CONF: "bandwidth inherit" # Additional CLI for Peer-1 vPC Peerlink port-channel, Mandatory: False, Type: str, Default: ''"
PEER2_PO_DESC: "This is peer2 PC" # Add description to the port-channel (Max Size 254), Mandatory: False, MinLen: 1, MaxLen: 254, Type: str, Default: ''"
clear_policy: False # NA, Mandatory: True, Type: str, Default: false"
isVTEPS: False # Check this to configure NVE source loopback interface, Mandatory: isVpcPlus!=true, Type: bool, Default: false"
isVpcPlus: False # Check this if it's a vPC topology, Mandatory: True, Type: bool, Default: false"
register: result
Note: According to the author of the module, you don't need the profile section or parameters under the profile section for vxlan, so try calling the module without that.
@rrahimm this issue's branch vpc_peering should be ready for a PR. If so, feel free to go ahead and open.
Role Entry Point: https://github.com/netascode/ansible-dc-vxlan/blob/main/roles/dtc/create/tasks/ndfc/main.yml#L23
Role should make use of the following NDFC Ansible Collection dcnm_vpc_pair
This work item should enable creation of a vPC peer between two leaf devices:
Scope of Work:
GUI Example for creating vPC pair (https://ndfc-lab.ciscolive.com/lab/pod1/ndfc-fabric1/vpc)
Relavant Schema:
Sample Service Model Data:
Sample task to query vPC peer status data