-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implement natural keys as primary keys for related fields (#292) Closes #262 API - 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`
- Loading branch information
Showing
14 changed files
with
475 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.