This repository was archived by the owner on Nov 24, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 351
Fixed API v4 /servers result for query param {profileName}
#6847
Merged
ocket8888
merged 8 commits into
apache:master
from
rimashah25:bugfix/fix_server_v4_queryparam_profile
May 21, 2022
Merged
Fixed API v4 /servers result for query param {profileName}
#6847
ocket8888
merged 8 commits into
apache:master
from
rimashah25:bugfix/fix_server_v4_queryparam_profile
May 21, 2022
Conversation
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
/servers result for query param {profileName}
ericholguin
reviewed
May 20, 2022
ericholguin
suggested changes
May 20, 2022
ericholguin
approved these changes
May 20, 2022
Contributor
ericholguin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good and was able to query for profiles using profileId in v3 and profileNames in v4, accounting for multiple profiles.
zrhoffman
pushed a commit
to zrhoffman/trafficcontrol
that referenced
this pull request
Oct 2, 2022
…6847) * Added profileName as query param for APIv4 * Updated select query for APIv4 and APIv3 * Shuffled variable * Added changelog * Updated test * Updated based on review comments * Updated select queries
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
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.
Closes: #6834
Which Traffic Control components are affected by this PR?
What is the best way to verify this PR?
Create two servers, one via APIv4 (and assign multiple profiles, eg:
GLOBAL, TRAFFIC_OPS) and one via APIv3(eg:TRAFFIC_OPS)curl
https://localhost:8443/api/4.0/servers?profileName=<profile_name>curl
https://localhost:8443/api/3.0/servers?profileId=<profile_id>In 4.0, if queried for
profileName=TRAFFIC_OPS, one should see 2 results.In 3.0, if queried for
profileId=3, one should see only one result (sinceTRAFFIC_OPSis at index 0 only in one server).If this is a bugfix, which Traffic Control versions contained the bug?
6.1.0
PR submission checklist