This repository was archived by the owner on Nov 24, 2025. It is now read-only.
Type for a steering target should match only applicable values#4734
Merged
Conversation
rawlinp
suggested changes
May 29, 2020
| :targetId: The integral, unique identifier of a :term:`Delivery Service` which shall be a new steering target for the :term:`Delivery Service` identified by the ``ID`` path parameter | ||
| :typeId: The integral, unique identifier of the routing type of the new target :term:`Delivery Service` | ||
| :value: The 'weight' which shall be attributed to the new target :term:`Delivery Service` | ||
| :typeId: The integral, unique identifier of the routing type of the new target :term:`Delivery Service`. This should be corresponding to one of ``STEERING_WEIGHT``, ``STEERING_ORDER``, ``STEERING_GEO_ORDER`` or ``STEERING_GEO_WEIGHT`` |
Contributor
There was a problem hiding this comment.
routing type steering type
Contributor
Author
There was a problem hiding this comment.
Sorry missed that, fixed now.
rawlinp
suggested changes
May 29, 2020
rawlinp
suggested changes
Jun 1, 2020
| :targetId: The integral, unique identifier of a :term:`Delivery Service` which shall be a new steering target for the :term:`Delivery Service` identified by the ``ID`` path parameter | ||
| :typeId: The integral, unique identifier of the routing type of the new target :term:`Delivery Service` | ||
| :value: The 'weight' which shall be attributed to the new target :term:`Delivery Service` | ||
| :typeId: The integral, unique identifier of the routing type of the new target :term:`Delivery Service`. This should be corresponding to one of ``STEERING_WEIGHT``, ``STEERING_ORDER``, ``STEERING_GEO_ORDER`` or ``STEERING_GEO_WEIGHT`` |
rawlinp
suggested changes
Jun 1, 2020
rawlinp
approved these changes
Jun 2, 2020
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR (Pull Request) do?
Which Traffic Control components are affected by this PR?
What is the best way to verify this PR?
Run TO locally and try to adda new steering target for your DS using the call
POST /api/3.0/steering/<DS ID>/targetsMake sure that the body of the request has a type of something other than
43, 44, 45 or 46This
POSTcall should be rejected with a response code of400and the error details saying that the type was invalid for the steering targetNow, try the same post, but by changing the request body to have a type that is between
43-46This time, you should be able to create the steering target successfully.
Run the unit tests and API tests to make sure everything still passes.
If this is a bug fix, what versions of Traffic Control are affected?
The following criteria are ALL met by this PR
Additional Information