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 2019/03/05 19:44:00 UTC
[GitHub] [trafficcontrol] ocket8888 commented on issue #2991: WIP Traffic
Ops Go ATS Configs - meta, profiles, remap.config
ocket8888 commented on issue #2991: WIP Traffic Ops Go ATS Configs - meta, profiles, remap.config
URL: https://github.com/apache/trafficcontrol/pull/2991#issuecomment-469830484
Looks like the meta path has dropped the ability to parse server names as opposed to only integral, unique identifiers:
```console
$ export R_PATH="api/1.3/servers/$SERVER_NAME/configfiles/ats" # Server name omitted
$ export TO_URL="https://localhost:6443" # URL to the current TO that uses Perl for configs
$ toget -fpr "$R_PATH" # Credentials omitted for obvious reasons
GET /api/1.3/servers/REDACTED/configfiles/ats HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...
HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept
Access-Control-Allow-Methods: POST,GET,OPTIONS,PUT,DELETE
Access-Control-Allow-Origin: *
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Type: text/plain;charset=UTF-8
Date: Tue, 05 Mar 2019 19:31:55 GMT
Server: Mojolicious (Perl)
Set-Cookie: mojolicious=...; expires=Tue, 05 Mar 2019 23:31:55 GMT; path=/; HttpOnly
Vary: Accept-Encoding
Whole-Content-Sha512: sMhpmferOoh/fcxDBG7ZT8f5Zt++0b9j7iqrH8coJ15E1Qyf2yrqXoCwJ9KOkTfYrGxrsKy0wMhuoRsDllOMgQ==
Transfer-Encoding: chunked
{
"info": {
"profileId": 390,
"toRevProxyUrl": "REDACTED",
"toUrl": "REDACTED",
"serverIpv4": "REDACTED",
"serverTcpPort": 80,
"serverName": "REDACTED",
"cdnId": 1,
"cdnName": "REDACTED",
"serverId": 873,
"profileName": "REDACTED"
},
"configFiles": [
{
"fnameOnDisk": "12M_facts",
"location": "/opt/ort",
"apiUri": "/api/1.2/profiles/REDACTED/configfiles/ats/12M_facts",
"scope": "profiles"
},
"scores of other files omitted for length"
]
}
$ export TO_URL="https://localhost:6444" # URL to a TO build using this PR
$ toget -fpr "$R_PATH"
GET /api/1.3/servers/REDACTED/configfiles/ats HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...
HTTP/1.1 400 Bad Request
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=/; HttpOnly
Whole-Content-Sha512: 0RV1+AA8FYWqzq40fM/BnkLYpBUzloc2JOeuxEu/m8Wjqoha1kKJwXEtBcMicN6VVQHsSGQIWBwj2HdVVjcOCQ==
X-Server-Name: traffic_ops_golang/
Date: Tue, 05 Mar 2019 19:42:35 GMT
Content-Length: 97
{
"alerts": [
{
"text": "getting integer parameters: parameter 'id' not an integer",
"level": "error"
}
]
}
```
----------------------------------------------------------------
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