-
Notifications
You must be signed in to change notification settings - Fork 557
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
Add get_vlans for Junos #1398
Add get_vlans for Junos #1398
Conversation
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.
That's great @minefuto, thanks for taking over. Looks good, just a small detail I'm curious about otherwise this should be good.
return result | ||
|
||
vlan.get() | ||
unmatch_pattern = "l2rtb-interface-name|None|l2ng-l2rtb-vlan-member-interface" |
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 suppose there are different formats to match because of various switch styles? Is None
a possibility? If so, would you have access to a device to add another test case for that one too?
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.
It returns different values depending on switch_style if there is not binding IF of vlan.
BRIDGE_DOMAIN: l2rtb-interface-name
VLAN: None(string)
VLAN_L2NG: l2ng-l2rtb-vlan-member-interface
I think I have already added the above 3 patterns as a VLAN300 per switch_style.
BRIDGE_DOMAIN, VLAN, VLAN_L2NG
Also, I found an exception on MX(switch_style:BRIDGE_DOMAIN).
It seems it's possible that MX returns None(NoneType) if there is not binding IF of vlan.
I added this pattern only BRIDGE_DOMAIN by f519d24, 09fe92f because I could not found this exception in the others switch_style.
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.
Makes sense, thank you @minefuto!
I add get_vlans for Junos because #1367 is inactivity.