Skip to content
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
rawlinp merged 9 commits into
apache:masterfrom
srijeet0406:CDN-5330
Jun 2, 2020
Merged

Type for a steering target should match only applicable values#4734
rawlinp merged 9 commits into
apache:masterfrom
srijeet0406:CDN-5330

Conversation

@srijeet0406
Copy link
Copy Markdown
Contributor

What does this PR (Pull Request) do?

Which Traffic Control components are affected by this PR?

  • Documentation
  • Traffic Ops

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>/targets
Make sure that the body of the request has a type of something other than 43, 44, 45 or 46
This POST call should be rejected with a response code of 400 and the error details saying that the type was invalid for the steering target
Now, try the same post, but by changing the request body to have a type that is between 43-46
This 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?

  • master

The following criteria are ALL met by this PR

  • This PR includes tests
  • This PR includes documentation
  • This PR includes an update to CHANGELOG.md
  • This PR includes any and all required license headers
  • This PR does not include a database migration
  • This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY (see the Apache Software Foundation's security guidelines for details)

Additional Information

Comment thread docs/source/api/v3/steering_id_targets.rst Outdated
: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``
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

routing type steering type

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

☝️ this isn't resolved

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry missed that, fixed now.

Comment thread docs/source/api/v3/steering_id_targets.rst Outdated
Comment thread docs/source/api/v3/steering_id_targets_targetID.rst Outdated
Comment thread traffic_ops/traffic_ops_golang/steeringtargets/steeringtargets.go Outdated
Comment thread CHANGELOG.md Outdated
Comment thread traffic_ops/traffic_ops_golang/steeringtargets/steeringtargets.go Outdated
@rawlinp rawlinp added bug something isn't working as intended low impact affects only a small portion of a CDN, and cannot itself break one Traffic Ops related to Traffic Ops labels Jun 1, 2020
Comment thread docs/source/api/v3/steering_id_targets.rst Outdated
Comment thread docs/source/api/v3/steering_id_targets.rst Outdated
Comment thread docs/source/api/v3/steering_id_targets_targetID.rst Outdated
: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``
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

☝️ this isn't resolved

Comment thread traffic_ops/traffic_ops_golang/steeringtargets/steeringtargets.go Outdated
Comment thread traffic_ops/traffic_ops_golang/steeringtargets/steeringtargets.go Outdated
@rawlinp rawlinp merged commit 621f654 into apache:master Jun 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug something isn't working as intended low impact affects only a small portion of a CDN, and cannot itself break one Traffic Ops related to Traffic Ops

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TO: Type validation for steering targets

2 participants