Natural keys can now be used any place a primary key could be used for
related fields on Interfaces and Circuits.
For Circuits, the default is now to display the A/Z endpoint interfaces by
their natural key (e.g. device_hostname:name format).
For Interfaces, the Device hostname may now be used to create or retrieve
interfaces (no more need to lookup the Device ID first)
Bugfix in NsotSerializer when view isn't part of the context that caused a
crash.
Interface now has a name_slug field that can be used for natural
key lookups. This is now also officially the natural key field.
Network now has a cidr field that can be used for displaying
the network_address/prefix_length without additional effort
Network now has a parent field that can be used for displaying
the parent CIDR without an additional lookup
All underlying serializer code has been streamlined to reduce code
duplication where possible.
All "update" serializers have been moved to subclasses of "partial
update" serializers with extra required fields specified as "extra
kwargs" vs. re-defining the fields.
The fields for site_id and attributes have been moved to the base
ResourceSerializer since ALL resources inherit these anyways.
Util
Util stats functions can now be directly imported from nsot.util
Closes #262
API
device_hostname:name
format).NsotSerializer
whenview
isn't part of the context that caused a crash.name_slug
field that can be used for natural key lookups. This is now also officially the natural key field.cidr
field that can be used for displaying thenetwork_address/prefix_length
without additional effortparent
field that can be used for displaying the parent CIDR without an additional lookupsite_id
andattributes
have been moved to the baseResourceSerializer
since ALL resources inherit these anyways.Util
nsot.util