Skip to content

Commit

Permalink
Update CrConfig, TMConfig, and servers response based on the Go structs'
Browse files Browse the repository at this point in the history
serialization of them
  • Loading branch information
zrhoffman committed Sep 7, 2023
1 parent 1e5ddcb commit b62094b
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 94 deletions.
51 changes: 32 additions & 19 deletions traffic_monitor/tests/_integration/monitoring.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
"cacheGroups": [
{
"cg0": {
"coordinates": {
"latitude": 0,
"longitude": 0
},
"name": "cg0"
}
"coordinates": {
"latitude": 0,
"longitude": 0
},
"name": ""
}
],
"config": {
"address": "172.22.0.2",
"gateway": "172.22.0.1",
"health.polling.interval": 2000,
"heartbeat.polling.interval": 2000,
"peers.polling.interval": 30,
"tm.polling.interval": 30
},
"deliveryServices": [
{
"TotalKbpsThreshold": 1000000,
"TotalTpsThreshold": 1000000,
"status": "REPORTED",
"topology": "",
"totalKbpsThreshold": 1000000,
"totalTpsThreshold": 1000000,
"type": "HTTP",
"xmlId": "ds0"
}
Expand All @@ -30,23 +30,36 @@
{
"name": "Edge0",
"parameters": {
"MinFreeKbps": 0,
"health.connection.timeout": 10,
"health.polling.format": "",
"health.polling.type": "",
"health.polling.url": "http://${hostname}/_astats?application=&inf.name=bond0",
"health.threshold.kbps": "<20000",
"health_threshold": {}
"health_threshold": {
"kbps": {
"Comparator": "<",
"Val": 20000
}
},
"history.count": 0
},
"type": "EDGE"
},
{
"name": "Monitor0",
"parameters": {
"MinFreeKbps": 0,
"health.connection.timeout": 10,
"health.polling.format": "",
"health.polling.type": "",
"health.threshold.kbps": "<20000",
"health_threshold": {}
"health.polling.url": "",
"health_threshold": {
"kbps": {
"Comparator": "<",
"Val": 20000
}
},
"history.count": 0
},
"type": "RASCAL"
}
Expand All @@ -72,14 +85,14 @@
}
],
"fqdn": "server0.monitor-integration.test",
"hashid": "server0",
"hashId": "server0",
"hostName": "server0",
"interfaces": [
{
"ipAddresses": [
{
"address": "172.31.0.2",
"gateway": "172.31.0.1",
"address": "172.22.0.2",
"gateway": "172.22.0.1",
"serviceAddress": true
}
],
Expand All @@ -102,14 +115,14 @@
}
],
"fqdn": "server1.monitor-integration.test",
"hashid": "server1",
"hashId": "server1",
"hostName": "server1",
"interfaces": [
{
"ipAddresses": [
{
"address": "172.31.0.2",
"gateway": "172.31.0.1",
"address": "172.22.0.2",
"gateway": "172.22.0.1",
"serviceAddress": true
}
],
Expand Down
47 changes: 14 additions & 33 deletions traffic_monitor/tests/_integration/servers.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
[
{
"cachegroup": "foo",
"cachegroupId": 0,
"cdnId": 1,
"cdnName": "fake",
"deliveryServices": null,
"fqdn": "trafficmonitor.traffic-monitor-integration.test",
"cacheGroup": "foo",
"cacheGroupID": 0,
"cdn": "fake",
"cdnID": 1,
"configUpdateFailed": false,
"domainName": "",
"guid": "foo",
"hostName": "trafficmonitor",
"httpsPort": null,
"id": 1,
"iloIpAddress": null,
"iloIpGateway": null,
"iloIpNetmask": null,
"iloPassword": null,
"iloUsername": null,
"interfaceMtu": null,
"interfaceName": "bond0",
"ip6Address": null,
"ip6Gateway": null,
"interfaces": [
{
"ipAddresses": [
Expand All @@ -36,31 +26,22 @@
"maxBandwidth": null,
"monitor": true,
"mtu": 1500,
"name": "eth0"
"name": "eth0",
"routerHostName": "",
"routerPortName": ""
}
],
"ipGateway": "4.0.0.0.1",
"ipNetmask": "255.255.255.0",
"lastUpdated": "2023-08-28T19:55:05.265232Z",
"mgmtIpAddress": null,
"mgmtIpGateway": null,
"mgmtIpNetmask": null,
"offlineReason": "none",
"physLocation": "",
"physLocationId": 0,
"profile": "Monitor0",
"profileDesc": "nodesc",
"profileId": 0,
"physicalLocation": "",
"physicalLocationID": 0,
"rack": "",
"revalPending": false,
"routerHostName": "",
"routerPortName": "",
"revalUpdateFailed": false,
"status": "REPORTED",
"statusId": 0,
"statusID": 0,
"tcpPort": 80,
"type": "RASCAL",
"typeId": 0,
"updPending": false,
"typeID": 0,
"xmppId": "",
"xmppPasswd": ""
}
Expand Down
82 changes: 40 additions & 42 deletions traffic_monitor/tests/_integration/snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"coveragezone.polling.url": "30",
"dnssec.dynamic.response.expiration": "60",
"dnssec.enabled": "false",
"dnssec.inception": "0",
"domain_name": "monitor-integration.test",
"federationmapping.polling.interval": "60",
"federationmapping.polling.url": "foo",
Expand All @@ -14,9 +15,7 @@
"keystore.maintenance.interval": "30",
"neustar.polling.interval": "30",
"neustar.polling.url": "foo",
"soa": {
},
"dnssec.inception": "0",
"soa": {},
"ttls": {
"admin": "30",
"expire": "30",
Expand All @@ -31,81 +30,80 @@
"contentServers": {
"server0": {
"cacheGroup": "cg0",
"profile": "Edge0",
"deliveryServices": {
"ds0": [
"ds0.monitor-integration.test"
]
},
"fqdn": "server0.monitor-integration.test",
"hashCount": 1,
"hashId": "server0",
"interfaceName": "bond0",
"ip": "testcaches",
"ip6": null,
"locationId": "",
"port": 30000,
"profile": "Edge0",
"routingDisabled": 0,
"status": "REPORTED",
"type": "EDGE",
"interfaceName": "bond0",
"type": "EDGE"
},
"server1": {
"cacheGroup": "cg0",
"deliveryServices": {
"ds0": [
"ds0.monitor-integration.test"
]
},
"routingDisabled": 0
},
"server1": {
"cacheGroup": "cg0",
"profile": "Edge0",
"fqdn": "server1.monitor-integration.test",
"hashCount": 1,
"hashId": "server1",
"interfaceName": "bond0",
"ip": "testcaches",
"ip6": null,
"locationId": "",
"port": 30001,
"profile": "Edge0",
"routingDisabled": 0,
"status": "REPORTED",
"type": "EDGE",
"interfaceName": "bond0",
"deliveryServices": {
"ds0": [
"ds0.monitor-integration.test"
]
},
"routingDisabled": 0
"type": "EDGE"
}
},
"deliveryServices": {
"ds0": {
"anonymousBlockingEnabled": "false",
"consistentHashQueryParams": [],
"consistentHashRegex": "",
"coverageZoneOnly": "false",
"deepCachingType": "NEVER",
"dispersion": {
"limit": 1,
"shuffled": "false"
},
"domains": [
"ds0.monitor-integration.test"
],
"ip6RoutingEnabled": "false",
"matchsets": [
{
"protocol": "HTTP",
"matchlist": [
{
"regex": "\\.*ds0\\.*",
"match-type": "HOST"
"match-type": "HOST",
"regex": "\\.*ds0\\.*"
}
]
],
"protocol": "HTTP"
}
],
"maxDnsIpsForLocation": 3,
"missLocation": {
"lat": 0,
"lon": 0
"long": 0
},
"protocol": {
"acceptHttp": "true",
"acceptHttps": "false",
"redirectToHttps": "false"
},
"regionalGeoBlocking": "false",
"responseHeaders": {},
"requestHeaders": [],
"routingName": "ccr",
"soa": {
"admin": "60",
"expire": "60",
Expand All @@ -122,22 +120,14 @@
"DS": "60",
"NS": "60",
"SOA": "60"
},
"maxDnsIpsForLocation": 3,
"ip6RoutingEnabled": "false",
"routingName": "ccr",
"deepCachingType": "",
"staticDnsEntries": []
}
}
},
"edgeLocations": {
"cg0": {
"latitude": 0,
"longitude": 0
}
},
"trafficRouterLocations": {
"tr0": {
"backupLocations": {
"fallbackToClosest": "false"
},
"latitude": 0,
"longitude": 0
}
Expand All @@ -146,7 +136,6 @@
"trafficmonitor": {
"fqdn": "trafficmonitor.monitor-integration.test",
"ip": "trafficmonitor",
"ip6": null,
"location": "cg0",
"port": 80,
"profile": "Monitor0",
Expand All @@ -160,5 +149,14 @@
"tm_path": "/fake",
"tm_user": "fake",
"tm_version": "integrationtest/0.fake"
},
"trafficRouterLocations": {
"tr0": {
"backupLocations": {
"fallbackToClosest": "false"
},
"latitude": 0,
"longitude": 0
}
}
}

0 comments on commit b62094b

Please sign in to comment.