-
Notifications
You must be signed in to change notification settings - Fork 45
Add VLAN description to ipdevinfo ports table #3473
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
base: master
Are you sure you want to change the base?
Conversation
Test results 12 files 12 suites 12m 26s ⏱️ Results for commit ab9ce74. ♻️ This comment has been updated with latest results. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3473 +/- ##
=======================================
Coverage 61.04% 61.05%
=======================================
Files 610 610
Lines 44708 44715 +7
Branches 43 43
=======================================
+ Hits 27294 27301 +7
Misses 17404 17404
Partials 10 10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
fe9a66b
to
9f6644a
Compare
9f6644a
to
ab9ce74
Compare
|
Good call. Never post customer data online unless you have explicit consent. |
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.
The issue mentions #1935, which was solved by #1955 - it basically uses str(vlan_object)
as "description" - which, in fact, is the netident, not the "description". Netidents are more prevalent.
But it sounds like you need input on what SwportVlan is and how to interpret the data, so let's have a f2f chat about this feature next week...
Scope and purpose
Fixes #2160.
Adds new column showing VLAN description to the Ports table in ipdevinfo.
Adds VLAN description to the results of the
interface
API. This was necessary as the Port table gets its data from that endpoint.Not too many VLANs seem to have a description, but I found some examples when using a dump from gloshaugen vk. I was unable to find any examples on sikt-vk (there were VLANs in the database with descriptions, but none of them seemed to be related to any of the interfaces)
I would post before/after, but not sure if NTNU would be happy about me posting images of their port stuff?
Draft PR because I'm not entirely sure if the way I get the VLAN description is correct, or what should be done if there are multiple VLANs that match the query. I've experienced getting 8
swportvlan
results that map the interface ae10 at sikt-trd-dsw2.c.uninett.no to the Vlan 1:<QuerySet [<SwPortVlan: ae10 at sikt-trd-dsw2.c.uninett.no, on vlan 1 (nettel_ztp)>, <SwPortVlan: ae10 at sikt-trd-dsw2.c.uninett.no, on vlan 1 (default)>, <SwPortVlan: ae10 at sikt-trd-dsw2.c.uninett.no, on vlan 1 (default)>, <SwPortVlan: ae10 at sikt-trd-dsw2.c.uninett.no, on vlan 1 (default)>, <SwPortVlan: ae10 at sikt-trd-dsw2.c.uninett.no, on vlan 1 (default)>, <SwPortVlan: ae10 at sikt-trd-dsw2.c.uninett.no, on vlan 1 (default)>, <SwPortVlan: ae10 at sikt-trd-dsw2.c.uninett.no, on vlan 1 (default)>, <SwPortVlan: ae10 at sikt-trd-dsw2.c.uninett.no, on vlan 1 (default)>]>
7 of these are identical, while one has a different ident than the others (
nettel_ztp
as opposed todefault
). When there are 8 differentVlan
objects to choose from, which one should I get the description from?This pull request
Contributor Checklist
Every pull request should have this checklist filled out, no matter how small it is.
More information about contributing to NAV can be found in the
Hacker's guide to NAV.
<major>.<minor>.x
). For a new feature or other additions, it should be based onmaster
.