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

Implement tree traversal methods for Interface objects #260

Closed jathanism closed 7 years ago

jathanism commented 7 years ago

Similarly, yet not as detailed as for Networks, we need the following:

  ancestors       Recursively get all parents of an interface
  assignments     Get interface assignments for an interface
  children        Get immediate children of an interface
  descendants     Recursively get all children of an interface
  parent          Get parent interface of an interface
  root            Get parent of all ancestors of an interface
  siblings        Get interfaces with same parent as an interface

I'm uncertain if there's value of "siblings" but it may be useful to quickly and identify all other member interfaces of a LAG, for example.

nickpegg commented 7 years ago

Fixed by #271, released in v1.1.4. Thanks @rmhasan!