Fix REST API issues
* Fix errors not allowing `PUT` method from the API * Validate `status`, to allow for status changes when using PUT (allow changing a `Route` to `INACTIVE`, re-submitting `Route`s with `ERROR` state & more) * Move decision for whether to `commit_*` a `Route` from `post_save` to `update` since we need to know both the current `status` of the `Route` and the desired (new) to pick which `commit` we want * We need to expose `id`s in all REST API models since those are needed when creating relationships between those models * Register `MatchDscp` model (`Route` uses it) * Add REST API documentation * When creating / editing / deleting a `Route` from the API an asynchronous task is issued which uploads the required configuration on the flowspec device. Since this is asynchronous, the object must have a status of `PENDING` until this operation is completed.
Showing
- README.md 22 additions, 66 deletionsREADME.md
- doc/api.md 381 additions, 0 deletionsdoc/api.md
- doc/index.md 2 additions, 6 deletionsdoc/index.md
- flowspec/models.py 3 additions, 3 deletionsflowspec/models.py
- flowspec/serializers.py 50 additions, 68 deletionsflowspec/serializers.py
- flowspec/validators.py 57 additions, 5 deletionsflowspec/validators.py
- flowspec/viewsets.py 107 additions, 15 deletionsflowspec/viewsets.py
- flowspy/settings.py.dist 2 additions, 1 deletionflowspy/settings.py.dist
- flowspy/urls.py 2 additions, 0 deletionsflowspy/urls.py
- mkdocs.yml 1 addition, 0 deletionsmkdocs.yml
Loading
Please register or sign in to comment