dropbox / pynsot

A Python client and CLI utility for the Network Source of Truth (NSoT) REST API.
https://pynsot.readthedocs.io
Other
46 stars 25 forks source link

List supernets via CIDR #47

Closed coxley closed 9 years ago

coxley commented 9 years ago

Would it fit into the flow of things to be able to list out a prefixes children via the cidr instead of only the ID? My thought being that you'd most likely have to do nsot networks list -c 10.1.0.0/16 to find the ID anyway to then rerun with -i 4 subnets or something.

If so, I'd be more than happy to submit a PR for maybe autolooking up the ID via the prefix for the user in the background.

gmjosack commented 9 years ago

:+1:

In general I feel like requiring users to use id's feels like a frustrating user experience. When we have unique columns we should allow using that as well (Device -> hostname, Network -> cidr, etc)

jathanism commented 9 years ago

I also agree. We already have a way to lookup objects by unique identifier in list view e.g. nsot devices list -H foo-bar1). This shouldn't too be hard!

coxley commented 9 years ago

You're on a roll!!