-
Notifications
You must be signed in to change notification settings - Fork 351
Add TO Go cdns/capacity #2306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add TO Go cdns/capacity #2306
Conversation
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
bb60e95
to
62e129c
Compare
Rebased, manually tested, should be good to merge. |
Refer to this link for build results (access rights to CI server needed): |
Is there any sort of API test that can be added? Maybe one to check the response structure or something? |
@mitchell852 Not until the "API test" framework supports Monitors. |
This endpoint has already been rewritten to go, so I think this PR should be closed. |
This hasn't been rewritten in Go, except for this PR. It's still proxying to Perl https://github.com/apache/trafficcontrol/blob/master/traffic_ops/traffic_ops_golang/routing/routes.go#L123 |
Oh, lol, my bad. I forget that some of those routes exist for explicit routing to the proxy. If you wanna rebase for conflicts, I'd be happy to review this. |
62e129c
to
85d6722
Compare
Refer to this link for build results (access rights to CI server needed): |
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.
found a bug?
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.
a few comments. also, not sure if this is a big deal or not but if all the TMs are OFFLINE, this endpoint will throw an internal server error. Seems like it should probably just return all zeros instead.
scratch that: if at least one TM in each CDN is not ONLINE and reachable, you get an ISE.
85d6722
to
17a9c59
Compare
17a9c59
to
8a8c160
Compare
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.
tested GET /api/1.1/cdns/capacity:
- with at least 1 TM set to ONLINE (capacity returned)
- with no TM's set to ONLINE (internal server error returned)
PR comments were also addressed.
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
What does this PR do?
Add TO Go cdns/capacity. Closes #3780
Which TC components are affected by this PR?
What is the best way to verify this PR?
GET /api/1.2/cdns/capacity
Check all that apply