VLAN Switchport Mode Mismatch (?) Between Channel-Port and Channel Group in Snapshot aristaevpn
amar-ox opened this issue · comments
Amar Abane commented
Description:
The interface members of a channel-port have their switchport mode set to ACCESS, whereas their channel group has the mode set to TRUNK. If I understand correctly, the VLAN mode should be inherited from the channel group, meaning the interface members should also have the VLAN mode set to TRUNK.
Runnable example
import requests
import os
from pybatfish.client.session import Session
SNAPSHOT_URL = "https://github.com/user-attachments/files/15539706/aristaevpn.zip"
SNAPSHOT_PATH = "aristaevpn.zip"
SNAPSHOT_NAME = "aristaevpn"
response = requests.get(SNAPSHOT_URL)
if response.status_code == 200:
# Save the file to the local path
with open(SNAPSHOT_PATH, 'wb') as file:
file.write(response.content)
bf = Session(host="localhost")
bf.set_network("github-bug-report")
bf.init_snapshot(SNAPSHOT_PATH, name=SNAPSHOT_NAME, overwrite=True)
# Verify that Batfish recognized the vendor format correctly
print(bf.q.fileParseStatus().answer())
# Insert command(s) below to demonstrate the problem
itfs = bf.q.interfaceProperties(properties="Channel_Group, Switchport_Mode").answer().frame()
interfaces = itfs[itfs['Switchport_Mode'] == 'ACCESS'].head(5)
portchannels = itfs[itfs['Switchport_Mode'] == 'TRUNK'].head(5)
display(interfaces)
display(portchannels)