dropbox / nsot

Network Source of Truth is an open source IPAM and network inventory database
https://nsot.readthedocs.io
Other
399 stars 66 forks source link

Better Circuit lookups: by device, etc. #310

Open nickpegg opened 6 years ago

nickpegg commented 6 years ago

We have the ability to look up Circuit object by their endpoints via the Interface primary keys or natural keys (interface name slug), but it would be also useful to be able to look up Circuits directly by device hostname. This is possible via the circuits detail view on Device, but being able to do this directly on Circuit would be nice.

Something else along these lines that would be awesome would be the ability to look up mutual Circuits between two devices. Like, given two device primary/natural keys, return every Circuit object that connects the two.

jathanism commented 6 years ago

The first paragraph could be satisfied pretty easily using existing API filtering by adding nested related fields as filter fields (e.g. endpoint_a__device_hostname or endpoint_z__device_hostname), but man are those long and ugly!

The second paragraph might be more desirable, because we can customize, tune, and optimize the way it's done, but will require more work.