nsot icon indicating copy to clipboard operation
nsot copied to clipboard

Better Circuit lookups: by device, etc.

Open nickpegg opened this issue 8 years ago • 1 comments

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.

nickpegg avatar Jan 12 '18 17:01 nickpegg

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.

jathanism avatar Jan 12 '18 23:01 jathanism