Skip to content
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 caches/stats endpoint #2278

Merged
merged 2 commits into from
Feb 5, 2019
Merged

Conversation

rob05c
Copy link
Member

@rob05c rob05c commented May 15, 2018

This endpoint queries the Traffic Monitor; the "API Test" framework doesn't currently support endpoints that hit the Monitor.

@asfgit
Copy link
Contributor

asfgit commented May 16, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/incubator-trafficcontrol-PR/1580/
Test PASSed.

@asfgit
Copy link
Contributor

asfgit commented May 18, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/incubator-trafficcontrol-PR/1613/
Test PASSed.

@asfgit
Copy link
Contributor

asfgit commented May 22, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/incubator-trafficcontrol-PR/1638/
Test PASSed.

@asfgit
Copy link
Contributor

asfgit commented Jun 25, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/1906/
Test PASSed.

@asfgit
Copy link
Contributor

asfgit commented Jul 9, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/2038/
Test PASSed.

@rob05c rob05c force-pushed the to-go-caches-stats branch 2 times, most recently from b840ce8 to 864a1d1 Compare August 6, 2018 16:51
@asfgit
Copy link
Contributor

asfgit commented Aug 6, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/2190/
Test PASSed.

@rob05c rob05c force-pushed the to-go-caches-stats branch 2 times, most recently from 067edcc to 22df4a4 Compare January 22, 2019 23:37
@asfgit
Copy link
Contributor

asfgit commented Jan 22, 2019

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/3085/
Test PASSed.

@asfgit
Copy link
Contributor

asfgit commented Jan 23, 2019

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/3086/
Test PASSed.

Previously, the endpoint returned an error if the first monitor it
tried failed. This changes it to retry all online monitors.
@asfgit
Copy link
Contributor

asfgit commented Jan 30, 2019

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/3138/
Test PASSed.

@mitchell852 mitchell852 added the Traffic Ops related to Traffic Ops label Feb 5, 2019
@mitchell852
Copy link
Member

@ocket8888 is going to review this PR

@@ -103,6 +104,8 @@ func Routes(d ServerData) ([]Route, []RawRoute, http.Handler, error) {
{1.1, http.MethodPost, `asns/?$`, api.CreateHandler(asn.GetTypeSingleton()), auth.PrivLevelOperations, Authenticated, nil},
{1.1, http.MethodDelete, `asns/{id}$`, api.DeleteHandler(asn.GetTypeSingleton()), auth.PrivLevelOperations, Authenticated, nil},

{1.1, http.MethodGet, `caches/stats/?(\.json)?$`, cachesstats.Get, auth.PrivLevelReadOnly, Authenticated, nil},
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this is unique to this endpoint, but this will allow me to GET /api/1.x/caches/stats/.json. I checked and it seems that the Perl allows this, so maybe for that reason alone we don't want to change it, but it's weird.

Copy link
Contributor

@ocket8888 ocket8888 left a comment

Choose a reason for hiding this comment

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

Works exactly like the Perl endpoint from what I can see.

@mitchell852 mitchell852 merged commit 6eac9c6 into apache:master Feb 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature A new feature, capability or behavior Traffic Ops related to Traffic Ops
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants