-
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
[IOS][get_vlans()] Parse VLAN IDs when private VLANs are implemented #1994
Draft
vvas1lev
wants to merge
47
commits into
napalm-automation:develop
Choose a base branch
from
vvas1lev:develop
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 22 commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
a395045
Parse Private VLANs
vvas1lev 8525937
add tests
vvas1lev 590e3ce
Update mock data
vvas1lev bff8d13
run black
vvas1lev 35817fe
fix typo
vvas1lev c747d1c
fix more typos
vvas1lev 90a7b96
s/name/'name'/
vvas1lev d51968c
fix json encoding
vvas1lev 6e54189
refactor VLAN match logic
vvas1lev 9980dc6
fix tests
vvas1lev 399670f
fixing a typo
vvas1lev 0ee9432
Preserve private VLAN names
vvas1lev a0f8f56
fix a typo
vvas1lev 42454d2
fix ident
vvas1lev 7094e96
fix typo
vvas1lev ae45820
Merge branch 'develop' into develop
vvas1lev a8f97f1
Merge branch 'develop' into develop
vvas1lev 9a30c62
Merge branch 'develop' into develop
vvas1lev 808eca9
black
vvas1lev ca3acb0
rebase
vvas1lev f1054af
empty commit / re-run tests
vvas1lev 07c6ae4
black 24.3.0
vvas1lev d41df1d
Merge branch 'develop' into develop
mirceaulinic 09d96ab
Merge branch 'develop' into develop
vvas1lev 4e373e9
remove ws
vvas1lev 2a42429
refactor _get_vlan_all_ports()
vvas1lev f33e1cf
fix typo
vvas1lev 870434d
update unittest
vvas1lev 3df3890
remove wrongly entered PVLANs in mocked data
vvas1lev cf4c517
update mocked data
vvas1lev 1fa6d76
update mocked data
vvas1lev f45c248
update tests
vvas1lev c3597ca
update tests
vvas1lev d1f7e1e
update tests
vvas1lev 5053858
add new mock data
vvas1lev e1598b4
rename mock file
vvas1lev 25dad20
fix logic
vvas1lev 20e94b1
fixes
vvas1lev cb52b09
fixes
vvas1lev 923035d
black
vvas1lev 9b4023d
fixes
vvas1lev 3740b64
add mock data
vvas1lev f546560
fixes
vvas1lev 423e623
fixes
vvas1lev 34e90aa
black
vvas1lev a850cd5
fixes
vvas1lev 7680d42
fixes
vvas1lev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
test/ios/mocked_data/test_get_vlans/no_show_vlan_all_ports/show_vlan_id_2400.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
VLAN Name Status Ports | ||
---- -------------------------------- --------- ------------------------------- | ||
2400 Vlan2400 active Po1 | ||
|
||
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 | ||
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ | ||
2400 enet 102400 1500 - - - - - 0 0 | ||
|
||
Remote SPAN VLAN | ||
---------------- | ||
Disabled | ||
|
||
Primary Secondary Type Ports | ||
------- --------- ----------------- ------------------------------------------ | ||
2400 2432 community Gi0/1, Gi0/2 | ||
2400 2433 community Gi0/3, Gi0/4 |
15 changes: 15 additions & 0 deletions
15
test/ios/mocked_data/test_get_vlans/no_show_vlan_all_ports/show_vlan_id_2432.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
VLAN Name Status Ports | ||
---- -------------------------------- --------- ------------------------------- | ||
2432 Vlan2432 active Po1 | ||
|
||
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 | ||
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ | ||
2432 enet 102432 1500 - - - - - 0 0 | ||
|
||
Remote SPAN VLAN | ||
---------------- | ||
Disabled | ||
|
||
Primary Secondary Type Ports | ||
------- --------- ----------------- ------------------------------------------ | ||
2400 2432 community Gi0/1, Gi0/2 |
15 changes: 15 additions & 0 deletions
15
test/ios/mocked_data/test_get_vlans/no_show_vlan_all_ports/show_vlan_id_2433.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
VLAN Name Status Ports | ||
---- -------------------------------- --------- ------------------------------- | ||
2433 Vlan2433 active Po1 | ||
|
||
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 | ||
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ | ||
2433 enet 102433 1500 - - - - - 0 0 | ||
|
||
Remote SPAN VLAN | ||
---------------- | ||
Disabled | ||
|
||
Primary Secondary Type Ports | ||
------- --------- ----------------- ------------------------------------------ | ||
2400 2433 community Gi0/3, Gi0/4 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Probably need to add a
strip
call on this line somewhere given the failing test outputThere 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 gave this a try, and even with a
strip()
the tests would need the following in order to pass with this code:So I believe there's more work required in this PR, re-scheduling for the next release.
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.
@mirceaulinic @bewing I figured it'd need more work, which is why I changed it back to draft. I'm just back from PTO, will take a look at this coming week.
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.
Cool - thanks for the heads up @vvas1lev!