netbox-topology-views
netbox-topology-views copied to clipboard
3.3.0-beta2 can't hide patchpanels from Topology to get end2end connection
Before 3.3.0 it was possible to hide patchpanels and show "end2end connections" this now doesn't work anymore, or i don't know how to :)
^^ and the "show intermediate devices" field type would be awesome to have back.
I'm looking forward to see that feature back.
+1 for a return of "end2end connections"!
It used to be possible to see the logical connections between devices, hiding the noisy details of intervening patch panels.
Now you either see no connection at all, or you see physical cables only. In the following example (from my small home network), lots of cables go through the same patch panel, and this obscures what connects to what :-(
I see that end2end connections was removed in 318b8495b as part of adding Netbox 3.3 support, so I wonder if the Netbox data model now makes it difficult to implement?
I'm looking forward to having this back too. Is anyone working on this?
I've worked out the changes to bring back end to end connections with 3.3.0 and above and done a proof of concept. I'll start a branch and PR for it.
I've also added cables and wireless links to the selection options so that you can pick and choose any combination of types connections you want to include on the topology diagram.
My first working commit is here: https://github.com/tgrusendorf/netbox-topology-views/tree/end-to-end-connections
I've taken a different approach than pycolas, using the same view as you will find under Connections -> Interface Connections in NetBox to generate the connections.
Awesome! I just applied https://github.com/mattieserver/netbox-topology-views/commit/0b8c4caaec1c8a1fdd92010a1fe8d42e444c634f.diff and it looks great.
Only minor issue I can find: if I select both "Hide unconnected" and "Show end-to-end interface connections", I get a completely blank result. "Hide unconnected" with "Show cables" works fine though.
Selecting both "Show cables" and "Show end-to-end interface connections" is a bit weird since links appear twice, but I guess that's what I asked for :-)
How
Awesome! I just applied https://github.com/mattieserver/netbox-topology-views/commit/0b8c4caaec1c8a1fdd92010a1fe8d42e444c634f.diff and it looks great.
Only minor issue I can find: if I select both "Hide unconnected" and "Show end-to-end interface connections", I get a completely blank result. "Hide unconnected" with "Show cables" works fine though.
Selecting both "Show cables" and "Show end-to-end interface connections" is a bit weird since links appear twice, but I guess that's what I asked for :-)
How can I test it? Which file do I need to replace?
This is what I did:
cd /opt/netbox/venv/lib/python3.8/site-packages/netbox_topology_views
wget https://github.com/mattieserver/netbox-topology-views/commit/0b8c4caaec1c8a1fdd92010a1fe8d42e444c634f.diff
patch -p2 <0b8c4caaec1c8a1fdd92010a1fe8d42e444c634f.diff
systemctl restart netbox
Awesome! I just applied https://github.com/mattieserver/netbox-topology-views/commit/0b8c4caaec1c8a1fdd92010a1fe8d42e444c634f.diff and it looks great.
Only minor issue I can find: if I select both "Hide unconnected" and "Show end-to-end interface connections", I get a completely blank result. "Hide unconnected" with "Show cables" works fine though.
Selecting both "Show cables" and "Show end-to-end interface connections" is a bit weird since links appear twice, but I guess that's what I asked for :-)
I see what I missed. I'll fix "Hide unconnected" in the next couple of days.
It worked just fine. Thanks guys. It is very expected feature.
Awesome! I just applied https://github.com/mattieserver/netbox-topology-views/commit/0b8c4caaec1c8a1fdd92010a1fe8d42e444c634f.diff and it looks great. Only minor issue I can find: if I select both "Hide unconnected" and "Show end-to-end interface connections", I get a completely blank result. "Hide unconnected" with "Show cables" works fine though. Selecting both "Show cables" and "Show end-to-end interface connections" is a bit weird since links appear twice, but I guess that's what I asked for :-)
I see what I missed. I'll fix "Hide unconnected" in the next couple of days.
New commit today fixes showing end-to-end connections with 'Hide Unconnected' selected.
LGTM: thanks!
Worked perfectly. Great. However, when I selected only the "show cables" option, the power cables came. Would it be possible to include one more "hide power cables" option to work together with the "show cables"?
Yes, or perhaps "Show data cables" and "Show power cables".
Cables can only go between certain types of port: see COMPATIBLE_TERMINATION_TYPES.
I would be inclined to classify power cables as those which terminate in a powerport, poweroutlet or powerfeed, and data cables as everything else.
While I agree those are good ideas, they are not directly related to this issue. Power cables were already included in the types of cables displayed prior to adding end to end interface connections. Maybe I've already overstepped by allowing cables and wireless links to be excluded, but I needed a way to hide them when viewing interface connections.
You can probably exclude them with the 'ignore_cable_type' configuration setting. I'd suggest opening a separate issue.
Re. ignore_cable_type, see also #177. This is close to what's required; the problem is that's a fixed configuration (so if you set it to power port/outlet/feed, you can never see power cables).
Re. end-to-end interface connections: I think those should be defined as those cable runs which both start and end at an Interface only, so that they match the end-to-end connections as shown in the Netbox GUI itself against a given interface. If a cable run starts at an Interface but ends at a Frontport (say), then it's not an end-to-end connection.
Re. ignore_cable_type: agreed.
Re. end-to-end interface connections: That is exactly what my current code does - only connections where both ends terminate on an interface are shown. Let me know if you're seeing something different. As discussed in #188, I'll probably rename the filter criteria to "Show Logical Connections'.