-
Notifications
You must be signed in to change notification settings - Fork 190
Added a trace property to the traceable interface classes #280
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
Merged
zachmoody
merged 17 commits into
netbox-community:master
from
raddessi:master.cable-traces
Dec 29, 2020
Merged
Changes from 8 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
af4a35e
Added a trace method to the Interfaces class
raddessi 0ff839f
Redesigned cable trace functionality
raddessi c8cc839
Re-blacked the ocde and fixed an instanciation issue
raddessi 74b6e53
Fixed a test failure
raddessi d020bcc
Updated pytest tests
raddessi c670197
Re-blacked after updating my local black module
raddessi 55cacaf
Updated with changes from last review and added dedicated test
raddessi bb5ef86
Reverted some now-unused additions
raddessi 754633c
Removed more dead code
raddessi cc5210d
Added missing newline
raddessi 0a6e0a8
Fixed a logic issue and removed a debug statement
raddessi 8d69e4a
Fixed logic bug regarding the api url path
raddessi d8acca0
Update str method on Cables
c8b91e3
Remove population of cable str repr
997854f
Fix str repr on Cables method
4a0d8ca
Fix object url-to-class parsing
e6d2b78
Don't look for termination data for cables in trace test
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 hidden or 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 hidden or 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,118 @@ | ||
| [ | ||
| [ | ||
| { | ||
| "id": 39126, | ||
| "url": "http://localhost:8000/api/dcim/interfaces/39126/", | ||
| "device": { | ||
| "id": 4747, | ||
| "url": "http://localhost:8000/api/dcim/devices/4747/", | ||
| "name": "test1-core1", | ||
| "display_name": "test1-core1" | ||
| }, | ||
| "name": "em1", | ||
| "cable": 9911, | ||
| "connection_status": { | ||
| "value": false, | ||
| "label": "Not Connected" | ||
| } | ||
| }, | ||
| { | ||
| "id": 9911, | ||
| "url": "http://localhost:8000/api/dcim/cables/9911/", | ||
| "type": "", | ||
| "status": "planned", | ||
| "label": "", | ||
| "color": "", | ||
| "length": null, | ||
| "length_unit": "" | ||
| }, | ||
| { | ||
| "id": 5583, | ||
| "url": "http://localhost:8000/api/dcim/front-ports/5583/", | ||
| "device": { | ||
| "id": 4430, | ||
| "url": "http://localhost:8000/api/dcim/devices/4430/", | ||
| "name": "test1-patchpanel1", | ||
| "display_name": "test1-patchpanel1" | ||
| }, | ||
| "name": "pair-11 (ports 21-22)", | ||
|
raddessi marked this conversation as resolved.
|
||
| "cable": 9911 | ||
| } | ||
| ], | ||
| [ | ||
| { | ||
| "id": 3736, | ||
| "url": "http://localhost:8000/api/dcim/rear-ports/3736/", | ||
| "device": { | ||
| "id": 4430, | ||
| "url": "http://localhost:8000/api/dcim/devices/4430/", | ||
| "name": "test1-patchpanel1", | ||
| "display_name": "test1-patchpanel1" | ||
| }, | ||
| "name": "port-2", | ||
| "cable": 9229 | ||
| }, | ||
| { | ||
| "id": 9229, | ||
| "url": "http://localhost:8000/api/dcim/cables/9229/", | ||
| "type": "mmf-om4", | ||
| "status": "planned", | ||
| "label": "", | ||
| "color": "", | ||
| "length": null, | ||
| "length_unit": "" | ||
| }, | ||
| { | ||
| "id": 3768, | ||
| "url": "http://localhost:8000/api/dcim/rear-ports/3768/", | ||
| "device": { | ||
| "id": 4436, | ||
| "url": "http://localhost:8000/api/dcim/devices/4436/", | ||
| "name": "test1-patchpanel2", | ||
| "display_name": "test1-patchpanel2" | ||
| }, | ||
| "name": "port-2", | ||
| "cable": 9229 | ||
| } | ||
| ], | ||
| [ | ||
| { | ||
| "id": 5655, | ||
| "url": "http://localhost:8000/api/dcim/front-ports/5655/", | ||
| "device": { | ||
| "id": 4436, | ||
| "url": "http://localhost:8000/api/dcim/devices/4436/", | ||
| "name": "test1-patchpanel2", | ||
| "display_name": "test1-patchpanel2" | ||
| }, | ||
| "name": "pair-11 (ports 21-22)", | ||
| "cable": 9240 | ||
| }, | ||
| { | ||
| "id": 9240, | ||
| "url": "http://localhost:8000/api/dcim/cables/9240/", | ||
| "type": "mmf-om4", | ||
| "status": "planned", | ||
| "label": "", | ||
| "color": "", | ||
| "length": null, | ||
| "length_unit": "" | ||
| }, | ||
| { | ||
| "id": 35473, | ||
| "url": "http://localhost:8000/api/dcim/interfaces/35473/", | ||
| "device": { | ||
| "id": 3930, | ||
| "url": "http://localhost:8000/api/dcim/devices/3930/", | ||
| "name": "test1-core2", | ||
| "display_name": "test1-core2" | ||
| }, | ||
| "name": "Ethernet11", | ||
| "cable": 9240, | ||
| "connection_status": { | ||
| "value": false, | ||
| "label": "Not Connected" | ||
| } | ||
| } | ||
| ] | ||
| ] | ||
This file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.