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 2020/03/17 16:53:03 UTC
[GitHub] [trafficcontrol] mhoppa opened a new pull request #4505: Deprecate
GET servers id
mhoppa opened a new pull request #4505: Deprecate GET servers id
URL: https://github.com/apache/trafficcontrol/pull/4505
<!--
************ 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.
- [x] This PR fixes #9001 OR is not related to any Issue
^ This will automatically close Issue number 9001 when the Pull Request is
merged (The '#' is important).
Be sure you check the box properly, see the "The following criteria are ALL
met by this PR" section for details.
-->
- [x] This PR is not related to any Issue <!-- You can check for an issue here: https://github.com/apache/trafficcontrol/issues -->
## Which Traffic Control components are affected by this PR?
<!-- Please delete all components from this list that are NOT affected by this
Pull Request. Also, feel free to add the name of a tool or script that is
affected but not on the list.
Additionally, if this Pull Request does NOT affect documentation, please
explain why documentation is not required. -->
- Documentation
- Traffic Ops
## What is the best way to verify this PR?
<!-- Please include here ALL the steps necessary to test your Pull Request. If
it includes tests (and most should), outline here the steps needed to run the
tests. If not, lay out the manual testing procedure and please explain why
tests are unnecessary for this Pull Request. -->
Run traffic ops and make sure you can not hit the endpoint in API 2.0 and when performing a GET on it in 1.x you receive a deprecation message back in the returned alerts.
## If this is a bug fix, what versions of Traffic Control are affected?
<!-- If this PR fixes a bug, please list here all of the affected versions - to
the best of your knowledge. It's also pretty helpful to include a commit hash
of where 'master' is at the time this PR is opened (if it affects master),
because what 'master' means will change over time. For example, if this PR
fixes a bug that's present in master (at commit hash '2697ebac'), in v3.0.0,
and in the current 3.0.1 Release candidate (e.g. RC1), then this list would
look like:
- master (2697ebac)
- 3.0.0
- 3.0.1 (RC1)
If you don't know what other versions might have this bug, AND don't know how
to find the commit hash of 'master', then feel free to leave this section
blank (or, preferably, delete it entirely).
-->
## 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
- [x] <- Correct!
-->
- [x] 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
- [x] This PR includes an update to CHANGELOG.md OR such an update is not necessary
- [x] This PR includes any and all required license headers
- [x] This PR ensures that database migration sequence is correct OR this PR does not include a database migration
- [x] 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
With regards,
Apache Git Services
[GitHub] [trafficcontrol] ocket8888 merged pull request #4505: Deprecate GET
servers id
Posted by GitBox <gi...@apache.org>.
ocket8888 merged pull request #4505: Deprecate GET servers id
URL: https://github.com/apache/trafficcontrol/pull/4505
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [trafficcontrol] shamrickus commented on a change in pull request
#4505: Deprecate GET servers id
Posted by GitBox <gi...@apache.org>.
shamrickus commented on a change in pull request #4505: Deprecate GET servers id
URL: https://github.com/apache/trafficcontrol/pull/4505#discussion_r394616711
##########
File path: docs/source/api/v2/servers_id.rst
##########
@@ -19,179 +19,6 @@
``servers/{{ID}}``
******************
-``GET``
-=======
-Retrieves properties of a specific server.
-
-:Auth. Required: Yes
-:Roles Required: None
-:Response Type: Array
-
-Request Structure
------------------
-.. table:: Request Path Parameters
-
- +------+---------------------------------------------+
- | Name | Description |
- +======+=============================================+
- | ID | The integral, unique identifier of a server |
- +------+---------------------------------------------+
-
-.. table:: Request Query Parameters
-
- +-----------+----------+---------------------------------------------------------------------------------------------------------------+
- | Name | Required | Description |
- +===========+==========+===============================================================================================================+
- | orderby | no | Choose the ordering of the results - must be the name of one of the fields of the objects in the ``response`` |
- | | | array |
- +-----------+----------+---------------------------------------------------------------------------------------------------------------+
- | sortOrder | no | Changes the order of sorting. Either ascending (default or "asc") or descending ("desc") |
- +-----------+----------+---------------------------------------------------------------------------------------------------------------+
- | limit | no | Choose the maximum number of results to return |
- +-----------+----------+---------------------------------------------------------------------------------------------------------------+
- | offset | no | The number of results to skip before beginning to return results. Must use in conjunction with limit |
- +-----------+----------+---------------------------------------------------------------------------------------------------------------+
- | page | no | Return the n\ :sup:`th` page of results, where "n" is the value of this parameter, pages are ``limit`` long |
- | | | and the first page is 1. If ``offset`` was defined, this query parameter has no effect. ``limit`` must be |
- | | | defined to make use of ``page``. |
- +-----------+----------+---------------------------------------------------------------------------------------------------------------+
-
-.. code-block:: http
- :caption: Request Example
-
- GET /api/2.0/servers?id=10 HTTP/1.1
- Host: trafficops.infra.ciab.test
- User-Agent: curl/7.47.0
- Accept: */*
- Cookie: mojolicious=...
-
-Response Structure
-------------------
-:cachegroup: A string that is the :ref:`name of the Cache Group <cache-group-name>` to which the server belongs
-:cachegroupId: An integer that is the :ref:`ID of the Cache Group <cache-group-id>` to which the server belongs
-:cdnId: The integral, unique identifier of the CDN to which the server belongs
-:cdnName: Name of the CDN to which the server belongs
-:domainName: The domain part of the server's Fully Qualified Domain Name (FQDN)
-:guid: An identifier used to uniquely identify the server
-
- .. note:: This is a legacy key which only still exists for compatibility reasons - it should always be ``null``
-
-:hostName: The (short) hostname of the server
-:httpsPort: The port on which the server listens for incoming HTTPS connections/requests
-:id: An integral, unique identifier for this server
-:iloIpAddress: The IPv4 address of the server's Integrated Lights-Out (ILO) service\ [1]_
-:iloIpGateway: The IPv4 gateway address of the server's ILO service\ [1]_
-:iloIpNetmask: The IPv4 subnet mask of the server's ILO service\ [1]_
-:iloPassword: The password of the of the server's ILO service user\ [1]_ - displays as simply ``******`` if the currently logged-in user does not have the 'admin' or 'operations' role(s)
-:iloUsername: The user name for the server's ILO service\ [1]_
-:interfaceMtu: The Maximum Transmission Unit (MTU) to configured on ``interfaceName``
-:interfaceName: The name of the primary network interface used by the server
-:ip6Address: The IPv6 address and subnet mask of ``interfaceName``
-:ip6IsService: A boolean value which if ``true`` indicates that the IPv6 address will be used for routing content.
-:ip6Gateway: The IPv6 address of the gateway used by ``interfaceName``
-:ipAddress: The IPv4 address of ``interfaceName``
-:ipIsService: A boolean value which if ``true`` indicates that the IPv4 address will be used for routing content.
-:ipGateway: The IPv4 address of the gateway used by ``interfaceName``
-:ipNetmask: The IPv4 subnet mask used by ``interfaceName``
-:lastUpdated: The date and time at which this server description was last modified
-:mgmtIpAddress: The IPv4 address of some network interface on the server used for 'management'
-:mgmtIpGateway: The IPv4 address of a gateway used by some network interface on the server used for 'management'
-:mgmtIpNetmask: The IPv4 subnet mask used by some network interface on the server used for 'management'
-:offlineReason: A user-entered reason why the server is in ADMIN_DOWN or OFFLINE status
-:physLocation: The name of the physical location where the server resides
-:physLocationId: An integral, unique identifier for the physical location where the server resides
-:profile: The :ref:`profile-name` of the :term:`Profile` used by this server
-:profileDesc: A :ref:`profile-description` of the :term:`Profile` used by this server
-:profileId: The :ref:`profile-id` the :term:`Profile` used by this server
-:revalPending: A boolean value which, if ``true`` indicates that this server has pending content invalidation/revalidation
-:rack: A string indicating "server rack" location
-:routerHostName: The human-readable name of the router responsible for reaching this server
-:routerPortName: The human-readable name of the port used by the router responsible for reaching this server
-:status: The status of the server
-
- .. seealso:: :ref:`health-proto`
-
-:statusId: The integral, unique identifier of the status of this server
-
- .. seealso:: :ref:`health-proto`
-
-:tcpPort: The port on which this server listens for incoming TCP connections
-
- .. note:: This is typically thought of as synonymous with "HTTP port", as the port specified by ``httpsPort`` may also be used for incoming TCP connections.
-
-:type: The name of the 'type' of this server
-:typeId: The integral, unique identifier of the 'type' of this server
-:updPending: A boolean value which, if ``true``, indicates that the server has updates of some kind pending, typically to be acted upon by Traffic Ops ORT
-:xmppId: An identifier to be used in XMPP communications with the server - in nearly all cases this will be the same as ``hostName``
-:xmppPasswd: The password used in XMPP communications with the server
-
-.. code-block:: http
- :caption: Response Example
-
- HTTP/1.1 200 OK
- Access-Control-Allow-Credentials: true
- Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Set-Cookie, Cookie
- Access-Control-Allow-Methods: POST,GET,OPTIONS,PUT,DELETE
- Access-Control-Allow-Origin: *
- Content-Type: application/json
- Set-Cookie: mojolicious=...; Path=/; Expires=Mon, 18 Nov 2019 17:40:54 GMT; Max-Age=3600; HttpOnly
- Whole-Content-Sha512: WyapQctUIhjzEALka5QbBiZRZ58Mlc6MJSwjBeGyJS2UzbL3W6lN/4kvAZtPrP4qMWQBWz6JjbF7Y5lNRASUmQ==
- X-Server-Name: traffic_ops_golang/
- Date: Mon, 10 Dec 2018 16:40:01 GMT
- Content-Length: 939
-
- { "response": [
- {
- "cachegroup": "CDN_in_a_Box_Mid",
- "cachegroupId": 6,
- "cdnId": 2,
- "cdnName": "CDN-in-a-Box",
- "domainName": "infra.ciab.test",
- "guid": null,
- "hostName": "mid",
- "httpsPort": 443,
- "id": 10,
- "iloIpAddress": "",
- "iloIpGateway": "",
- "iloIpNetmask": "",
- "iloPassword": "",
- "iloUsername": "",
- "interfaceMtu": 1500,
- "interfaceName": "eth0",
- "ip6Address": "fc01:9400:1000:8::120",
- "ip6Gateway": "fc01:9400:1000:8::1",
- "ipAddress": "172.16.239.120",
- "ipGateway": "172.16.239.1",
- "ipNetmask": "255.255.255.0",
- "lastUpdated": "2018-12-05 18:45:05+00",
- "mgmtIpAddress": "",
- "mgmtIpGateway": "",
- "mgmtIpNetmask": "",
- "offlineReason": "",
- "physLocation": "Apachecon North America 2018",
- "physLocationId": 1,
- "profile": "ATS_MID_TIER_CACHE",
- "profileDesc": "Mid Cache - Apache Traffic Server",
- "profileId": 10,
- "rack": "",
- "revalPending": false,
- "routerHostName": "",
- "routerPortName": "",
- "status": "REPORTED",
- "statusId": 3,
- "tcpPort": 80,
- "type": "MID",
- "typeId": 12,
- "updPending": false,
- "xmppId": "mid",
- "xmppPasswd": "",
- "ipIsService": true,
- "ip6IsService": true
- }
- ]}
-
-.. [1] For more information see the `Wikipedia page on Lights-Out management <https://en.wikipedia.org/wiki/Out-of-band_management>`_\ .
Review comment:
Referenced below, causes doc warnings
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [trafficcontrol] mhoppa commented on a change in pull request
#4505: Deprecate GET servers id
Posted by GitBox <gi...@apache.org>.
mhoppa commented on a change in pull request #4505: Deprecate GET servers id
URL: https://github.com/apache/trafficcontrol/pull/4505#discussion_r394618147
##########
File path: docs/source/api/v2/servers_id.rst
##########
@@ -19,179 +19,6 @@
``servers/{{ID}}``
******************
-``GET``
-=======
-Retrieves properties of a specific server.
-
-:Auth. Required: Yes
-:Roles Required: None
-:Response Type: Array
-
-Request Structure
------------------
-.. table:: Request Path Parameters
-
- +------+---------------------------------------------+
- | Name | Description |
- +======+=============================================+
- | ID | The integral, unique identifier of a server |
- +------+---------------------------------------------+
-
-.. table:: Request Query Parameters
-
- +-----------+----------+---------------------------------------------------------------------------------------------------------------+
- | Name | Required | Description |
- +===========+==========+===============================================================================================================+
- | orderby | no | Choose the ordering of the results - must be the name of one of the fields of the objects in the ``response`` |
- | | | array |
- +-----------+----------+---------------------------------------------------------------------------------------------------------------+
- | sortOrder | no | Changes the order of sorting. Either ascending (default or "asc") or descending ("desc") |
- +-----------+----------+---------------------------------------------------------------------------------------------------------------+
- | limit | no | Choose the maximum number of results to return |
- +-----------+----------+---------------------------------------------------------------------------------------------------------------+
- | offset | no | The number of results to skip before beginning to return results. Must use in conjunction with limit |
- +-----------+----------+---------------------------------------------------------------------------------------------------------------+
- | page | no | Return the n\ :sup:`th` page of results, where "n" is the value of this parameter, pages are ``limit`` long |
- | | | and the first page is 1. If ``offset`` was defined, this query parameter has no effect. ``limit`` must be |
- | | | defined to make use of ``page``. |
- +-----------+----------+---------------------------------------------------------------------------------------------------------------+
-
-.. code-block:: http
- :caption: Request Example
-
- GET /api/2.0/servers?id=10 HTTP/1.1
- Host: trafficops.infra.ciab.test
- User-Agent: curl/7.47.0
- Accept: */*
- Cookie: mojolicious=...
-
-Response Structure
-------------------
-:cachegroup: A string that is the :ref:`name of the Cache Group <cache-group-name>` to which the server belongs
-:cachegroupId: An integer that is the :ref:`ID of the Cache Group <cache-group-id>` to which the server belongs
-:cdnId: The integral, unique identifier of the CDN to which the server belongs
-:cdnName: Name of the CDN to which the server belongs
-:domainName: The domain part of the server's Fully Qualified Domain Name (FQDN)
-:guid: An identifier used to uniquely identify the server
-
- .. note:: This is a legacy key which only still exists for compatibility reasons - it should always be ``null``
-
-:hostName: The (short) hostname of the server
-:httpsPort: The port on which the server listens for incoming HTTPS connections/requests
-:id: An integral, unique identifier for this server
-:iloIpAddress: The IPv4 address of the server's Integrated Lights-Out (ILO) service\ [1]_
-:iloIpGateway: The IPv4 gateway address of the server's ILO service\ [1]_
-:iloIpNetmask: The IPv4 subnet mask of the server's ILO service\ [1]_
-:iloPassword: The password of the of the server's ILO service user\ [1]_ - displays as simply ``******`` if the currently logged-in user does not have the 'admin' or 'operations' role(s)
-:iloUsername: The user name for the server's ILO service\ [1]_
-:interfaceMtu: The Maximum Transmission Unit (MTU) to configured on ``interfaceName``
-:interfaceName: The name of the primary network interface used by the server
-:ip6Address: The IPv6 address and subnet mask of ``interfaceName``
-:ip6IsService: A boolean value which if ``true`` indicates that the IPv6 address will be used for routing content.
-:ip6Gateway: The IPv6 address of the gateway used by ``interfaceName``
-:ipAddress: The IPv4 address of ``interfaceName``
-:ipIsService: A boolean value which if ``true`` indicates that the IPv4 address will be used for routing content.
-:ipGateway: The IPv4 address of the gateway used by ``interfaceName``
-:ipNetmask: The IPv4 subnet mask used by ``interfaceName``
-:lastUpdated: The date and time at which this server description was last modified
-:mgmtIpAddress: The IPv4 address of some network interface on the server used for 'management'
-:mgmtIpGateway: The IPv4 address of a gateway used by some network interface on the server used for 'management'
-:mgmtIpNetmask: The IPv4 subnet mask used by some network interface on the server used for 'management'
-:offlineReason: A user-entered reason why the server is in ADMIN_DOWN or OFFLINE status
-:physLocation: The name of the physical location where the server resides
-:physLocationId: An integral, unique identifier for the physical location where the server resides
-:profile: The :ref:`profile-name` of the :term:`Profile` used by this server
-:profileDesc: A :ref:`profile-description` of the :term:`Profile` used by this server
-:profileId: The :ref:`profile-id` the :term:`Profile` used by this server
-:revalPending: A boolean value which, if ``true`` indicates that this server has pending content invalidation/revalidation
-:rack: A string indicating "server rack" location
-:routerHostName: The human-readable name of the router responsible for reaching this server
-:routerPortName: The human-readable name of the port used by the router responsible for reaching this server
-:status: The status of the server
-
- .. seealso:: :ref:`health-proto`
-
-:statusId: The integral, unique identifier of the status of this server
-
- .. seealso:: :ref:`health-proto`
-
-:tcpPort: The port on which this server listens for incoming TCP connections
-
- .. note:: This is typically thought of as synonymous with "HTTP port", as the port specified by ``httpsPort`` may also be used for incoming TCP connections.
-
-:type: The name of the 'type' of this server
-:typeId: The integral, unique identifier of the 'type' of this server
-:updPending: A boolean value which, if ``true``, indicates that the server has updates of some kind pending, typically to be acted upon by Traffic Ops ORT
-:xmppId: An identifier to be used in XMPP communications with the server - in nearly all cases this will be the same as ``hostName``
-:xmppPasswd: The password used in XMPP communications with the server
-
-.. code-block:: http
- :caption: Response Example
-
- HTTP/1.1 200 OK
- Access-Control-Allow-Credentials: true
- Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Set-Cookie, Cookie
- Access-Control-Allow-Methods: POST,GET,OPTIONS,PUT,DELETE
- Access-Control-Allow-Origin: *
- Content-Type: application/json
- Set-Cookie: mojolicious=...; Path=/; Expires=Mon, 18 Nov 2019 17:40:54 GMT; Max-Age=3600; HttpOnly
- Whole-Content-Sha512: WyapQctUIhjzEALka5QbBiZRZ58Mlc6MJSwjBeGyJS2UzbL3W6lN/4kvAZtPrP4qMWQBWz6JjbF7Y5lNRASUmQ==
- X-Server-Name: traffic_ops_golang/
- Date: Mon, 10 Dec 2018 16:40:01 GMT
- Content-Length: 939
-
- { "response": [
- {
- "cachegroup": "CDN_in_a_Box_Mid",
- "cachegroupId": 6,
- "cdnId": 2,
- "cdnName": "CDN-in-a-Box",
- "domainName": "infra.ciab.test",
- "guid": null,
- "hostName": "mid",
- "httpsPort": 443,
- "id": 10,
- "iloIpAddress": "",
- "iloIpGateway": "",
- "iloIpNetmask": "",
- "iloPassword": "",
- "iloUsername": "",
- "interfaceMtu": 1500,
- "interfaceName": "eth0",
- "ip6Address": "fc01:9400:1000:8::120",
- "ip6Gateway": "fc01:9400:1000:8::1",
- "ipAddress": "172.16.239.120",
- "ipGateway": "172.16.239.1",
- "ipNetmask": "255.255.255.0",
- "lastUpdated": "2018-12-05 18:45:05+00",
- "mgmtIpAddress": "",
- "mgmtIpGateway": "",
- "mgmtIpNetmask": "",
- "offlineReason": "",
- "physLocation": "Apachecon North America 2018",
- "physLocationId": 1,
- "profile": "ATS_MID_TIER_CACHE",
- "profileDesc": "Mid Cache - Apache Traffic Server",
- "profileId": 10,
- "rack": "",
- "revalPending": false,
- "routerHostName": "",
- "routerPortName": "",
- "status": "REPORTED",
- "statusId": 3,
- "tcpPort": 80,
- "type": "MID",
- "typeId": 12,
- "updPending": false,
- "xmppId": "mid",
- "xmppPasswd": "",
- "ipIsService": true,
- "ip6IsService": true
- }
- ]}
-
-.. [1] For more information see the `Wikipedia page on Lights-Out management <https://en.wikipedia.org/wiki/Out-of-band_management>`_\ .
Review comment:
darn good catch
----------------------------------------------------------------
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
With regards,
Apache Git Services