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/04/01 02:28:56 UTC
[GitHub] [trafficcontrol] Shihta opened a new issue #3451: API
"api/1.3/servers" doesn't work correctly
Shihta opened a new issue #3451: API "api/1.3/servers" doesn't work correctly
URL: https://github.com/apache/trafficcontrol/issues/3451
After CIAB started up, I want create a server via API `api/1.3/servers` so I use `to-post`;
1. enter enroller and then execute `. /to-access.sh`
2. execute `to-post "api/1.3/servers" edge-ecache-0.json`, it returns success
the content of `edge-ecache-0.json`:
```
{
"hostName": "edge-ecache-0",
"domainName": "infra.ciab.test",
"cachegroup": "QCT_CG_Edge_Remote_0",
"interfaceName": "eth0",
"ipAddress": "172.24.0.3",
"ipNetmask": "255.255.0.0",
"ipGateway": "172.24.0.1",
"ip6Address": "",
"ip6Gateway": "",
"interfaceMtu": 1500,
"type": "EDGE",
"physLocation": "Apachecon North America 2018",
"profile": "QCT_EDGE_TIER_CACHE",
"cdnName": "QCT-CDN",
"updPending": false,
"status": "REPORTED",
"tcpPort": 80,
"httpsPort": 443
}
```
the response:
```
{
"alerts": [
{
"text": "server was created.",
"level": "success"
}
],
"response": {
"cachegroup": "QCT_CG_Edge_Remote_0",
"cachegroupId": 8,
"cdnId": 1,
"cdnName": "QCT-CDN",
"domainName": "infra.ciab.test",
"guid": "",
"hostName": "edge-ecache-0",
"httpsPort": 443,
"id": 19,
"iloIpAddress": "",
"iloIpGateway": "",
"iloIpNetmask": "",
"iloPassword": "",
"iloUsername": "",
"interfaceMtu": 1500,
"interfaceName": "eth0",
"ip6Address": null,
"ip6Gateway": "",
"ipAddress": "172.24.0.3",
"ipGateway": "172.24.0.1",
"ipNetmask": "255.255.0.0",
"lastUpdated": "2019-04-01 02:19:01+00",
"mgmtIpAddress": "",
"mgmtIpGateway": "",
"mgmtIpNetmask": "",
"offlineReason": "",
"physLocation": "Apachecon North America 2018",
"physLocationId": 1,
"profile": "QCT_EDGE_TIER_CACHE",
"profileDesc": "",
"profileId": 3,
"rack": "",
"revalPending": false,
"routerHostName": "",
"routerPortName": "",
"status": "REPORTED",
"statusId": 2,
"tcpPort": 80,
"type": "EDGE",
"typeId": 19,
"updPending": false,
"xmppId": "trafficops-perl",
"xmppPasswd": ""
}
}
```
however, the data that actually exists in the system is:
```
docker-compose exec trafficops /bin/bash -c "source /to-access.sh && to-get 'api/1.4/servers?hostName=edge-ecache-0' | jq '.response[]'"
{
"cachegroup": "CDN_in_a_Box_Edge",
"cachegroupId": 8,
"cdnId": 1,
"cdnName": "ALL",
"domainName": "infra.ciab.test",
"guid": null,
"hostName": "edge-ecache-0",
"httpsPort": 443,
"id": 19,
"iloIpAddress": "",
"iloIpGateway": "",
"iloIpNetmask": "",
"iloPassword": "",
"iloUsername": "",
"interfaceMtu": 1500,
"interfaceName": "eth0",
"ip6Address": null,
"ip6Gateway": "",
"ipAddress": "172.24.0.3",
"ipGateway": "172.24.0.1",
"ipNetmask": "255.255.0.0",
"lastUpdated": "2019-04-01 02:19:01+00",
"mgmtIpAddress": "",
"mgmtIpGateway": "",
"mgmtIpNetmask": "",
"offlineReason": "",
"physLocation": "Apachecon North America 2018",
"physLocationId": 1,
"profile": "TRAFFIC_OPS",
"profileDesc": "Traffic Ops profile",
"profileId": 3,
"rack": "",
"revalPending": false,
"routerHostName": "",
"routerPortName": "",
"status": "ONLINE",
"statusId": 2,
"tcpPort": 80,
"type": "TRAFFIC_OPS",
"typeId": 19,
"updPending": false,
"xmppId": "trafficops-perl",
"xmppPasswd": ""
}
```
as the response, you can see that the `cdnName`, `profile`, `type`, ... are different to the original request
----------------------------------------------------------------
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