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

Enhance set queries to support concrete fields issue 222 #334

Closed narJH27 closed 6 years ago

narJH27 commented 6 years ago

Summary of changes:

  1. Added constraint on attr name, where it can no longer be the same as a concrete field on the resource that it's being created on
$ nsot attributes add -r Device -n hostname
[FAILURE] name: Attribute name u'hostname' cannot be the same as a concrete field on 'Device'
  1. Added support for concrete fields within a set query
$ nsot networks list -q 'type=interconnect metro=foo ip_version=4'
10.207.6.0/23
10.207.8.0/28
$ nsot networks list -q 'type=interconnect metro=foo prefix_length=23'
10.207.6.0/23
$ nsot networks list -q 'type=interconnect metro=bar ip_version=6'
2001:5:4::/64