You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2021/03/06 00:26:06 UTC
[GitHub] [trafficcontrol] tyagian opened a new pull request #5611: servers/details endpoint
tyagian opened a new pull request #5611:
URL: https://github.com/apache/trafficcontrol/pull/5611
<!--
************ STOP!! ************
If this Pull Request is intended to fix a security vulnerability, DO NOT submit it! Instead, contact
the Apache Software Foundation Security Team at security@trafficcontrol.apache.org and follow the
guidelines at https://www.apache.org/security/ regarding vulnerability disclosure.
-->
## What does this PR (Pull Request) do?
<!-- Explain the changes you made here. If this fixes an Issue, identify it by
replacing the text in the checkbox item with the Issue number e.g.
- Added servers/details endpoint
Be sure you check the box properly, see the "The following criteria are ALL
met by this PR" section for details.
-->
## Which Traffic Control components are affected by this PR?
Python client
Additionally, if this Pull Request does NOT affect documentation, please
explain why documentation is not required. -->
- CDN in a Box
- Documentation
- Grove
- Traffic Control Client <!-- Please specify which; e.g. 'Python', 'Go', 'Java' --> 'Python'
- Traffic Monitor
- Traffic Ops
- Traffic Ops ORT
- Traffic Portal
- Traffic Router
- Traffic Stats
- Traffic Vault
- CI tests
## What is the best way to verify this PR?
- test against endpoint /api/3.0/servers/details?hostName=<hostName>
## If this is a bug fix, what versions of Traffic Control are affected?
- No
## The following criteria are ALL met by this PR
<!-- Check the boxes to signify that the associated statement is true. To
"check a box", replace the space inside of the square brackets with an 'x'.
e.g.
- [ x] <- Wrong
- [x ] <- Wrong
- [] <- Wrong
- [*] <- Wrong
-->
- [ ] This PR includes tests OR I have explained why tests are unnecessary
- [x ] This PR includes documentation OR I have explained why documentation is unnecessary
- [ ] This PR includes an update to CHANGELOG.md OR such an update is not necessary
- [ ] This PR includes any and all required license headers
- [ ] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY** (see [the Apache Software Foundation's security guidelines](https://www.apache.org/security/) for details)
## Additional Information
<!-- If you would like to include any additional information on the PR for
potential reviewers please put it here.
Some examples of this would be:
- Before and after screenshots/gifs of the Traffic Portal if it is affected
- Links to other dependent Pull Requests
- References to relevant context (e.g. new/updates to dependent libraries,
mailing list records, blueprints)
Feel free to leave this section blank (or, preferably, delete it entirely).
-->
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] ocket8888 commented on pull request #5611: servers/details endpoint
Posted by GitBox <gi...@apache.org>.
ocket8888 commented on pull request #5611:
URL: https://github.com/apache/trafficcontrol/pull/5611#issuecomment-791881112
What does this pull request do?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] ocket8888 commented on a change in pull request #5611: servers/details endpoint
Posted by GitBox <gi...@apache.org>.
ocket8888 commented on a change in pull request #5611:
URL: https://github.com/apache/trafficcontrol/pull/5611#discussion_r593295175
##########
File path: traffic_control/clients/python/trafficops/tosession.py
##########
@@ -1645,6 +1645,15 @@ def get_server_delivery_services(self, server_id=None):
:raises: Union[LoginError, OperationError]
"""
+ @restapi.api_request('get', 'servers/details?hostName={name}', ('3.0','4.0',))
+ def get_server_details(self, name=None):
+ """
+ Get servers/details
+ :ref: `to-api-servers-details-hostName`
Review comment:
This label, `to-api-servers-details-hostName`, doesn't exist in the documentation. Closest is `to-api-servers-details`, which I think is what you want.
Also, there shouldn't be a space between the `ref` role and its argument in grave accents ("backticks").
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] tyagian edited a comment on pull request #5611: servers/details endpoint
Posted by GitBox <gi...@apache.org>.
tyagian edited a comment on pull request #5611:
URL: https://github.com/apache/trafficcontrol/pull/5611#issuecomment-792892147
This will add servers/details endpoint to Python client.
https://traffic-control-cdn.readthedocs.io/en/latest/api/v4/servers_details.html#to-api-servers-details
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] tyagian commented on a change in pull request #5611: servers/details endpoint
Posted by GitBox <gi...@apache.org>.
tyagian commented on a change in pull request #5611:
URL: https://github.com/apache/trafficcontrol/pull/5611#discussion_r593587341
##########
File path: traffic_control/clients/python/trafficops/tosession.py
##########
@@ -1645,6 +1645,15 @@ def get_server_delivery_services(self, server_id=None):
:raises: Union[LoginError, OperationError]
"""
+ @restapi.api_request('get', 'servers/details?hostName={name}', ('3.0','4.0',))
+ def get_server_details(self, name=None):
+ """
+ Get servers/details
+ :ref: `to-api-servers-details-hostName`
Review comment:
My mistake. I mentioned in reference to GET request: https://traffic-control-cdn.readthedocs.io/en/latest/api/v4/servers_details.html#to-api-servers-details
GET /api/4.0/servers/details?hostName but yes, endpoint is servers/details. Updated now.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] ocket8888 merged pull request #5611: servers/details endpoint
Posted by GitBox <gi...@apache.org>.
ocket8888 merged pull request #5611:
URL: https://github.com/apache/trafficcontrol/pull/5611
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] tyagian commented on pull request #5611: servers/details endpoint
Posted by GitBox <gi...@apache.org>.
tyagian commented on pull request #5611:
URL: https://github.com/apache/trafficcontrol/pull/5611#issuecomment-792892147
This will add servers/details to Python client.
https://traffic-control-cdn.readthedocs.io/en/latest/api/v4/servers_details.html#to-api-servers-details
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] zrhoffman commented on a change in pull request #5611: servers/details endpoint
Posted by GitBox <gi...@apache.org>.
zrhoffman commented on a change in pull request #5611:
URL: https://github.com/apache/trafficcontrol/pull/5611#discussion_r589808981
##########
File path: traffic_control/clients/python/trafficops/tosession.py
##########
@@ -1645,6 +1645,16 @@ def get_server_delivery_services(self, server_id=None):
:raises: Union[LoginError, OperationError]
"""
+ @restapi.api_request('get', 'servers/details?hostName={name}', ('3.0','4.0',))
+ def get_server_details(self, name=None):
+ """
+ Retrieve server info in detail /api/4.0/servers/details?hostName=:name
+ :ref: `to-api-servers-details-hostName`
Review comment:
This should be a reStructuredText reference to a a label in the documentation somewhere.
Example:
https://github.com/apache/trafficcontrol/blob/038a439ebedd57ec6a4df1b2e65a390e04d6a00a/traffic_control/clients/python/trafficops/tosession.py#L270-L273
corresponds with
https://github.com/apache/trafficcontrol/blob/038a439ebedd57ec6a4df1b2e65a390e04d6a00a/docs/source/api/v4/asns.rst#L17-L21
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org