ocket8888 opened a new pull request #5071:
URL: https://github.com/apache/trafficcontrol/pull/5071


   ## What does this PR (Pull Request) do?
   
   - [x] This PR is not related to any Issue
   
   This PR overhauls how DSRs work (in APIv3). Instead of a single 
`deliveryservice` property, DSRs will now have `requested` and `original`.
   
   `requested` is the Delivery Service as it is requested to exist. For 
`delete`-type DSRs, this property will not exist in responses and will be 
ignored in requests. In most senses, it's pretty analogous to the old 
`deliveryservice` property.
   
   `original` is the Delivery Service as it exists/existed before the DSR 
is/was/would have been applied. This property does not exist on `create`-type 
DSRs.  For non-`create` DSRs that are "open", this is either given in the 
request (for `delete` DSRs) or generated by Traffic Ops for responses from the 
current DS that matches the DSR's `original`'s XMLID (for `update` DSRs). When 
a DSR is "closed", the original is saved from the current DS so that even if 
that DS changes in the future, the actual change enacted by the now-closed DSR 
is preserved.
   
   Also, a couple more changes: Assignee ID, Author ID, and Last Edited By ID 
are no longer present on objects returned by the API, the 
`deliveryservice_requests/{{ID}}/assign` endpoint now allows assigning by 
username as well as by ID (ID takes precedence when both are provided), and 
both the `deliveryservice_requests/{{ID}}/assign` and 
`deliveryservice_requests/{{ID}}/status` now have simple GET handlers that just 
return the assignee's username (or `null` if there isn't one) and the DSR's 
status, respectively, to be compliant with the API guidelines.
   
   For a (hopefully) complete explanation of the new model and interface, refer 
to the PR's docs changes.
   
   Finally, this makes TP use the stable API 2.0 endpoints for DSR-related 
operations, to avoid shoving TP work into this PR.
   
   ## Which Traffic Control components are affected by this PR?
   - Documentation
   - Traffic Ops Client (Go)
   - Traffic Ops
   - Traffic Portal
   
   ## What is the best way to verify this PR?
   Run the associated unit and client/api integration tests. Build and read the 
docs. Run TP end-to-end tests and verify that the interface works as it used to.
   
   ## The following criteria are ALL met by this PR
   - [x] This PR includes tests
   - [x] This PR includes documentation
   - [x] This PR includes an update to CHANGELOG.md
   - [x] This PR includes any and all required license headers
   - [x] This PR ensures that database migration sequence is correct
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY**


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to