-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement tree traversal methods for Interface objects #260
Labels
Comments
nickpegg
pushed a commit
that referenced
this issue
May 30, 2017
* Fix for #260 Implemented all tree traversal methods like ancestors, parent, root, children, descendents etc. * added tests for interface tree traversal methods * Added changes requested on 05/11/2017 - used self.retrieve to return parent and root of interfaces - changed filter query on siblings to look for interfaces with same parent and device * Added tests to check the following - If someone calls the root view on an Interface object and its parent is None, then it should be returned as the root - Also added tests to check that if sibling is called on an Interface object, then Interface objects with same parent and device are returned * Added validation check and tests for following -Added validation check to prevent users from adding interfaces with different device than its parent or add a parent to an existing interface that has a different device than itself -Also added test to check that when a user calls siblings view on an interface object, then only interfaces with same parent and device are returned * Changes include following - Updated docstrings for parent and added docstrings for other view functions - Changing ValidationError message for setting siblings to use a double quoted string - Also returning a queryset from get_siblings instead of a list * Changes include following - Update the docstring of some Interface model functions - Return queryset from get_descendants and get_ancestors in Interface model
nickpegg
pushed a commit
to dropbox/pynsot
that referenced
this issue
May 31, 2017
* Fix for dropbox/nsot#260 Added all subcommands to query new endpoints in Interface view * Modified the docstrings in cmd_interfaces.py for the new tree traversal subcommands
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Similarly, yet not as detailed as for Networks, we need the following:
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.
The text was updated successfully, but these errors were encountered: