Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,19 @@ def match(cls, data_model):
)
return results

# Enforce Port-channel ID matches vPC ID to avoid mismatched configurations
port_channel_match = re.fullmatch(
r"Port-channel(\d+)", interface_name
)
if port_channel_match:
port_channel_id = port_channel_match.group(1)

if int(port_channel_id) != int(vpc_id):
results.append(
f"Switch {switch_name} interface {interface_name} uses vPC id {vpc_id}"
"but Port-channel ID {port_channel_id}; these values must match."
)

# Check if vPC id is referenced by more than 1 Port-channel on the switch
if vpc_id in vpc_ids:
results.append(
Expand Down