Netbox: Cable's total length

Created on 21 Aug 2019  路  2Comments  路  Source: netbox-community/netbox

Environment

  • Python version: 3.6
  • NetBox version: 2.6.1

Proposed Functionality

Show add up to all links lenght since first near end until last far end

Use Case

In most cases, a cable routing has many segments. It's neccesary show the complete lenght cable routing. It isn't necessary to store this value in the database but it's necessary to convert all of them in the same measurement unit.

Database Changes

It's not necessary

Example

imagen

accepted feature

Most helpful comment

Hi!
That's an example to show how useful could be my proposal. This simulates a connection between two switches.

imagen

All 2 comments

Hi!
That's an example to show how useful could be my proposal. This simulates a connection between two switches.

imagen

I am currently thinking about how best to work here.
I would suggest to add the length within the view https://github.com/netbox-community/netbox/blob/770f4c962cf4bfb5d44bf7cc6ac5f1e080e0cd7f/netbox/dcim/api/views.py#L67 and later in the template
https://github.com/netbox-community/netbox/blob/develop/netbox/templates/dcim/cable_trace.html
to reproduce.

Since each segment is output as a three-tuple of (termination, cable, termination), the cable also contains the respective length (cable.length).

Was this page helpful?
0 / 5 - 0 ratings