From 99fb3d556356ca009680268678a1e3c266b2e52a Mon Sep 17 00:00:00 2001 From: Rima Shah Date: Wed, 7 Sep 2022 15:13:25 -0600 Subject: [PATCH 01/11] Renamed rascal to tm/traffic_monitor --- .../testing/ort-tests/tc-fixtures.json | 40 +++++++++---------- dev/traffic_ops/seed.psql | 28 ++++++------- .../api/v3/cdns_name_configs_monitoring.rst | 2 +- docs/source/api/v3/cdns_name_snapshot.rst | 2 +- docs/source/api/v3/cdns_name_snapshot_new.rst | 2 +- .../api/v4/cdns_name_configs_monitoring.rst | 2 +- docs/source/api/v4/cdns_name_snapshot.rst | 2 +- docs/source/api/v4/cdns_name_snapshot_new.rst | 2 +- .../overview/profiles_and_parameters.rst | 2 +- .../server-details.component.spec.ts | 2 +- .../servers-table.component.spec.ts | 2 +- .../roles/dataset_loader/defaults/main.yml | 28 ++++++------- .../parameter.diff.exclusions.yml | 6 +-- .../cdn-in-a-box/traffic_ops/to-access.sh | 4 +- .../profiles/010-ATS_EDGE_TIER_CACHE.json | 12 +++--- .../profiles/020-ATS_MID_TIER_CACHE.json | 12 +++--- ..._Monitor.json => 070-Traffic_Monitor.json} | 10 ++--- infrastructure/docker/traffic_monitor/run.sh | 4 +- lib/go-tc/enum.go | 8 +--- .../tests/health-client-startup_test.go | 8 ++-- .../tests/_integration/monitoring.json | 2 +- .../tests/_integration/servers.json | 2 +- traffic_monitor/tmcheck/tmcheck.go | 2 +- traffic_ops/app/db/seeds.sql | 2 +- .../testing/api/v3/profile_parameters_test.go | 8 ++-- traffic_ops/testing/api/v3/profiles_test.go | 4 +- traffic_ops/testing/api/v3/tc-fixtures.json | 36 ++++++++--------- traffic_ops/testing/api/v4/cdn_locks_test.go | 4 +- .../testing/api/v4/profile_parameters_test.go | 8 ++-- traffic_ops/testing/api/v4/profiles_test.go | 6 +-- traffic_ops/testing/api/v4/tc-fixtures.json | 40 +++++++++---------- .../traffic_ops_golang/cdn/capacity.go | 2 +- .../deliveryservice/capacity.go | 2 +- .../monitoring/monitoring.go | 6 +-- 34 files changed, 149 insertions(+), 153 deletions(-) rename infrastructure/cdn-in-a-box/traffic_ops_data/profiles/{070-RASCAL-Traffic_Monitor.json => 070-Traffic_Monitor.json} (68%) diff --git a/cache-config/testing/ort-tests/tc-fixtures.json b/cache-config/testing/ort-tests/tc-fixtures.json index ec98e9ac04..22b14ceb10 100644 --- a/cache-config/testing/ort-tests/tc-fixtures.json +++ b/cache-config/testing/ort-tests/tc-fixtures.json @@ -1345,21 +1345,21 @@ ], "parameters": [ { - "configFile": "rascal.properties", + "configFile": "tm.properties", "lastUpdated": "2018-01-19T19:01:21.455131+00:00", "name": "health.threshold.loadavg", "secure": false, "value": "25.0" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "lastUpdated": "2018-01-19T19:01:21.472279+00:00", "name": "health.threshold.availableBandwidthInKbps", "secure": false, "value": ">1750000" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "lastUpdated": "2018-01-19T19:01:21.489534+00:00", "name": "history.count", "secure": false, @@ -1681,13 +1681,13 @@ "value": "INT 0" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.threshold.queryTime", "secure": false, "value": "1000" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.polling.url", "secure": false, "value": "http://${hostname}/_astats?application=&inf.name=${interface_name}" @@ -1699,7 +1699,7 @@ "value": "1" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.connection.timeout", "secure": false, "value": "2000" @@ -2078,13 +2078,13 @@ "value": "INT 0" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.threshold.queryTime", "secure": false, "value": "1000" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.polling.url", "secure": false, "value": "http://${hostname}/_astats?application=&inf.name=${interface_name}" @@ -2096,7 +2096,7 @@ "value": "1" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.connection.timeout", "secure": false, "value": "2000" @@ -2390,33 +2390,33 @@ }, { "cdnName": "cdn1", - "description": "rascal description", + "description": "traffic-monitor description", "lastUpdated": "2018-03-02T17:27:11.813052+00:00", - "name": "RASCAL1", + "name": "TRAFFIC_MONITOR1", "routing_disabled": false, "type": "TM_PROFILE", "params": [ { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.threshold.queryTime", "secure": false, "value": "1000" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.polling.url", "secure": false, "value": "http://${hostname}/_astats?application=&inf.name=${interface_name}" }, { - "configFile": "rascal-config.txt", + "configFile": "tm-config.txt", "lastUpdated": "2018-01-19T19:01:21.472279+00:00", "name": "peers.polling.interval", "secure": false, "value": "60" }, { - "configFile": "rascal-config.txt", + "configFile": "tm-config.txt", "lastUpdated": "2018-01-19T19:01:21.472279+00:00", "name": "health.polling.interval", "secure": false, @@ -3164,7 +3164,7 @@ "cdnName": "cdn1", "domainName": "kabletown.net", "guid": null, - "hostName": "rascal01", + "hostName": "tm01", "httpsPort": 443, "iloIpAddress": "", "iloIpGateway": "", @@ -3197,14 +3197,14 @@ "mgmtIpNetmask": "", "offlineReason": null, "physLocation": "Denver", - "profile": "RASCAL1", + "profile": "TRAFFIC_MONITOR1", "rack": "RR 119.02", "revalPending": false, "routerHostName": "", "routerPortName": "", "status": "ONLINE", "tcpPort": 81, - "type": "RASCAL", + "type": "TRAFFIC_MONITORv", "updPending": false, "xmppId": "", "xmppPasswd": "X" @@ -5046,9 +5046,9 @@ "useInTable": "server" }, { - "description": "Traffic Monitor (Rascal)", + "description": "Traffic Monitor", "lastUpdated": "2018-03-02T19:13:46.832327+00:00", - "name": "RASCAL", + "name": "TRAFFIC_MONITOR", "useInTable": "server" } ], diff --git a/dev/traffic_ops/seed.psql b/dev/traffic_ops/seed.psql index 5f30def8e8..400d85ca92 100644 --- a/dev/traffic_ops/seed.psql +++ b/dev/traffic_ops/seed.psql @@ -46,8 +46,8 @@ INSERT INTO snapshot ( monitoring ) VALUES ( 'dev', - '{"config":{"coveragezone.polling.url":"file:///go/src/github.com/apache/trafficcontrol/dev/traffic_router/czf.json","dnssec.enabled":"false","domain_name":"ciab.test","geolocation.polling.url":"file:///go/src/github.com/apache/trafficcontrol/traffic_router/core/src/test/resources/geo/GeoLite2-City.mmdb.gz"},"contentServers":{"edge":{"cacheGroup":"dev","fqdn":"edge.dev.ciab.test","hashCount":999,"hashId":"edge","httpsPort":443,"interfaceName":"eth0","ip":"129.0.0.2","ip6":"","locationId":"dev","port":80,"profile":"EDGE_dev","status":"REPORTED","type":"EDGE","deliveryServices":{"dev-ds":["edge.dev-ds.ciab.test"]},"routingDisabled":0}},"contentRouters":{"trafficrouter":{"fqdn":"trafficrouter.dev.ciab.test","httpsPort":443,"ip":"","ip6":"","location":"tr-cg","port":80,"profile":"CCR_dev","status":"ONLINE"}},"deliveryServices":{"dev-ds":{"anonymousBlockingEnabled":"false","coverageZoneOnly":"false","deepCachingType":"NEVER","dispersion":{"limit":1,"shuffled":"true"},"domains":["dev-ds.ciab.test"],"ecsEnabled":"false","geolocationProvider":"maxmindGeolocationService","ip6RoutingEnabled":"false","matchsets":[{"protocol":"HTTP","matchlist":[{"regex":".*\\.dev-ds\\..*","match-type":"HOST"}]}],"missLocation":{"lat":1,"long":1},"protocol":{"acceptHttps":"false","redirectToHttps":"false"},"regionalGeoBlocking":"false","routingName":"cdn","soa":{"admin":"traffic_ops","expire":"604800","minimum":"30","refresh":"28800","retry":"7200"},"sslEnabled":"false","ttls":{"A":"","AAAA":"","NS":"3600","SOA":"86400"}}},"edgeLocations":{"dev":{"latitude":1,"longitude":1,"backupLocations":{"fallbackToClosest":"true"},"localizationMethods":["GEO","CZ","DEEP_CZ"]}},"trafficRouterLocations":{"tr-cg":{"latitude":1,"longitude":1,"backupLocations":{"fallbackToClosest":"false"},"localizationMethods":["GEO","CZ","DEEP_CZ"]}},"monitors":{"trafficmonitor":{"fqdn":"trafficmonitor.dev.ciab.test","httpsPort":null,"ip":"129.0.0.1","ip6":"","location":"dev","port":80,"profile":"RASCAL_TM_dev","status":"ONLINE"}},"stats":{"CDN_name":"dev","date":1649361181,"tm_host":"trafficops","tm_user":"admin","tm_version":"development"}}', - '{"trafficServers":[{"profile":"EDGE_dev","status":"REPORTED","port":80,"cachegroup":"dev","hostname":"edge","fqdn":"edge.dev.ciab.test","interfaces":[{"ipAddresses":[{"address":"129.0.0.2","gateway":null,"serviceAddress":true}],"maxBandwidth":null,"monitor":true,"mtu":1500,"name":"eth0"}],"type":"EDGE","hashid":"","deliveryServices":[{"xmlId":"dev-ds"}]}],"trafficMonitors":[{"profile":"RASCAL_TM_dev","status":"ONLINE","port":80,"cachegroup":"dev","hostname":"trafficmonitor","fqdn":"trafficmonitor.dev.ciab.test","ip":"129.0.0.1","ip6":""}],"cacheGroups":[{"name":"dev","coordinates":{"latitude":1,"longitude":1}},{"name":"tr-cg","coordinates":{"latitude":1,"longitude":1}}],"profiles":[{"name":"CCR_dev","type":"CCR","parameters":null},{"name":"EDGE_dev","type":"EDGE","parameters":{"health.polling.format":"stats_over_http","health.polling.url":"http://edge:8080/_stats?application=\\u0026inf.name=${interface_name}"}}],"deliveryServices":[{"xmlId":"dev-ds","totalTpsThreshold":0,"status":"REPORTED","totalKbpsThreshold":0,"type":"HTTP","topology":"","hostRegexes":[".*\\.dev-ds\\..*"]}],"config":{"health.polling.interval":6000,"heartbeat.polling.interval":3000,"peers.polling.interval":3000,"tm.polling.interval":2000},"topologies":{}}' + '{"config":{"coveragezone.polling.url":"file:///go/src/github.com/apache/trafficcontrol/dev/traffic_router/czf.json","dnssec.enabled":"false","domain_name":"ciab.test","geolocation.polling.url":"file:///go/src/github.com/apache/trafficcontrol/traffic_router/core/src/test/resources/geo/GeoLite2-City.mmdb.gz"},"contentServers":{"edge":{"cacheGroup":"dev","fqdn":"edge.dev.ciab.test","hashCount":999,"hashId":"edge","httpsPort":443,"interfaceName":"eth0","ip":"129.0.0.2","ip6":"","locationId":"dev","port":80,"profile":"EDGE_dev","status":"REPORTED","type":"EDGE","deliveryServices":{"dev-ds":["edge.dev-ds.ciab.test"]},"routingDisabled":0}},"contentRouters":{"trafficrouter":{"fqdn":"trafficrouter.dev.ciab.test","httpsPort":443,"ip":"","ip6":"","location":"tr-cg","port":80,"profile":"CCR_dev","status":"ONLINE"}},"deliveryServices":{"dev-ds":{"anonymousBlockingEnabled":"false","coverageZoneOnly":"false","deepCachingType":"NEVER","dispersion":{"limit":1,"shuffled":"true"},"domains":["dev-ds.ciab.test"],"ecsEnabled":"false","geolocationProvider":"maxmindGeolocationService","ip6RoutingEnabled":"false","matchsets":[{"protocol":"HTTP","matchlist":[{"regex":".*\\.dev-ds\\..*","match-type":"HOST"}]}],"missLocation":{"lat":1,"long":1},"protocol":{"acceptHttps":"false","redirectToHttps":"false"},"regionalGeoBlocking":"false","routingName":"cdn","soa":{"admin":"traffic_ops","expire":"604800","minimum":"30","refresh":"28800","retry":"7200"},"sslEnabled":"false","ttls":{"A":"","AAAA":"","NS":"3600","SOA":"86400"}}},"edgeLocations":{"dev":{"latitude":1,"longitude":1,"backupLocations":{"fallbackToClosest":"true"},"localizationMethods":["GEO","CZ","DEEP_CZ"]}},"trafficRouterLocations":{"tr-cg":{"latitude":1,"longitude":1,"backupLocations":{"fallbackToClosest":"false"},"localizationMethods":["GEO","CZ","DEEP_CZ"]}},"monitors":{"trafficmonitor":{"fqdn":"trafficmonitor.dev.ciab.test","httpsPort":null,"ip":"129.0.0.1","ip6":"","location":"dev","port":80,"profile":"TM_dev","status":"ONLINE"}},"stats":{"CDN_name":"dev","date":1649361181,"tm_host":"trafficops","tm_user":"admin","tm_version":"development"}}', + '{"trafficServers":[{"profile":"EDGE_dev","status":"REPORTED","port":80,"cachegroup":"dev","hostname":"edge","fqdn":"edge.dev.ciab.test","interfaces":[{"ipAddresses":[{"address":"129.0.0.2","gateway":null,"serviceAddress":true}],"maxBandwidth":null,"monitor":true,"mtu":1500,"name":"eth0"}],"type":"EDGE","hashid":"","deliveryServices":[{"xmlId":"dev-ds"}]}],"trafficMonitors":[{"profile":"TM_dev","status":"ONLINE","port":80,"cachegroup":"dev","hostname":"trafficmonitor","fqdn":"trafficmonitor.dev.ciab.test","ip":"129.0.0.1","ip6":""}],"cacheGroups":[{"name":"dev","coordinates":{"latitude":1,"longitude":1}},{"name":"tr-cg","coordinates":{"latitude":1,"longitude":1}}],"profiles":[{"name":"CCR_dev","type":"CCR","parameters":null},{"name":"EDGE_dev","type":"EDGE","parameters":{"health.polling.format":"stats_over_http","health.polling.url":"http://edge:8080/_stats?application=\\u0026inf.name=${interface_name}"}}],"deliveryServices":[{"xmlId":"dev-ds","totalTpsThreshold":0,"status":"REPORTED","totalKbpsThreshold":0,"type":"HTTP","topology":"","hostRegexes":[".*\\.dev-ds\\..*"]}],"config":{"health.polling.interval":6000,"heartbeat.polling.interval":3000,"peers.polling.interval":3000,"tm.polling.interval":2000},"topologies":{}}' ) ON CONFLICT DO NOTHING; @@ -57,7 +57,7 @@ INSERT INTO profile ( "type", cdn ) VALUES ( - 'RASCAL_TM_dev', + 'TM_dev', 'dev TM Profile', 'TM_PROFILE', (SELECT id FROM cdn WHERE "name" = 'dev') @@ -79,27 +79,27 @@ INSERT INTO parameter ( "name", "value" ) VALUES ( - 'rascal-config.txt', + 'tm-config.txt', 'health.polling.interval', '6000' ), ( - 'rascal-config.txt', + 'tm-config.txt', 'heartbeat.polling.interval', '3000' ), ( - 'rascal-config.txt', + 'tm-config.txt', 'peers.polling.interval', '3000' ), ( - 'rascal-config.txt', + 'tm-config.txt', 'tm.polling.interval', '2000' ), ( - 'rascal.properties', + 'tm.properties', 'health.polling.url', 'http://edge:8080/_stats?application=&inf.name=${interface_name}' ), ( - 'rascal.properties', + 'tm.properties', 'health.polling.format', 'stats_over_http' ), ( @@ -120,15 +120,15 @@ ON CONFLICT DO NOTHING; INSERT INTO profile_parameter SELECT profile.id, parameter.id FROM profile, parameter -WHERE parameter.config_file = 'rascal-config.txt' +WHERE parameter.config_file = 'tm-config.txt' AND parameter."name" LIKE '%.polling.%' -AND profile."name" = 'RASCAL_TM_dev' +AND profile."name" = 'TM_dev' ON CONFLICT DO NOTHING; INSERT INTO profile_parameter SELECT profile.id, parameter.id FROM profile, parameter -WHERE parameter.config_file = 'rascal.properties' +WHERE parameter.config_file = 'tm.properties' AND profile."name" = 'EDGE_dev' ON CONFLICT DO NOTHING; @@ -214,9 +214,9 @@ INSERT INTO "server" ( NULL, (SELECT id FROM phys_location WHERE "name" = 'dev'), (SELECT id FROM cachegroup WHERE "name" = 'dev'), - (SELECT id FROM "type" WHERE "name" = 'RASCAL'), + (SELECT id FROM "type" WHERE "name" = 'TRAFFIC_MONITOR'), (SELECT id FROM status WHERE "name" = 'ONLINE'), - (SELECT id FROM profile WHERE "name"= 'RASCAL_TM_dev'), + (SELECT id FROM profile WHERE "name"= 'TM_dev'), (SELECT id FROM cdn WHERE "name" = 'dev') ), ( 'edge', diff --git a/docs/source/api/v3/cdns_name_configs_monitoring.rst b/docs/source/api/v3/cdns_name_configs_monitoring.rst index 9bc775c354..f87b8f5225 100644 --- a/docs/source/api/v3/cdns_name_configs_monitoring.rst +++ b/docs/source/api/v3/cdns_name_configs_monitoring.rst @@ -215,7 +215,7 @@ Response Structure ], "trafficMonitors": [ { - "profile": "RASCAL-Traffic_Monitor", + "profile": "Traffic_Monitor", "status": "ONLINE", "ip": "172.16.239.40", "ip6": "fc01:9400:1000:8::40", diff --git a/docs/source/api/v3/cdns_name_snapshot.rst b/docs/source/api/v3/cdns_name_snapshot.rst index f6a7f42068..ee3ad22119 100644 --- a/docs/source/api/v3/cdns_name_snapshot.rst +++ b/docs/source/api/v3/cdns_name_snapshot.rst @@ -536,7 +536,7 @@ Response Structure "ip6": "", "location": "CDN_in_a_Box_Edge", "port": 80, - "profile": "RASCAL-Traffic_Monitor", + "profile": "Traffic_Monitor", "status": "ONLINE" } }, diff --git a/docs/source/api/v3/cdns_name_snapshot_new.rst b/docs/source/api/v3/cdns_name_snapshot_new.rst index 7d7115792d..28f982a688 100644 --- a/docs/source/api/v3/cdns_name_snapshot_new.rst +++ b/docs/source/api/v3/cdns_name_snapshot_new.rst @@ -552,7 +552,7 @@ Response Structure "ip6": "", "location": "CDN_in_a_Box_Edge", "port": 80, - "profile": "RASCAL-Traffic_Monitor", + "profile": "Traffic_Monitor", "status": "ONLINE" } }, diff --git a/docs/source/api/v4/cdns_name_configs_monitoring.rst b/docs/source/api/v4/cdns_name_configs_monitoring.rst index 132bd2d79c..25a80d3e07 100644 --- a/docs/source/api/v4/cdns_name_configs_monitoring.rst +++ b/docs/source/api/v4/cdns_name_configs_monitoring.rst @@ -216,7 +216,7 @@ Response Structure ], "trafficMonitors": [ { - "profile": "RASCAL-Traffic_Monitor", + "profile": "Traffic_Monitor", "status": "ONLINE", "ip": "172.16.239.40", "ip6": "fc01:9400:1000:8::40", diff --git a/docs/source/api/v4/cdns_name_snapshot.rst b/docs/source/api/v4/cdns_name_snapshot.rst index 1c6d04cbae..fbfb75f19f 100644 --- a/docs/source/api/v4/cdns_name_snapshot.rst +++ b/docs/source/api/v4/cdns_name_snapshot.rst @@ -533,7 +533,7 @@ Response Structure "ip6": "", "location": "CDN_in_a_Box_Edge", "port": 80, - "profile": "RASCAL-Traffic_Monitor", + "profile": "Traffic_Monitor", "status": "ONLINE" } }, diff --git a/docs/source/api/v4/cdns_name_snapshot_new.rst b/docs/source/api/v4/cdns_name_snapshot_new.rst index 3f6b1e6851..b8538d249a 100644 --- a/docs/source/api/v4/cdns_name_snapshot_new.rst +++ b/docs/source/api/v4/cdns_name_snapshot_new.rst @@ -547,7 +547,7 @@ Response Structure "ip6": "", "location": "CDN_in_a_Box_Edge", "port": 80, - "profile": "RASCAL-Traffic_Monitor", + "profile": "Traffic_Monitor", "status": "ONLINE" } }, diff --git a/docs/source/overview/profiles_and_parameters.rst b/docs/source/overview/profiles_and_parameters.rst index 18cae3bb93..09153d43e0 100644 --- a/docs/source/overview/profiles_and_parameters.rst +++ b/docs/source/overview/profiles_and_parameters.rst @@ -497,7 +497,7 @@ For each Parameter with this Config File value on the same :ref:`Profile ` are all configuration options for Traffic Monitor. The :ref:`Names ` with meaning are as follows. diff --git a/experimental/traffic-portal/src/app/core/servers/server-details/server-details.component.spec.ts b/experimental/traffic-portal/src/app/core/servers/server-details/server-details.component.spec.ts index 1b8833e1b4..22bde978e9 100644 --- a/experimental/traffic-portal/src/app/core/servers/server-details/server-details.component.spec.ts +++ b/experimental/traffic-portal/src/app/core/servers/server-details/server-details.component.spec.ts @@ -119,7 +119,7 @@ describe("ServerDetailsComponent", () => { expect(component.isCache()).toBeTrue(); s.type = "a string that merely CONTAINS 'EDGE' instead of starting with it"; expect(component.isCache()).toBeFalse(); - s.type = "RASCAL"; + s.type = "TRAFFIC_MONITOR"; expect(component.isCache()).toBeFalse(); }); diff --git a/experimental/traffic-portal/src/app/core/servers/servers-table/servers-table.component.spec.ts b/experimental/traffic-portal/src/app/core/servers/servers-table/servers-table.component.spec.ts index a9ccd9e8fd..418b682d7a 100644 --- a/experimental/traffic-portal/src/app/core/servers/servers-table/servers-table.component.spec.ts +++ b/experimental/traffic-portal/src/app/core/servers/servers-table/servers-table.component.spec.ts @@ -94,7 +94,7 @@ describe("ServersTableComponent", () => { expect(serverIsCache(s)).toBeTrue(); s.type = "a string that merely CONTAINS 'EDGE' instead of starting with it"; expect(serverIsCache(s)).toBeFalse(); - s.type = "RASCAL"; + s.type = "TRAFFIC_MONITOR"; expect(serverIsCache(s)).toBeFalse(); }); diff --git a/infrastructure/ansible/roles/dataset_loader/defaults/main.yml b/infrastructure/ansible/roles/dataset_loader/defaults/main.yml index ccb83c2a94..189b515acf 100644 --- a/infrastructure/ansible/roles/dataset_loader/defaults/main.yml +++ b/infrastructure/ansible/roles/dataset_loader/defaults/main.yml @@ -108,7 +108,7 @@ dl_ds_default_type_ansible_component_map: mso_parent_alias: ORG influxdb: INFLUXDB riak: RIAK - traffic_monitor: RASCAL + traffic_monitor: TRAFFIC_MONITOR traffic_ops: TRAFFIC_OPS traffic_opsdb: TRAFFIC_OPS_DB traffic_portal: TRAFFIC_PORTAL @@ -306,7 +306,7 @@ dl_ds_default_profile_prefix_ansible_component_map: mso_parent_alias: '(?i)^MSO_.*' influxdb: '(?i)^INFLUXDB$' riak: '(?i)^RIAK.*' - traffic_monitor: '(?i)^RASCAL_.*' + traffic_monitor: '(?i)^TRAFFIC_MONITOR.*' traffic_ops: '(?i)^TRAFFIC_OPS$' traffic_opsdb: '(?i)^TRAFFIC_OPS_DB$' traffic_portal: '(?i)^TRAFFIC_PORTAL$' @@ -937,22 +937,22 @@ dl_ds_default_profile_layers: configFile: plugin.config value: "--disable-timed-updates --config regex_revalidate.config" - name: health.connection.timeout - configFile: rascal.properties + configFile: tm.properties value: '2000' - name: health.polling.url - configFile: rascal.properties + configFile: tm.properties value: http://${hostname}/_astats?application=&inf.name=${interface_name} - name: health.threshold.kbps - configFile: rascal.properties + configFile: tm.properties value: "<{{ ((Target_hardware_profile.value.network_bandwidth_limit | default('1000') | float - (Target_hardware_profile.value.network_bandwidth_limit | default('1000') | float * ((100 - dl_ds_reserved_bandwidth_percentage | float) / 100))) | int) * 1000 }}" - name: health.threshold.loadavg - configFile: rascal.properties + configFile: tm.properties value: "{{ Target_hardware_profile.value.load_avg_limit | default('10') }}.0" - name: health.threshold.queryTime - configFile: rascal.properties + configFile: tm.properties value: '1500' - name: history.count - configFile: rascal.properties + configFile: tm.properties value: '30' - name: CONFIG proxy.config.allocator.dontdump_iobuffers configFile: records.config @@ -1302,26 +1302,26 @@ dl_ds_default_profile_layers: # These should be the profiles which vary by CDN association dl_ds_merged_profile_cdntemplates: "{{ dl_ds_default_profile_cdntemplates }}" dl_ds_default_profile_cdntemplates: - - name: "RASCAL_{{ Target_cdn_delegation }}" + - name: "TRAFFIC_MONITOR_{{ Target_cdn_delegation }}" description: "Traffic Monitor for the {{ Target_cdn_delegation }} CDN" cdn: "{{ Target_cdn_delegation }}" type: TM_PROFILE routingDisabled: false parameters: - name: health.polling.interval - configFile: rascal-config.txt + configFile: tm-config.txt value: '6000' secure: 0 - name: heartbeat.polling.interval - configFile: rascal-config.txt + configFile: tm-config.txt value: '2000' secure: 0 - name: peers.polling.interval - configFile: rascal-config.txt + configFile: tm-config.txt value: '1000' secure: 0 - name: tm.polling.interval - configFile: rascal-config.txt + configFile: tm-config.txt value: '60000' secure: 0 - name: "CCR_{{ Target_cdn_delegation }}" @@ -1660,7 +1660,7 @@ dl_ds_default_profile_cdntemplates: configFile: parent.config value: 'true' - name: health.polling.url - configFile: rascal.properties + configFile: tm.properties value: http://${hostname}/_astats?application=&inf.name=${interface_name} - name: "EDGE_ATS_7_{{ Target_cdn_delegation }}" description: "Edge cache({{ Target_cdn_delegation }}) - ATS 7" diff --git a/infrastructure/ansible/roles/dataset_loader/parameter.diff.exclusions.yml b/infrastructure/ansible/roles/dataset_loader/parameter.diff.exclusions.yml index b6e3280c96..3296ad708b 100644 --- a/infrastructure/ansible/roles/dataset_loader/parameter.diff.exclusions.yml +++ b/infrastructure/ansible/roles/dataset_loader/parameter.diff.exclusions.yml @@ -25,9 +25,9 @@ parameter_diff_exclusions: name: Drive_Letters - configFile: storage.config name: Drive_Prefix - - configFile: rascal.properties + - configFile: tm.properties name: health.threshold.kbps - - configFile: rascal.properties + - configFile: tm.properties name: health.threshold.loadavg - configFile: ip_allow.config name: purge_allow_ip @@ -41,7 +41,7 @@ parameter_diff_exclusions: name: trafficserver - configFile: records.config name: CONFIG proxy.config.http.referer_default_redirect - - configFile: rascal.properties + - configFile: tm.properties name: health.threshold.availableBandwidthInKbps - configFile: package name: jemalloc- diff --git a/infrastructure/cdn-in-a-box/traffic_ops/to-access.sh b/infrastructure/cdn-in-a-box/traffic_ops/to-access.sh index 333f16560e..a7167522c5 100755 --- a/infrastructure/cdn-in-a-box/traffic_ops/to-access.sh +++ b/infrastructure/cdn-in-a-box/traffic_ops/to-access.sh @@ -225,8 +225,8 @@ to-enroll() { export MY_STATUS="REPORTED" ;; "tm" ) - export MY_TYPE="RASCAL" - export MY_PROFILE="RASCAL-Traffic_Monitor" + export MY_TYPE="TRAFFIC_MONITOR" + export MY_PROFILE="Traffic_Monitor" export MY_STATUS="ONLINE" ;; "to" ) diff --git a/infrastructure/cdn-in-a-box/traffic_ops_data/profiles/010-ATS_EDGE_TIER_CACHE.json b/infrastructure/cdn-in-a-box/traffic_ops_data/profiles/010-ATS_EDGE_TIER_CACHE.json index 99fa1b86fe..ab722201e3 100644 --- a/infrastructure/cdn-in-a-box/traffic_ops_data/profiles/010-ATS_EDGE_TIER_CACHE.json +++ b/infrastructure/cdn-in-a-box/traffic_ops_data/profiles/010-ATS_EDGE_TIER_CACHE.json @@ -132,31 +132,31 @@ "value": "INT 0" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.threshold.loadavg", "secure": false, "value": "25.0" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.threshold.availableBandwidthInKbps", "secure": false, "value": ">1750000" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "history.count", "secure": false, "value": "30" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.threshold.queryTime", "secure": false, "value": "1000" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.polling.url", "secure": false, "value": "http://${hostname}/_astats?application=&inf.name=${interface_name}" @@ -168,7 +168,7 @@ "value": "1" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.connection.timeout", "secure": false, "value": "2000" diff --git a/infrastructure/cdn-in-a-box/traffic_ops_data/profiles/020-ATS_MID_TIER_CACHE.json b/infrastructure/cdn-in-a-box/traffic_ops_data/profiles/020-ATS_MID_TIER_CACHE.json index 9640c6b3c8..9cdffc848e 100644 --- a/infrastructure/cdn-in-a-box/traffic_ops_data/profiles/020-ATS_MID_TIER_CACHE.json +++ b/infrastructure/cdn-in-a-box/traffic_ops_data/profiles/020-ATS_MID_TIER_CACHE.json @@ -132,31 +132,31 @@ "value": "INT 0" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.threshold.loadavg", "secure": false, "value": "25.0" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.threshold.availableBandwidthInKbps", "secure": false, "value": ">1750000" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "history.count", "secure": false, "value": "30" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.threshold.queryTime", "secure": false, "value": "1000" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.polling.url", "secure": false, "value": "http://${hostname}/_astats?application=&inf.name=${interface_name}" @@ -168,7 +168,7 @@ "value": "1" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.connection.timeout", "secure": false, "value": "2000" diff --git a/infrastructure/cdn-in-a-box/traffic_ops_data/profiles/070-RASCAL-Traffic_Monitor.json b/infrastructure/cdn-in-a-box/traffic_ops_data/profiles/070-Traffic_Monitor.json similarity index 68% rename from infrastructure/cdn-in-a-box/traffic_ops_data/profiles/070-RASCAL-Traffic_Monitor.json rename to infrastructure/cdn-in-a-box/traffic_ops_data/profiles/070-Traffic_Monitor.json index 23bc56791d..a80b6bea36 100644 --- a/infrastructure/cdn-in-a-box/traffic_ops_data/profiles/070-RASCAL-Traffic_Monitor.json +++ b/infrastructure/cdn-in-a-box/traffic_ops_data/profiles/070-Traffic_Monitor.json @@ -1,26 +1,26 @@ { "cdnName": "$CDN_NAME", "description": "Traffic Monitor for CDN-in-a-Box", - "name": "RASCAL-Traffic_Monitor", + "name": "Traffic_Monitor", "type": "TM_PROFILE", "params": [ { - "configFile": "rascal-config.txt", + "configFile": "tm-config.txt", "name": "health.polling.interval", "value": "6000" }, { - "configFile": "rascal-config.txt", + "configFile": "tm-config.txt", "name": "heartbeat.polling.interval", "value": "3000" }, { - "configFile": "rascal-config.txt", + "configFile": "tm-config.txt", "name": "peers.polling.interval", "value": "3000" }, { - "configFile": "rascal-config.txt", + "configFile": "tm-config.txt", "name": "tm.polling.interval", "value": "2000" } diff --git a/infrastructure/docker/traffic_monitor/run.sh b/infrastructure/docker/traffic_monitor/run.sh index d52e2dbaf7..addd1c81d4 100755 --- a/infrastructure/docker/traffic_monitor/run.sh +++ b/infrastructure/docker/traffic_monitor/run.sh @@ -42,8 +42,8 @@ init() { [ ! -z $IP ] || IP=$(ip addr | grep 'global' | awk '{print $2}' | cut -f1 -d'/') [ ! -z $DOMAIN ] || DOMAIN="localdomain" [ ! -z $CACHEGROUP ] || CACHEGROUP="mid-east" - [ ! -z $TYPE ] || TYPE="RASCAL" - [ ! -z $PROFILE ] || PROFILE="RASCAL_CDN1" + [ ! -z $TYPE ] || TYPE="TRAFFIC_MONITOR" + [ ! -z $PROFILE ] || PROFILE="TRAFFIC_MONITOR_CDN1" [ ! -z $PHYS_LOCATION ] || PHYS_LOCATION="plocation-nyc-1" [ ! -z $INTERFACE ] || INTERFACE="eth0" [ ! -z $NETMASK ] || NETMASK="255.255.0.0" diff --git a/lib/go-tc/enum.go b/lib/go-tc/enum.go index 453270e751..7a5b622b95 100644 --- a/lib/go-tc/enum.go +++ b/lib/go-tc/enum.go @@ -131,21 +131,17 @@ const AlgorithmConsistentHash = "consistent_hash" // MonitorTypeName is the Name of the Type which must be assigned to a server // for it to be treated as a Traffic Monitor instance by ATC. // -// "Rascal" is a legacy name for Traffic Monitor. -// // Note that there is, in general, no guarantee that a Type with this name // exists in Traffic Ops at any given time. -const MonitorTypeName = "RASCAL" +const MonitorTypeName = "TRAFFIC_MONITOR" // MonitorProfilePrefix is a prefix which MUST appear on the Names of Profiles // used by Traffic Monitor instances as servers in Traffic Ops, or they may not // be treated properly. // -// "Rascal" is a legacy name for Traffic Monitor. -// // Deprecated: This should not be a requirement for TM instances to be treated // properly, and new code should not check this. -const MonitorProfilePrefix = "RASCAL" +const MonitorProfilePrefix = "TRAFFIC_MONITOR" // RouterTypeName is the Name of the Type which must be assigned to a server // for it to be treated as a Traffic Router instance by ATC. diff --git a/tc-health-client/testing/tests/health-client-startup_test.go b/tc-health-client/testing/tests/health-client-startup_test.go index 7c05322fe6..1cbd2720db 100644 --- a/tc-health-client/testing/tests/health-client-startup_test.go +++ b/tc-health-client/testing/tests/health-client-startup_test.go @@ -49,7 +49,7 @@ func TestHealthClientStartup(t *testing.T) { pollStateFile := "/var/log/trafficcontrol/poll-state.json" atlantaMid := "atlanta-mid-16.ga.atlanta.kabletown.net" dtrcMid := "dtrc-mid-02.kabletown.net" - rascal := "rascal01.kabletown.net" + traffic_monitor := "tm01.kabletown.net" waitTime, err := time.ParseDuration("5s") if err != nil { @@ -116,11 +116,11 @@ func TestHealthClientStartup(t *testing.T) { // verify that the health-client was able to poll and get an available // traffic monitor from TrafficOps - _, ok = cfg.TOData.Get().Monitors[rascal] + _, ok = cfg.TOData.Get().Monitors[traffic_monitor] if !ok { - t.Fatalf("Expected %s to be available but it's not", rascal) + t.Fatalf("Expected %s to be available but it's not", traffic_monitor) } else { - fmt.Fprintf(os.Stdout, "%s is available: true\n", rascal) + fmt.Fprintf(os.Stdout, "%s is available: true\n", traffic_monitor) } fmt.Fprintf(os.Stdout, "Stopping the tc-health-client\n") diff --git a/traffic_monitor/tests/_integration/monitoring.json b/traffic_monitor/tests/_integration/monitoring.json index 2a9e34e206..b76416001c 100644 --- a/traffic_monitor/tests/_integration/monitoring.json +++ b/traffic_monitor/tests/_integration/monitoring.json @@ -129,7 +129,7 @@ "health_threshold": {} }, "name": "Monitor0", - "type": "RASCAL" + "type": "TRAFFIC_MONITOR" } ] } diff --git a/traffic_monitor/tests/_integration/servers.json b/traffic_monitor/tests/_integration/servers.json index 5cbdfc6e64..1b41f0f7c2 100644 --- a/traffic_monitor/tests/_integration/servers.json +++ b/traffic_monitor/tests/_integration/servers.json @@ -58,7 +58,7 @@ "status": "REPORTED", "statusId": 0, "tcpPort": 80, - "type": "RASCAL", + "type": "TRAFFIC_MONITOR", "typeId": 0, "updPending": false, "xmppId": "", diff --git a/traffic_monitor/tmcheck/tmcheck.go b/traffic_monitor/tmcheck/tmcheck.go index 9bdeb405a9..d57dbeb278 100644 --- a/traffic_monitor/tmcheck/tmcheck.go +++ b/traffic_monitor/tmcheck/tmcheck.go @@ -199,7 +199,7 @@ type CRConfigOrError struct { } func GetMonitors(toClient *to.Session, includeOffline bool) ([]tc.Server, error) { - trafficMonitorType := "RASCAL" + trafficMonitorType := "TRAFFIC_MONITOR" query := url.Values{} query.Set("type", trafficMonitorType) servers, _, err := toClient.GetServers(&query) diff --git a/traffic_ops/app/db/seeds.sql b/traffic_ops/app/db/seeds.sql index ed7254a308..ab9b5a19c1 100644 --- a/traffic_ops/app/db/seeds.sql +++ b/traffic_ops/app/db/seeds.sql @@ -272,7 +272,7 @@ INSERT INTO public.type ("name", "description", use_in_table) VALUES ('EDGE', 'E INSERT INTO public.type ("name", "description", use_in_table) VALUES ('MID', 'Mid Tier Cache', 'server') ON CONFLICT ("name") DO NOTHING; INSERT INTO public.type ("name", "description", use_in_table) VALUES ('ORG', 'Origin', 'server') ON CONFLICT ("name") DO NOTHING; INSERT INTO public.type ("name", "description", use_in_table) VALUES ('CCR', 'Traffic Router', 'server') ON CONFLICT ("name") DO NOTHING; -INSERT INTO public.type ("name", "description", use_in_table) VALUES ('RASCAL', 'Traffic Monitor', 'server') ON CONFLICT ("name") DO NOTHING; +INSERT INTO public.type ("name", "description", use_in_table) VALUES ('TRAFFIC_MONITOR', 'Traffic Monitor', 'server') ON CONFLICT ("name") DO NOTHING; INSERT INTO public.type ("name", "description", use_in_table) VALUES ('RIAK', 'Riak keystore', 'server') ON CONFLICT ("name") DO NOTHING; INSERT INTO public.type ("name", "description", use_in_table) VALUES ('INFLUXDB', 'influxDb server', 'server') ON CONFLICT ("name") DO NOTHING; INSERT INTO public.type ("name", "description", use_in_table) VALUES ('TRAFFIC_ANALYTICS', 'traffic analytics server', 'server') ON CONFLICT ("name") DO NOTHING; diff --git a/traffic_ops/testing/api/v3/profile_parameters_test.go b/traffic_ops/testing/api/v3/profile_parameters_test.go index 4d78d1ac21..0ed55f4ecf 100644 --- a/traffic_ops/testing/api/v3/profile_parameters_test.go +++ b/traffic_ops/testing/api/v3/profile_parameters_test.go @@ -47,8 +47,8 @@ func TestProfileParameters(t *testing.T) { "OK when VALID request": { ClientSession: TOSession, RequestParams: url.Values{ - "profileId": {strconv.Itoa(GetProfileID(t, "RASCAL1")())}, - "parameterId": {strconv.Itoa(GetParameterID(t, "peers.polling.interval", "rascal-config.txt", "60")())}}, + "profileId": {strconv.Itoa(GetProfileID(t, "TRAFFIC_MONITOR1")())}, + "parameterId": {strconv.Itoa(GetParameterID(t, "peers.polling.interval", "tm-config.txt", "60")())}}, Expectations: utils.CkRequest(utils.NoError(), utils.HasStatus(http.StatusOK)), }, }, @@ -78,7 +78,7 @@ func TestProfileParameters(t *testing.T) { "BAD REQUEST when MISSING PROFILEID field": { ClientSession: TOSession, RequestBody: []tc.ProfileParameter{{ - ParameterID: GetParameterID(t, "health.threshold.queryTime", "rascal.properties", "1000")(), + ParameterID: GetParameterID(t, "health.threshold.queryTime", "tm.properties", "1000")(), }}, Expectations: utils.CkRequest(utils.HasError(), utils.HasStatus(http.StatusBadRequest)), }, @@ -98,7 +98,7 @@ func TestProfileParameters(t *testing.T) { ClientSession: TOSession, RequestBody: []tc.ProfileParameter{{ ProfileID: GetProfileID(t, "EDGE1")(), - ParameterID: GetParameterID(t, "health.threshold.availableBandwidthInKbps", "rascal.properties", ">1750000")(), + ParameterID: GetParameterID(t, "health.threshold.availableBandwidthInKbps", "tm.properties", ">1750000")(), }}, Expectations: utils.CkRequest(utils.HasError(), utils.HasStatus(http.StatusBadRequest)), }, diff --git a/traffic_ops/testing/api/v3/profiles_test.go b/traffic_ops/testing/api/v3/profiles_test.go index ee5d0434ed..798245726d 100644 --- a/traffic_ops/testing/api/v3/profiles_test.go +++ b/traffic_ops/testing/api/v3/profiles_test.go @@ -50,9 +50,9 @@ func TestProfiles(t *testing.T) { }, "OK when VALID NAME parameter": { ClientSession: TOSession, - RequestParams: url.Values{"name": {"RASCAL1"}}, + RequestParams: url.Values{"name": {"TRAFFIC_MONITOR1"}}, Expectations: utils.CkRequest(utils.NoError(), utils.HasStatus(http.StatusOK), utils.ResponseHasLength(1), - validateProfilesFields(map[string]interface{}{"Name": "RASCAL1"})), + validateProfilesFields(map[string]interface{}{"Name": "TRAFFIC_MONITOR1"})), }, "OK when VALID CDN parameter": { ClientSession: TOSession, diff --git a/traffic_ops/testing/api/v3/tc-fixtures.json b/traffic_ops/testing/api/v3/tc-fixtures.json index 7ecaad161d..95241e40c0 100644 --- a/traffic_ops/testing/api/v3/tc-fixtures.json +++ b/traffic_ops/testing/api/v3/tc-fixtures.json @@ -1697,7 +1697,7 @@ ], "parameters": [ { - "configFile": "rascal.properties", + "configFile": "tm.properties", "lastUpdated": "2018-01-19T19:01:21.489534+00:00", "name": "history.count", "secure": false, @@ -2063,13 +2063,13 @@ "value": "INT 0" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.threshold.queryTime", "secure": false, "value": "1000" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.polling.url", "secure": false, "value": "http://${hostname}/_astats?application=&inf.name=${interface_name}" @@ -2081,7 +2081,7 @@ "value": "1" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.connection.timeout", "secure": false, "value": "2000" @@ -2286,19 +2286,19 @@ "type": "ATS_PROFILE", "params": [ { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.threshold.loadavg", "secure": false, "value": "25.0" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.threshold.availableBandwidthInKbps", "secure": false, "value": ">1750000" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.threshold.queryTime", "secure": false, "value": "1000" @@ -2370,33 +2370,33 @@ }, { "cdnName": "cdn1", - "description": "rascal description", + "description": "tm description", "lastUpdated": "2018-03-02T17:27:11.813052+00:00", - "name": "RASCAL1", + "name": "TRAFFIC_MONITOR1", "routing_disabled": false, "type": "TM_PROFILE", "params": [ { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.threshold.queryTime", "secure": false, "value": "1000" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.polling.url", "secure": false, "value": "http://${hostname}/_astats?application=&inf.name=${interface_name}" }, { - "configFile": "rascal-config.txt", + "configFile": "tm-config.txt", "lastUpdated": "2018-01-19T19:01:21.472279+00:00", "name": "peers.polling.interval", "secure": false, "value": "60" }, { - "configFile": "rascal-config.txt", + "configFile": "tm-config.txt", "lastUpdated": "2018-01-19T19:01:21.472279+00:00", "name": "health.polling.interval", "secure": false, @@ -3072,7 +3072,7 @@ "cdnName": "cdn1", "domainName": "kabletown.net", "guid": null, - "hostName": "rascal01", + "hostName": "tm01", "httpsPort": 443, "iloIpAddress": "", "iloIpGateway": "", @@ -3105,14 +3105,14 @@ "mgmtIpNetmask": "", "offlineReason": null, "physLocation": "Denver", - "profile": "RASCAL1", + "profile": "TRAFFIC_MONITOR1", "rack": "RR 119.02", "revalPending": false, "routerHostName": "", "routerPortName": "", "status": "REPORTED", "tcpPort": 81, - "type": "RASCAL", + "type": "TRAFFIC_MONITOR", "updPending": false, "xmppId": "", "xmppPasswd": "X" @@ -5431,9 +5431,9 @@ "useInTable": "server" }, { - "description": "Traffic Monitor (Rascal)", + "description": "Traffic Monitor", "lastUpdated": "2018-03-02T19:13:46.832327+00:00", - "name": "RASCAL", + "name": "TRAFFIC_MONITOR", "useInTable": "server" } ], diff --git a/traffic_ops/testing/api/v4/cdn_locks_test.go b/traffic_ops/testing/api/v4/cdn_locks_test.go index fe6ca993d9..10be8fae79 100644 --- a/traffic_ops/testing/api/v4/cdn_locks_test.go +++ b/traffic_ops/testing/api/v4/cdn_locks_test.go @@ -342,7 +342,7 @@ func TestCDNLocks(t *testing.T) { EndpointId: GetProfileID(t, "OKwhenUserOwnLocks"), ClientSession: opsUserWithLockSession, RequestOpts: client.RequestOptions{QueryParameters: url.Values{ - "parameterId": {strconv.Itoa(GetParameterID(t, "test.cdnlock.delete", "rascal.properties", "25.0")())}, + "parameterId": {strconv.Itoa(GetParameterID(t, "test.cdnlock.delete", "tm.properties", "25.0")())}, }}, Expectations: utils.CkRequest(utils.NoError(), utils.HasStatus(http.StatusOK)), }, @@ -350,7 +350,7 @@ func TestCDNLocks(t *testing.T) { EndpointId: GetProfileID(t, "FORBIDDENwhenDoesntOwnLock"), ClientSession: TOSession, RequestOpts: client.RequestOptions{QueryParameters: url.Values{ - "parameterId": {strconv.Itoa(GetParameterID(t, "test.cdnlock.forbidden.delete", "rascal.properties", "25.0")())}, + "parameterId": {strconv.Itoa(GetParameterID(t, "test.cdnlock.forbidden.delete", "tm.properties", "25.0")())}, }}, Expectations: utils.CkRequest(utils.HasError(), utils.HasStatus(http.StatusForbidden)), }, diff --git a/traffic_ops/testing/api/v4/profile_parameters_test.go b/traffic_ops/testing/api/v4/profile_parameters_test.go index d70ba04478..12f9a33356 100644 --- a/traffic_ops/testing/api/v4/profile_parameters_test.go +++ b/traffic_ops/testing/api/v4/profile_parameters_test.go @@ -46,8 +46,8 @@ func TestProfileParameters(t *testing.T) { "OK when VALID request": { ClientSession: TOSession, RequestOpts: client.RequestOptions{QueryParameters: url.Values{ - "profileId": {strconv.Itoa(GetProfileID(t, "RASCAL1")())}, - "parameterId": {strconv.Itoa(GetParameterID(t, "peers.polling.interval", "rascal-config.txt", "60")())}}}, + "profileId": {strconv.Itoa(GetProfileID(t, "TRAFFIC_MONITOR1")())}, + "parameterId": {strconv.Itoa(GetParameterID(t, "peers.polling.interval", "tm-config.txt", "60")())}}}, Expectations: utils.CkRequest(utils.NoError(), utils.HasStatus(http.StatusOK)), }, }, @@ -79,7 +79,7 @@ func TestProfileParameters(t *testing.T) { "BAD REQUEST when MISSING PROFILEID field": { ClientSession: TOSession, RequestBody: map[string]interface{}{ - "parameterId": GetParameterID(t, "health.threshold.queryTime", "rascal.properties", "1000")(), + "parameterId": GetParameterID(t, "health.threshold.queryTime", "tm.properties", "1000")(), }, Expectations: utils.CkRequest(utils.HasError(), utils.HasStatus(http.StatusBadRequest)), }, @@ -99,7 +99,7 @@ func TestProfileParameters(t *testing.T) { ClientSession: TOSession, RequestBody: map[string]interface{}{ "profileId": GetProfileID(t, "EDGE1")(), - "parameterId": GetParameterID(t, "health.threshold.availableBandwidthInKbps", "rascal.properties", ">1750000")(), + "parameterId": GetParameterID(t, "health.threshold.availableBandwidthInKbps", "tm.properties", ">1750000")(), }, Expectations: utils.CkRequest(utils.HasError(), utils.HasStatus(http.StatusBadRequest)), }, diff --git a/traffic_ops/testing/api/v4/profiles_test.go b/traffic_ops/testing/api/v4/profiles_test.go index d6a5c93955..ca897660bc 100644 --- a/traffic_ops/testing/api/v4/profiles_test.go +++ b/traffic_ops/testing/api/v4/profiles_test.go @@ -51,15 +51,15 @@ func TestProfiles(t *testing.T) { }, "OK when VALID NAME parameter": { ClientSession: TOSession, - RequestOpts: client.RequestOptions{QueryParameters: url.Values{"name": {"RASCAL1"}}}, + RequestOpts: client.RequestOptions{QueryParameters: url.Values{"name": {"TRAFFIC_MONITOR1"}}}, Expectations: utils.CkRequest(utils.NoError(), utils.HasStatus(http.StatusOK), utils.ResponseHasLength(1), - validateProfilesFields(map[string]interface{}{"Name": "RASCAL1"})), + validateProfilesFields(map[string]interface{}{"Name": "TRAFFIC_MONITOR1"})), }, "OK when VALID PARAM parameter": { ClientSession: TOSession, RequestOpts: client.RequestOptions{QueryParameters: url.Values{ "id": {strconv.Itoa(GetProfileID(t, "EDGE1")())}, - "param": {strconv.Itoa(GetParameterID(t, "health.threshold.loadavg", "rascal.properties", "25.0")())}, + "param": {strconv.Itoa(GetParameterID(t, "health.threshold.loadavg", "tm.properties", "25.0")())}, }}, Expectations: utils.CkRequest(utils.NoError(), utils.HasStatus(http.StatusOK), utils.ResponseLengthGreaterOrEqual(1), validateProfilesFields(map[string]interface{}{"Parameter": "health.threshold.loadavg"})), diff --git a/traffic_ops/testing/api/v4/tc-fixtures.json b/traffic_ops/testing/api/v4/tc-fixtures.json index 2013df4bcc..db98bacfd2 100644 --- a/traffic_ops/testing/api/v4/tc-fixtures.json +++ b/traffic_ops/testing/api/v4/tc-fixtures.json @@ -1906,7 +1906,7 @@ ], "parameters": [ { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "history.count", "secure": false, "value": "30" @@ -2240,13 +2240,13 @@ "value": "INT 0" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.threshold.queryTime", "secure": false, "value": "1000" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.polling.url", "secure": false, "value": "http://${hostname}/_astats?application=&inf.name=${interface_name}" @@ -2258,7 +2258,7 @@ "value": "1" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.connection.timeout", "secure": false, "value": "2000" @@ -2462,19 +2462,19 @@ "type": "ATS_PROFILE", "params": [ { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.threshold.loadavg", "secure": false, "value": "25.0" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.threshold.availableBandwidthInKbps", "secure": false, "value": ">1750000" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.threshold.queryTime", "secure": false, "value": "1000" @@ -2539,31 +2539,31 @@ }, { "cdnName": "cdn1", - "description": "rascal description", - "name": "RASCAL1", + "description": "traffic monitor description", + "name": "TRAFFIC_MONITOR1", "routing_disabled": false, "type": "TM_PROFILE", "params": [ { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.threshold.queryTime", "secure": false, "value": "1000" }, { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "health.polling.url", "secure": false, "value": "http://${hostname}/_astats?application=&inf.name=${interface_name}" }, { - "configFile": "rascal-config.txt", + "configFile": "tm-config.txt", "name": "peers.polling.interval", "secure": false, "value": "60" }, { - "configFile": "rascal-config.txt", + "configFile": "tm-config.txt", "name": "health.polling.interval", "secure": false, "value": "30" @@ -2599,7 +2599,7 @@ "type": "ATS_PROFILE", "params": [ { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "test.cdnlock.delete", "secure": false, "value": "25.0" @@ -2614,7 +2614,7 @@ "type": "ATS_PROFILE", "params": [ { - "configFile": "rascal.properties", + "configFile": "tm.properties", "name": "test.cdnlock.forbidden.delete", "secure": false, "value": "25.0" @@ -3252,7 +3252,7 @@ "cdnName": "cdn1", "domainName": "kabletown.net", "guid": null, - "hostName": "rascal01", + "hostName": "tm01", "httpsPort": 443, "iloIpAddress": "", "iloIpGateway": "", @@ -3286,12 +3286,12 @@ "mgmtIpNetmask": "", "offlineReason": null, "physLocation": "Denver", - "profileNames": ["RASCAL1"], + "profileNames": ["TRAFFIC_MONITOR1"], "rack": "RR 119.02", "revalPending": false, "status": "REPORTED", "tcpPort": 81, - "type": "RASCAL", + "type": "TRAFFIC_MONITOR", "updPending": false, "xmppId": "", "xmppPasswd": "X" @@ -6133,8 +6133,8 @@ "useInTable": "server" }, { - "description": "Traffic Monitor (Rascal)", - "name": "RASCAL", + "description": "Traffic Monitor", + "name": "TRAFFIC_MONITOR", "useInTable": "server" } ], diff --git a/traffic_ops/traffic_ops_golang/cdn/capacity.go b/traffic_ops/traffic_ops_golang/cdn/capacity.go index 95d41209f4..ca04131111 100644 --- a/traffic_ops/traffic_ops_golang/cdn/capacity.go +++ b/traffic_ops/traffic_ops_golang/cdn/capacity.go @@ -208,7 +208,7 @@ JOIN server as s ON s.profile = pr.id JOIN cdn as c ON c.id = s.cdn_id JOIN type as t ON s.type = t.id WHERE t.name LIKE 'EDGE%' -AND pa.config_file = 'rascal-config.txt' +AND pa.config_file = 'tm-config.txt' AND pa.name = 'health.threshold.availableBandwidthInKbps' `) if err != nil { diff --git a/traffic_ops/traffic_ops_golang/deliveryservice/capacity.go b/traffic_ops/traffic_ops_golang/deliveryservice/capacity.go index 7e54a0fdb3..4e9251ffba 100644 --- a/traffic_ops/traffic_ops_golang/deliveryservice/capacity.go +++ b/traffic_ops/traffic_ops_golang/deliveryservice/capacity.go @@ -249,7 +249,7 @@ JOIN server as s ON s.profile = pr.id JOIN cdn as c ON c.id = s.cdn_id JOIN type as t ON s.type = t.id WHERE t.name LIKE 'EDGE%' -AND pa.config_file = 'rascal-config.txt' +AND pa.config_file = 'tm-config.txt' AND pa.name = 'health.threshold.availableBandwidthInKbps' `) if err != nil { diff --git a/traffic_ops/traffic_ops_golang/monitoring/monitoring.go b/traffic_ops/traffic_ops_golang/monitoring/monitoring.go index d9be7e5eaa..8553ee72d5 100644 --- a/traffic_ops/traffic_ops_golang/monitoring/monitoring.go +++ b/traffic_ops/traffic_ops_golang/monitoring/monitoring.go @@ -36,11 +36,11 @@ import ( "github.com/lib/pq" ) -const CacheMonitorConfigFile = "rascal.properties" +const CacheMonitorConfigFile = "tm.properties" -const MonitorType = "RASCAL" +const MonitorType = "TRAFFIC_MONITOR" const RouterType = "CCR" -const MonitorConfigFile = "rascal-config.txt" +const MonitorConfigFile = "tm-config.txt" const KilobitsPerMegabit = 1000 const DeliveryServiceStatus = "REPORTED" From 58ec5d61334d70f69d545f1a205b0ce69c7feb38 Mon Sep 17 00:00:00 2001 From: Rima Shah Date: Thu, 8 Sep 2022 11:31:49 -0600 Subject: [PATCH 02/11] Corrected spelling mistake. --- cache-config/testing/ort-tests/tc-fixtures.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cache-config/testing/ort-tests/tc-fixtures.json b/cache-config/testing/ort-tests/tc-fixtures.json index 22b14ceb10..f3de8f658c 100644 --- a/cache-config/testing/ort-tests/tc-fixtures.json +++ b/cache-config/testing/ort-tests/tc-fixtures.json @@ -3204,7 +3204,7 @@ "routerPortName": "", "status": "ONLINE", "tcpPort": 81, - "type": "TRAFFIC_MONITORv", + "type": "TRAFFIC_MONITOR", "updPending": false, "xmppId": "", "xmppPasswd": "X" From feda012ef811500e450afd72e27f571eb8c9ae6b Mon Sep 17 00:00:00 2001 From: Rima Shah Date: Thu, 8 Sep 2022 11:33:15 -0600 Subject: [PATCH 03/11] Updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a84a14f39a..128cad63d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - [#2388](https://github.com/apache/trafficcontrol/issues/2388) *Trafic Ops, Traffic Portal* Added the `TTLOverride` field to CDNs, which lets you override all TTLs in all Delivery Services of a CDN's snapshot with a single value ### Changed +- Renamed RASCAL references to TRAFFIC_MONITOR - [#7063](https://github.com/apache/trafficcontrol/pull/7063) *Traffic Ops* Python client now uses Traffic Ops API 4.1 by default. - [#6981](https://github.com/apache/trafficcontrol/pull/6981) *Traffic Portal* Obscures sensitive text in Delivery Service "Raw Remap" fields, private SSL keys, "Header Rewrite" rules, and ILO interface passwords by default. - [#7037](https://github.com/apache/trafficcontrol/pull/7037) *Traffic Router* Uses Traffic Ops API 4.0 by default From c4dc4698c6e098025137f76eb0b1eaa723905c09 Mon Sep 17 00:00:00 2001 From: Rima Shah Date: Mon, 19 Sep 2022 12:30:47 -0600 Subject: [PATCH 04/11] Updated based on review comments. --- .../testing/ort-tests/tc-fixtures.json | 26 +++++++++---------- dev/traffic_ops/seed.psql | 16 ++++++------ .../overview/profiles_and_parameters.rst | 2 +- .../roles/dataset_loader/defaults/main.yml | 22 ++++++++-------- .../parameter.diff.exclusions.yml | 6 ++--- .../cdn-in-a-box/traffic_ops/to-access.sh | 2 +- .../profiles/010-ATS_EDGE_TIER_CACHE.json | 12 ++++----- .../profiles/020-ATS_MID_TIER_CACHE.json | 12 ++++----- ..._Monitor.json => 070-TRAFFIC_MONITOR.json} | 10 +++---- .../testing/api/v3/profile_parameters_test.go | 6 ++--- traffic_ops/testing/api/v3/tc-fixtures.json | 24 ++++++++--------- traffic_ops/testing/api/v4/cdn_locks_test.go | 4 +-- .../testing/api/v4/profile_parameters_test.go | 6 ++--- traffic_ops/testing/api/v4/profiles_test.go | 2 +- traffic_ops/testing/api/v4/tc-fixtures.json | 26 +++++++++---------- .../traffic_ops_golang/cdn/capacity.go | 2 +- .../deliveryservice/capacity.go | 2 +- .../monitoring/monitoring.go | 4 +-- .../traffic_ops_golang/server/servers.go | 6 +++++ 19 files changed, 98 insertions(+), 92 deletions(-) rename infrastructure/cdn-in-a-box/traffic_ops_data/profiles/{070-Traffic_Monitor.json => 070-TRAFFIC_MONITOR.json} (65%) diff --git a/cache-config/testing/ort-tests/tc-fixtures.json b/cache-config/testing/ort-tests/tc-fixtures.json index f3de8f658c..8c835e7c77 100644 --- a/cache-config/testing/ort-tests/tc-fixtures.json +++ b/cache-config/testing/ort-tests/tc-fixtures.json @@ -1345,21 +1345,21 @@ ], "parameters": [ { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "lastUpdated": "2018-01-19T19:01:21.455131+00:00", "name": "health.threshold.loadavg", "secure": false, "value": "25.0" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "lastUpdated": "2018-01-19T19:01:21.472279+00:00", "name": "health.threshold.availableBandwidthInKbps", "secure": false, "value": ">1750000" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "lastUpdated": "2018-01-19T19:01:21.489534+00:00", "name": "history.count", "secure": false, @@ -1681,13 +1681,13 @@ "value": "INT 0" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.threshold.queryTime", "secure": false, "value": "1000" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.polling.url", "secure": false, "value": "http://${hostname}/_astats?application=&inf.name=${interface_name}" @@ -1699,7 +1699,7 @@ "value": "1" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.connection.timeout", "secure": false, "value": "2000" @@ -2078,13 +2078,13 @@ "value": "INT 0" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.threshold.queryTime", "secure": false, "value": "1000" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.polling.url", "secure": false, "value": "http://${hostname}/_astats?application=&inf.name=${interface_name}" @@ -2096,7 +2096,7 @@ "value": "1" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.connection.timeout", "secure": false, "value": "2000" @@ -2397,26 +2397,26 @@ "type": "TM_PROFILE", "params": [ { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.threshold.queryTime", "secure": false, "value": "1000" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.polling.url", "secure": false, "value": "http://${hostname}/_astats?application=&inf.name=${interface_name}" }, { - "configFile": "tm-config.txt", + "configFile": "traffic_monitor-config.txt", "lastUpdated": "2018-01-19T19:01:21.472279+00:00", "name": "peers.polling.interval", "secure": false, "value": "60" }, { - "configFile": "tm-config.txt", + "configFile": "traffic_monitor-config.txt", "lastUpdated": "2018-01-19T19:01:21.472279+00:00", "name": "health.polling.interval", "secure": false, diff --git a/dev/traffic_ops/seed.psql b/dev/traffic_ops/seed.psql index 400d85ca92..983021ba2b 100644 --- a/dev/traffic_ops/seed.psql +++ b/dev/traffic_ops/seed.psql @@ -79,27 +79,27 @@ INSERT INTO parameter ( "name", "value" ) VALUES ( - 'tm-config.txt', + 'traffic_monitor-config.txt', 'health.polling.interval', '6000' ), ( - 'tm-config.txt', + 'traffic_monitor-config.txt', 'heartbeat.polling.interval', '3000' ), ( - 'tm-config.txt', + 'traffic_monitor-config.txt', 'peers.polling.interval', '3000' ), ( - 'tm-config.txt', + 'traffic_monitor-config.txt', 'tm.polling.interval', '2000' ), ( - 'tm.properties', + 'traffic_monitor.properties', 'health.polling.url', 'http://edge:8080/_stats?application=&inf.name=${interface_name}' ), ( - 'tm.properties', + 'traffic_monitor.properties', 'health.polling.format', 'stats_over_http' ), ( @@ -120,7 +120,7 @@ ON CONFLICT DO NOTHING; INSERT INTO profile_parameter SELECT profile.id, parameter.id FROM profile, parameter -WHERE parameter.config_file = 'tm-config.txt' +WHERE parameter.config_file = 'traffic_monitor-config.txt' AND parameter."name" LIKE '%.polling.%' AND profile."name" = 'TM_dev' ON CONFLICT DO NOTHING; @@ -128,7 +128,7 @@ ON CONFLICT DO NOTHING; INSERT INTO profile_parameter SELECT profile.id, parameter.id FROM profile, parameter -WHERE parameter.config_file = 'tm.properties' +WHERE parameter.config_file = 'traffic_monitor.properties' AND profile."name" = 'EDGE_dev' ON CONFLICT DO NOTHING; diff --git a/docs/source/overview/profiles_and_parameters.rst b/docs/source/overview/profiles_and_parameters.rst index 09153d43e0..edd337086f 100644 --- a/docs/source/overview/profiles_and_parameters.rst +++ b/docs/source/overview/profiles_and_parameters.rst @@ -497,7 +497,7 @@ For each Parameter with this Config File value on the same :ref:`Profile ` are all configuration options for Traffic Monitor. The :ref:`Names ` with meaning are as follows. diff --git a/infrastructure/ansible/roles/dataset_loader/defaults/main.yml b/infrastructure/ansible/roles/dataset_loader/defaults/main.yml index 189b515acf..72a0fba1c5 100644 --- a/infrastructure/ansible/roles/dataset_loader/defaults/main.yml +++ b/infrastructure/ansible/roles/dataset_loader/defaults/main.yml @@ -937,22 +937,22 @@ dl_ds_default_profile_layers: configFile: plugin.config value: "--disable-timed-updates --config regex_revalidate.config" - name: health.connection.timeout - configFile: tm.properties + configFile: traffic_monitor.properties value: '2000' - name: health.polling.url - configFile: tm.properties + configFile: traffic_monitor.properties value: http://${hostname}/_astats?application=&inf.name=${interface_name} - name: health.threshold.kbps - configFile: tm.properties + configFile: traffic_monitor.properties value: "<{{ ((Target_hardware_profile.value.network_bandwidth_limit | default('1000') | float - (Target_hardware_profile.value.network_bandwidth_limit | default('1000') | float * ((100 - dl_ds_reserved_bandwidth_percentage | float) / 100))) | int) * 1000 }}" - name: health.threshold.loadavg - configFile: tm.properties + configFile: traffic_monitor.properties value: "{{ Target_hardware_profile.value.load_avg_limit | default('10') }}.0" - name: health.threshold.queryTime - configFile: tm.properties + configFile: traffic_monitor.properties value: '1500' - name: history.count - configFile: tm.properties + configFile: traffic_monitor.properties value: '30' - name: CONFIG proxy.config.allocator.dontdump_iobuffers configFile: records.config @@ -1309,19 +1309,19 @@ dl_ds_default_profile_cdntemplates: routingDisabled: false parameters: - name: health.polling.interval - configFile: tm-config.txt + configFile: traffic_monitor-config.txt value: '6000' secure: 0 - name: heartbeat.polling.interval - configFile: tm-config.txt + configFile: traffic_monitor-config.txt value: '2000' secure: 0 - name: peers.polling.interval - configFile: tm-config.txt + configFile: traffic_monitor-config.txt value: '1000' secure: 0 - name: tm.polling.interval - configFile: tm-config.txt + configFile: traffic_monitor-config.txt value: '60000' secure: 0 - name: "CCR_{{ Target_cdn_delegation }}" @@ -1660,7 +1660,7 @@ dl_ds_default_profile_cdntemplates: configFile: parent.config value: 'true' - name: health.polling.url - configFile: tm.properties + configFile: traffic_monitor.properties value: http://${hostname}/_astats?application=&inf.name=${interface_name} - name: "EDGE_ATS_7_{{ Target_cdn_delegation }}" description: "Edge cache({{ Target_cdn_delegation }}) - ATS 7" diff --git a/infrastructure/ansible/roles/dataset_loader/parameter.diff.exclusions.yml b/infrastructure/ansible/roles/dataset_loader/parameter.diff.exclusions.yml index 3296ad708b..70e527d21c 100644 --- a/infrastructure/ansible/roles/dataset_loader/parameter.diff.exclusions.yml +++ b/infrastructure/ansible/roles/dataset_loader/parameter.diff.exclusions.yml @@ -25,9 +25,9 @@ parameter_diff_exclusions: name: Drive_Letters - configFile: storage.config name: Drive_Prefix - - configFile: tm.properties + - configFile: traffic_monitor.properties name: health.threshold.kbps - - configFile: tm.properties + - configFile: traffic_monitor.properties name: health.threshold.loadavg - configFile: ip_allow.config name: purge_allow_ip @@ -41,7 +41,7 @@ parameter_diff_exclusions: name: trafficserver - configFile: records.config name: CONFIG proxy.config.http.referer_default_redirect - - configFile: tm.properties + - configFile: traffic_monitor.properties name: health.threshold.availableBandwidthInKbps - configFile: package name: jemalloc- diff --git a/infrastructure/cdn-in-a-box/traffic_ops/to-access.sh b/infrastructure/cdn-in-a-box/traffic_ops/to-access.sh index a7167522c5..b4e795ad87 100755 --- a/infrastructure/cdn-in-a-box/traffic_ops/to-access.sh +++ b/infrastructure/cdn-in-a-box/traffic_ops/to-access.sh @@ -226,7 +226,7 @@ to-enroll() { ;; "tm" ) export MY_TYPE="TRAFFIC_MONITOR" - export MY_PROFILE="Traffic_Monitor" + export MY_PROFILE="TRAFFIC_MONITOR" export MY_STATUS="ONLINE" ;; "to" ) diff --git a/infrastructure/cdn-in-a-box/traffic_ops_data/profiles/010-ATS_EDGE_TIER_CACHE.json b/infrastructure/cdn-in-a-box/traffic_ops_data/profiles/010-ATS_EDGE_TIER_CACHE.json index ab722201e3..6424cfae08 100644 --- a/infrastructure/cdn-in-a-box/traffic_ops_data/profiles/010-ATS_EDGE_TIER_CACHE.json +++ b/infrastructure/cdn-in-a-box/traffic_ops_data/profiles/010-ATS_EDGE_TIER_CACHE.json @@ -132,31 +132,31 @@ "value": "INT 0" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.threshold.loadavg", "secure": false, "value": "25.0" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.threshold.availableBandwidthInKbps", "secure": false, "value": ">1750000" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "history.count", "secure": false, "value": "30" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.threshold.queryTime", "secure": false, "value": "1000" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.polling.url", "secure": false, "value": "http://${hostname}/_astats?application=&inf.name=${interface_name}" @@ -168,7 +168,7 @@ "value": "1" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.connection.timeout", "secure": false, "value": "2000" diff --git a/infrastructure/cdn-in-a-box/traffic_ops_data/profiles/020-ATS_MID_TIER_CACHE.json b/infrastructure/cdn-in-a-box/traffic_ops_data/profiles/020-ATS_MID_TIER_CACHE.json index 9cdffc848e..bde571a221 100644 --- a/infrastructure/cdn-in-a-box/traffic_ops_data/profiles/020-ATS_MID_TIER_CACHE.json +++ b/infrastructure/cdn-in-a-box/traffic_ops_data/profiles/020-ATS_MID_TIER_CACHE.json @@ -132,31 +132,31 @@ "value": "INT 0" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.threshold.loadavg", "secure": false, "value": "25.0" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.threshold.availableBandwidthInKbps", "secure": false, "value": ">1750000" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "history.count", "secure": false, "value": "30" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.threshold.queryTime", "secure": false, "value": "1000" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.polling.url", "secure": false, "value": "http://${hostname}/_astats?application=&inf.name=${interface_name}" @@ -168,7 +168,7 @@ "value": "1" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.connection.timeout", "secure": false, "value": "2000" diff --git a/infrastructure/cdn-in-a-box/traffic_ops_data/profiles/070-Traffic_Monitor.json b/infrastructure/cdn-in-a-box/traffic_ops_data/profiles/070-TRAFFIC_MONITOR.json similarity index 65% rename from infrastructure/cdn-in-a-box/traffic_ops_data/profiles/070-Traffic_Monitor.json rename to infrastructure/cdn-in-a-box/traffic_ops_data/profiles/070-TRAFFIC_MONITOR.json index a80b6bea36..5090ed73a0 100644 --- a/infrastructure/cdn-in-a-box/traffic_ops_data/profiles/070-Traffic_Monitor.json +++ b/infrastructure/cdn-in-a-box/traffic_ops_data/profiles/070-TRAFFIC_MONITOR.json @@ -1,26 +1,26 @@ { "cdnName": "$CDN_NAME", "description": "Traffic Monitor for CDN-in-a-Box", - "name": "Traffic_Monitor", + "name": "TRAFFIC_MONITOR", "type": "TM_PROFILE", "params": [ { - "configFile": "tm-config.txt", + "configFile": "traffic_monitor-config.txt", "name": "health.polling.interval", "value": "6000" }, { - "configFile": "tm-config.txt", + "configFile": "traffic_monitor-config.txt", "name": "heartbeat.polling.interval", "value": "3000" }, { - "configFile": "tm-config.txt", + "configFile": "traffic_monitor-config.txt", "name": "peers.polling.interval", "value": "3000" }, { - "configFile": "tm-config.txt", + "configFile": "traffic_monitor-config.txt", "name": "tm.polling.interval", "value": "2000" } diff --git a/traffic_ops/testing/api/v3/profile_parameters_test.go b/traffic_ops/testing/api/v3/profile_parameters_test.go index 0ed55f4ecf..1dc360bf0a 100644 --- a/traffic_ops/testing/api/v3/profile_parameters_test.go +++ b/traffic_ops/testing/api/v3/profile_parameters_test.go @@ -48,7 +48,7 @@ func TestProfileParameters(t *testing.T) { ClientSession: TOSession, RequestParams: url.Values{ "profileId": {strconv.Itoa(GetProfileID(t, "TRAFFIC_MONITOR1")())}, - "parameterId": {strconv.Itoa(GetParameterID(t, "peers.polling.interval", "tm-config.txt", "60")())}}, + "parameterId": {strconv.Itoa(GetParameterID(t, "peers.polling.interval", "traffic_monitor-config.txt", "60")())}}, Expectations: utils.CkRequest(utils.NoError(), utils.HasStatus(http.StatusOK)), }, }, @@ -78,7 +78,7 @@ func TestProfileParameters(t *testing.T) { "BAD REQUEST when MISSING PROFILEID field": { ClientSession: TOSession, RequestBody: []tc.ProfileParameter{{ - ParameterID: GetParameterID(t, "health.threshold.queryTime", "tm.properties", "1000")(), + ParameterID: GetParameterID(t, "health.threshold.queryTime", "traffic_monitor.properties", "1000")(), }}, Expectations: utils.CkRequest(utils.HasError(), utils.HasStatus(http.StatusBadRequest)), }, @@ -98,7 +98,7 @@ func TestProfileParameters(t *testing.T) { ClientSession: TOSession, RequestBody: []tc.ProfileParameter{{ ProfileID: GetProfileID(t, "EDGE1")(), - ParameterID: GetParameterID(t, "health.threshold.availableBandwidthInKbps", "tm.properties", ">1750000")(), + ParameterID: GetParameterID(t, "health.threshold.availableBandwidthInKbps", "traffic_monitor.properties", ">1750000")(), }}, Expectations: utils.CkRequest(utils.HasError(), utils.HasStatus(http.StatusBadRequest)), }, diff --git a/traffic_ops/testing/api/v3/tc-fixtures.json b/traffic_ops/testing/api/v3/tc-fixtures.json index 95241e40c0..5240c8e0ad 100644 --- a/traffic_ops/testing/api/v3/tc-fixtures.json +++ b/traffic_ops/testing/api/v3/tc-fixtures.json @@ -1697,7 +1697,7 @@ ], "parameters": [ { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "lastUpdated": "2018-01-19T19:01:21.489534+00:00", "name": "history.count", "secure": false, @@ -2063,13 +2063,13 @@ "value": "INT 0" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.threshold.queryTime", "secure": false, "value": "1000" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.polling.url", "secure": false, "value": "http://${hostname}/_astats?application=&inf.name=${interface_name}" @@ -2081,7 +2081,7 @@ "value": "1" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.connection.timeout", "secure": false, "value": "2000" @@ -2286,19 +2286,19 @@ "type": "ATS_PROFILE", "params": [ { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.threshold.loadavg", "secure": false, "value": "25.0" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.threshold.availableBandwidthInKbps", "secure": false, "value": ">1750000" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.threshold.queryTime", "secure": false, "value": "1000" @@ -2370,33 +2370,33 @@ }, { "cdnName": "cdn1", - "description": "tm description", + "description": "traffic_monitor description", "lastUpdated": "2018-03-02T17:27:11.813052+00:00", "name": "TRAFFIC_MONITOR1", "routing_disabled": false, "type": "TM_PROFILE", "params": [ { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.threshold.queryTime", "secure": false, "value": "1000" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.polling.url", "secure": false, "value": "http://${hostname}/_astats?application=&inf.name=${interface_name}" }, { - "configFile": "tm-config.txt", + "configFile": "traffic_monitor-config.txt", "lastUpdated": "2018-01-19T19:01:21.472279+00:00", "name": "peers.polling.interval", "secure": false, "value": "60" }, { - "configFile": "tm-config.txt", + "configFile": "traffic_monitor-config.txt", "lastUpdated": "2018-01-19T19:01:21.472279+00:00", "name": "health.polling.interval", "secure": false, diff --git a/traffic_ops/testing/api/v4/cdn_locks_test.go b/traffic_ops/testing/api/v4/cdn_locks_test.go index 10be8fae79..505b24275b 100644 --- a/traffic_ops/testing/api/v4/cdn_locks_test.go +++ b/traffic_ops/testing/api/v4/cdn_locks_test.go @@ -342,7 +342,7 @@ func TestCDNLocks(t *testing.T) { EndpointId: GetProfileID(t, "OKwhenUserOwnLocks"), ClientSession: opsUserWithLockSession, RequestOpts: client.RequestOptions{QueryParameters: url.Values{ - "parameterId": {strconv.Itoa(GetParameterID(t, "test.cdnlock.delete", "tm.properties", "25.0")())}, + "parameterId": {strconv.Itoa(GetParameterID(t, "test.cdnlock.delete", "traffic_monitor.properties", "25.0")())}, }}, Expectations: utils.CkRequest(utils.NoError(), utils.HasStatus(http.StatusOK)), }, @@ -350,7 +350,7 @@ func TestCDNLocks(t *testing.T) { EndpointId: GetProfileID(t, "FORBIDDENwhenDoesntOwnLock"), ClientSession: TOSession, RequestOpts: client.RequestOptions{QueryParameters: url.Values{ - "parameterId": {strconv.Itoa(GetParameterID(t, "test.cdnlock.forbidden.delete", "tm.properties", "25.0")())}, + "parameterId": {strconv.Itoa(GetParameterID(t, "test.cdnlock.forbidden.delete", "traffic_monitor.properties", "25.0")())}, }}, Expectations: utils.CkRequest(utils.HasError(), utils.HasStatus(http.StatusForbidden)), }, diff --git a/traffic_ops/testing/api/v4/profile_parameters_test.go b/traffic_ops/testing/api/v4/profile_parameters_test.go index 12f9a33356..152aa75e7f 100644 --- a/traffic_ops/testing/api/v4/profile_parameters_test.go +++ b/traffic_ops/testing/api/v4/profile_parameters_test.go @@ -47,7 +47,7 @@ func TestProfileParameters(t *testing.T) { ClientSession: TOSession, RequestOpts: client.RequestOptions{QueryParameters: url.Values{ "profileId": {strconv.Itoa(GetProfileID(t, "TRAFFIC_MONITOR1")())}, - "parameterId": {strconv.Itoa(GetParameterID(t, "peers.polling.interval", "tm-config.txt", "60")())}}}, + "parameterId": {strconv.Itoa(GetParameterID(t, "peers.polling.interval", "traffic_monitor-config.txt", "60")())}}}, Expectations: utils.CkRequest(utils.NoError(), utils.HasStatus(http.StatusOK)), }, }, @@ -79,7 +79,7 @@ func TestProfileParameters(t *testing.T) { "BAD REQUEST when MISSING PROFILEID field": { ClientSession: TOSession, RequestBody: map[string]interface{}{ - "parameterId": GetParameterID(t, "health.threshold.queryTime", "tm.properties", "1000")(), + "parameterId": GetParameterID(t, "health.threshold.queryTime", "traffic_monitor.properties", "1000")(), }, Expectations: utils.CkRequest(utils.HasError(), utils.HasStatus(http.StatusBadRequest)), }, @@ -99,7 +99,7 @@ func TestProfileParameters(t *testing.T) { ClientSession: TOSession, RequestBody: map[string]interface{}{ "profileId": GetProfileID(t, "EDGE1")(), - "parameterId": GetParameterID(t, "health.threshold.availableBandwidthInKbps", "tm.properties", ">1750000")(), + "parameterId": GetParameterID(t, "health.threshold.availableBandwidthInKbps", "traffic_monitor.properties", ">1750000")(), }, Expectations: utils.CkRequest(utils.HasError(), utils.HasStatus(http.StatusBadRequest)), }, diff --git a/traffic_ops/testing/api/v4/profiles_test.go b/traffic_ops/testing/api/v4/profiles_test.go index ca897660bc..b2bec0f709 100644 --- a/traffic_ops/testing/api/v4/profiles_test.go +++ b/traffic_ops/testing/api/v4/profiles_test.go @@ -59,7 +59,7 @@ func TestProfiles(t *testing.T) { ClientSession: TOSession, RequestOpts: client.RequestOptions{QueryParameters: url.Values{ "id": {strconv.Itoa(GetProfileID(t, "EDGE1")())}, - "param": {strconv.Itoa(GetParameterID(t, "health.threshold.loadavg", "tm.properties", "25.0")())}, + "param": {strconv.Itoa(GetParameterID(t, "health.threshold.loadavg", "traffic_monitor.properties", "25.0")())}, }}, Expectations: utils.CkRequest(utils.NoError(), utils.HasStatus(http.StatusOK), utils.ResponseLengthGreaterOrEqual(1), validateProfilesFields(map[string]interface{}{"Parameter": "health.threshold.loadavg"})), diff --git a/traffic_ops/testing/api/v4/tc-fixtures.json b/traffic_ops/testing/api/v4/tc-fixtures.json index db98bacfd2..49c23a60cb 100644 --- a/traffic_ops/testing/api/v4/tc-fixtures.json +++ b/traffic_ops/testing/api/v4/tc-fixtures.json @@ -1906,7 +1906,7 @@ ], "parameters": [ { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "history.count", "secure": false, "value": "30" @@ -2240,13 +2240,13 @@ "value": "INT 0" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.threshold.queryTime", "secure": false, "value": "1000" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.polling.url", "secure": false, "value": "http://${hostname}/_astats?application=&inf.name=${interface_name}" @@ -2258,7 +2258,7 @@ "value": "1" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.connection.timeout", "secure": false, "value": "2000" @@ -2462,19 +2462,19 @@ "type": "ATS_PROFILE", "params": [ { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.threshold.loadavg", "secure": false, "value": "25.0" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.threshold.availableBandwidthInKbps", "secure": false, "value": ">1750000" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.threshold.queryTime", "secure": false, "value": "1000" @@ -2545,25 +2545,25 @@ "type": "TM_PROFILE", "params": [ { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.threshold.queryTime", "secure": false, "value": "1000" }, { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "health.polling.url", "secure": false, "value": "http://${hostname}/_astats?application=&inf.name=${interface_name}" }, { - "configFile": "tm-config.txt", + "configFile": "traffic_monitor-config.txt", "name": "peers.polling.interval", "secure": false, "value": "60" }, { - "configFile": "tm-config.txt", + "configFile": "traffic_monitor-config.txt", "name": "health.polling.interval", "secure": false, "value": "30" @@ -2599,7 +2599,7 @@ "type": "ATS_PROFILE", "params": [ { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "test.cdnlock.delete", "secure": false, "value": "25.0" @@ -2614,7 +2614,7 @@ "type": "ATS_PROFILE", "params": [ { - "configFile": "tm.properties", + "configFile": "traffic_monitor.properties", "name": "test.cdnlock.forbidden.delete", "secure": false, "value": "25.0" diff --git a/traffic_ops/traffic_ops_golang/cdn/capacity.go b/traffic_ops/traffic_ops_golang/cdn/capacity.go index ca04131111..7ef0978134 100644 --- a/traffic_ops/traffic_ops_golang/cdn/capacity.go +++ b/traffic_ops/traffic_ops_golang/cdn/capacity.go @@ -208,7 +208,7 @@ JOIN server as s ON s.profile = pr.id JOIN cdn as c ON c.id = s.cdn_id JOIN type as t ON s.type = t.id WHERE t.name LIKE 'EDGE%' -AND pa.config_file = 'tm-config.txt' +AND pa.config_file = 'traffic_monitor-config.txt' AND pa.name = 'health.threshold.availableBandwidthInKbps' `) if err != nil { diff --git a/traffic_ops/traffic_ops_golang/deliveryservice/capacity.go b/traffic_ops/traffic_ops_golang/deliveryservice/capacity.go index 4e9251ffba..3b95f83567 100644 --- a/traffic_ops/traffic_ops_golang/deliveryservice/capacity.go +++ b/traffic_ops/traffic_ops_golang/deliveryservice/capacity.go @@ -249,7 +249,7 @@ JOIN server as s ON s.profile = pr.id JOIN cdn as c ON c.id = s.cdn_id JOIN type as t ON s.type = t.id WHERE t.name LIKE 'EDGE%' -AND pa.config_file = 'tm-config.txt' +AND pa.config_file = 'traffic_monitor-config.txt' AND pa.name = 'health.threshold.availableBandwidthInKbps' `) if err != nil { diff --git a/traffic_ops/traffic_ops_golang/monitoring/monitoring.go b/traffic_ops/traffic_ops_golang/monitoring/monitoring.go index 8553ee72d5..92c2028b3e 100644 --- a/traffic_ops/traffic_ops_golang/monitoring/monitoring.go +++ b/traffic_ops/traffic_ops_golang/monitoring/monitoring.go @@ -36,11 +36,11 @@ import ( "github.com/lib/pq" ) -const CacheMonitorConfigFile = "tm.properties" +const CacheMonitorConfigFile = "traffic_monitor.properties" const MonitorType = "TRAFFIC_MONITOR" const RouterType = "CCR" -const MonitorConfigFile = "tm-config.txt" +const MonitorConfigFile = "traffic_monitor-config.txt" const KilobitsPerMegabit = 1000 const DeliveryServiceStatus = "REPORTED" diff --git a/traffic_ops/traffic_ops_golang/server/servers.go b/traffic_ops/traffic_ops_golang/server/servers.go index f1a827a278..8d34ba20e3 100644 --- a/traffic_ops/traffic_ops_golang/server/servers.go +++ b/traffic_ops/traffic_ops_golang/server/servers.go @@ -849,6 +849,12 @@ func getServers(h http.Header, params map[string]string, tx *sqlx.Tx, user *auth ` } + if version.Major >= 5 { + if params["type"] == "RASCAL" { + params["type"] = "TRAFFIC_MONITOR" + } + } + where, orderBy, pagination, queryValues, errs := dbhelpers.BuildWhereAndOrderByAndPagination(params, queryParamsToSQLCols) if dsHasRequiredCapabilities { where += requiredCapabilitiesCondition From 0f411875794eb852889d35197164f7c282fd944a Mon Sep 17 00:00:00 2001 From: Rima Shah Date: Mon, 19 Sep 2022 14:23:31 -0600 Subject: [PATCH 05/11] Update APIv5 --- .../api/v3/cdns_name_configs_monitoring.rst | 2 +- docs/source/api/v3/cdns_name_snapshot.rst | 2 +- docs/source/api/v3/cdns_name_snapshot_new.rst | 2 +- .../api/v4/cdns_name_configs_monitoring.rst | 2 +- docs/source/api/v4/cdns_name_snapshot.rst | 2 +- docs/source/api/v4/cdns_name_snapshot_new.rst | 2 +- .../api/v5/cdns_name_configs_monitoring.rst | 2 +- docs/source/api/v5/cdns_name_snapshot.rst | 2 +- docs/source/api/v5/cdns_name_snapshot_new.rst | 2 +- .../testing/api/v5/profile_parameters_test.go | 8 ++-- traffic_ops/testing/api/v5/profiles_test.go | 6 +-- traffic_ops/testing/api/v5/tc-fixtures.json | 40 +++++++++---------- 12 files changed, 36 insertions(+), 36 deletions(-) diff --git a/docs/source/api/v3/cdns_name_configs_monitoring.rst b/docs/source/api/v3/cdns_name_configs_monitoring.rst index f87b8f5225..1ab5bef345 100644 --- a/docs/source/api/v3/cdns_name_configs_monitoring.rst +++ b/docs/source/api/v3/cdns_name_configs_monitoring.rst @@ -215,7 +215,7 @@ Response Structure ], "trafficMonitors": [ { - "profile": "Traffic_Monitor", + "profile": "TRAFFIC_MONITOR", "status": "ONLINE", "ip": "172.16.239.40", "ip6": "fc01:9400:1000:8::40", diff --git a/docs/source/api/v3/cdns_name_snapshot.rst b/docs/source/api/v3/cdns_name_snapshot.rst index ee3ad22119..45ee13aabd 100644 --- a/docs/source/api/v3/cdns_name_snapshot.rst +++ b/docs/source/api/v3/cdns_name_snapshot.rst @@ -536,7 +536,7 @@ Response Structure "ip6": "", "location": "CDN_in_a_Box_Edge", "port": 80, - "profile": "Traffic_Monitor", + "profile": "TRAFFIC_MONITOR", "status": "ONLINE" } }, diff --git a/docs/source/api/v3/cdns_name_snapshot_new.rst b/docs/source/api/v3/cdns_name_snapshot_new.rst index 28f982a688..06d748f729 100644 --- a/docs/source/api/v3/cdns_name_snapshot_new.rst +++ b/docs/source/api/v3/cdns_name_snapshot_new.rst @@ -552,7 +552,7 @@ Response Structure "ip6": "", "location": "CDN_in_a_Box_Edge", "port": 80, - "profile": "Traffic_Monitor", + "profile": "TRAFFIC_MONITOR", "status": "ONLINE" } }, diff --git a/docs/source/api/v4/cdns_name_configs_monitoring.rst b/docs/source/api/v4/cdns_name_configs_monitoring.rst index 25a80d3e07..7973226a0c 100644 --- a/docs/source/api/v4/cdns_name_configs_monitoring.rst +++ b/docs/source/api/v4/cdns_name_configs_monitoring.rst @@ -216,7 +216,7 @@ Response Structure ], "trafficMonitors": [ { - "profile": "Traffic_Monitor", + "profile": "TRAFFIC_MONITOR", "status": "ONLINE", "ip": "172.16.239.40", "ip6": "fc01:9400:1000:8::40", diff --git a/docs/source/api/v4/cdns_name_snapshot.rst b/docs/source/api/v4/cdns_name_snapshot.rst index fbfb75f19f..f1ce4f2b2e 100644 --- a/docs/source/api/v4/cdns_name_snapshot.rst +++ b/docs/source/api/v4/cdns_name_snapshot.rst @@ -533,7 +533,7 @@ Response Structure "ip6": "", "location": "CDN_in_a_Box_Edge", "port": 80, - "profile": "Traffic_Monitor", + "profile": "TRAFFIC_MONITOR", "status": "ONLINE" } }, diff --git a/docs/source/api/v4/cdns_name_snapshot_new.rst b/docs/source/api/v4/cdns_name_snapshot_new.rst index b8538d249a..77a1699037 100644 --- a/docs/source/api/v4/cdns_name_snapshot_new.rst +++ b/docs/source/api/v4/cdns_name_snapshot_new.rst @@ -547,7 +547,7 @@ Response Structure "ip6": "", "location": "CDN_in_a_Box_Edge", "port": 80, - "profile": "Traffic_Monitor", + "profile": "TRAFFIC_MONITOR", "status": "ONLINE" } }, diff --git a/docs/source/api/v5/cdns_name_configs_monitoring.rst b/docs/source/api/v5/cdns_name_configs_monitoring.rst index 552be5f98c..6503ffc321 100644 --- a/docs/source/api/v5/cdns_name_configs_monitoring.rst +++ b/docs/source/api/v5/cdns_name_configs_monitoring.rst @@ -216,7 +216,7 @@ Response Structure ], "trafficMonitors": [ { - "profile": "RASCAL-Traffic_Monitor", + "profile": "TRAFFIC_MONITOR", "status": "ONLINE", "ip": "172.16.239.40", "ip6": "fc01:9400:1000:8::40", diff --git a/docs/source/api/v5/cdns_name_snapshot.rst b/docs/source/api/v5/cdns_name_snapshot.rst index ebd0b5786e..bf6e99a7dd 100644 --- a/docs/source/api/v5/cdns_name_snapshot.rst +++ b/docs/source/api/v5/cdns_name_snapshot.rst @@ -533,7 +533,7 @@ Response Structure "ip6": "", "location": "CDN_in_a_Box_Edge", "port": 80, - "profile": "RASCAL-Traffic_Monitor", + "profile": "TRAFFIC_MONITOR", "status": "ONLINE" } }, diff --git a/docs/source/api/v5/cdns_name_snapshot_new.rst b/docs/source/api/v5/cdns_name_snapshot_new.rst index 3f94f22761..7cd573ca18 100644 --- a/docs/source/api/v5/cdns_name_snapshot_new.rst +++ b/docs/source/api/v5/cdns_name_snapshot_new.rst @@ -547,7 +547,7 @@ Response Structure "ip6": "", "location": "CDN_in_a_Box_Edge", "port": 80, - "profile": "RASCAL-Traffic_Monitor", + "profile": "TRAFFIC_MONITOR", "status": "ONLINE" } }, diff --git a/traffic_ops/testing/api/v5/profile_parameters_test.go b/traffic_ops/testing/api/v5/profile_parameters_test.go index 5c25c8f5b5..088e10ceaf 100644 --- a/traffic_ops/testing/api/v5/profile_parameters_test.go +++ b/traffic_ops/testing/api/v5/profile_parameters_test.go @@ -46,8 +46,8 @@ func TestProfileParameters(t *testing.T) { "OK when VALID request": { ClientSession: TOSession, RequestOpts: client.RequestOptions{QueryParameters: url.Values{ - "profileId": {strconv.Itoa(GetProfileID(t, "RASCAL1")())}, - "parameterId": {strconv.Itoa(GetParameterID(t, "peers.polling.interval", "rascal-config.txt", "60")())}}}, + "profileId": {strconv.Itoa(GetProfileID(t, "TRAFFIC_MONITOR1")())}, + "parameterId": {strconv.Itoa(GetParameterID(t, "peers.polling.interval", "traffic_monitor-config.txt", "60")())}}}, Expectations: utils.CkRequest(utils.NoError(), utils.HasStatus(http.StatusOK)), }, }, @@ -79,7 +79,7 @@ func TestProfileParameters(t *testing.T) { "BAD REQUEST when MISSING PROFILEID field": { ClientSession: TOSession, RequestBody: map[string]interface{}{ - "parameterId": GetParameterID(t, "health.threshold.queryTime", "rascal.properties", "1000")(), + "parameterId": GetParameterID(t, "health.threshold.queryTime", "traffic_monitor.properties", "1000")(), }, Expectations: utils.CkRequest(utils.HasError(), utils.HasStatus(http.StatusBadRequest)), }, @@ -99,7 +99,7 @@ func TestProfileParameters(t *testing.T) { ClientSession: TOSession, RequestBody: map[string]interface{}{ "profileId": GetProfileID(t, "EDGE1")(), - "parameterId": GetParameterID(t, "health.threshold.availableBandwidthInKbps", "rascal.properties", ">1750000")(), + "parameterId": GetParameterID(t, "health.threshold.availableBandwidthInKbps", "traffic_monitor.properties", ">1750000")(), }, Expectations: utils.CkRequest(utils.HasError(), utils.HasStatus(http.StatusBadRequest)), }, diff --git a/traffic_ops/testing/api/v5/profiles_test.go b/traffic_ops/testing/api/v5/profiles_test.go index b015ce066e..0e4a3e4ca6 100644 --- a/traffic_ops/testing/api/v5/profiles_test.go +++ b/traffic_ops/testing/api/v5/profiles_test.go @@ -51,15 +51,15 @@ func TestProfiles(t *testing.T) { }, "OK when VALID NAME parameter": { ClientSession: TOSession, - RequestOpts: client.RequestOptions{QueryParameters: url.Values{"name": {"RASCAL1"}}}, + RequestOpts: client.RequestOptions{QueryParameters: url.Values{"name": {"TRAFFIC_MONITOR1"}}}, Expectations: utils.CkRequest(utils.NoError(), utils.HasStatus(http.StatusOK), utils.ResponseHasLength(1), - validateProfilesFields(map[string]interface{}{"Name": "RASCAL1"})), + validateProfilesFields(map[string]interface{}{"Name": "TRAFFIC_MONITOR1"})), }, "OK when VALID PARAM parameter": { ClientSession: TOSession, RequestOpts: client.RequestOptions{QueryParameters: url.Values{ "id": {strconv.Itoa(GetProfileID(t, "EDGE1")())}, - "param": {strconv.Itoa(GetParameterID(t, "health.threshold.loadavg", "rascal.properties", "25.0")())}, + "param": {strconv.Itoa(GetParameterID(t, "health.threshold.loadavg", "traffic_monitor.properties", "25.0")())}, }}, Expectations: utils.CkRequest(utils.NoError(), utils.HasStatus(http.StatusOK), utils.ResponseLengthGreaterOrEqual(1), validateProfilesFields(map[string]interface{}{"Parameter": "health.threshold.loadavg"})), diff --git a/traffic_ops/testing/api/v5/tc-fixtures.json b/traffic_ops/testing/api/v5/tc-fixtures.json index 8f34bb26fc..c3d5a9803f 100644 --- a/traffic_ops/testing/api/v5/tc-fixtures.json +++ b/traffic_ops/testing/api/v5/tc-fixtures.json @@ -1906,7 +1906,7 @@ ], "parameters": [ { - "configFile": "rascal.properties", + "configFile": "traffic_monitor.properties", "name": "history.count", "secure": false, "value": "30" @@ -2240,13 +2240,13 @@ "value": "INT 0" }, { - "configFile": "rascal.properties", + "configFile": "traffic_monitor.properties", "name": "health.threshold.queryTime", "secure": false, "value": "1000" }, { - "configFile": "rascal.properties", + "configFile": "traffic_monitor.properties", "name": "health.polling.url", "secure": false, "value": "http://${hostname}/_astats?application=&inf.name=${interface_name}" @@ -2258,7 +2258,7 @@ "value": "1" }, { - "configFile": "rascal.properties", + "configFile": "traffic_monitor.properties", "name": "health.connection.timeout", "secure": false, "value": "2000" @@ -2462,19 +2462,19 @@ "type": "ATS_PROFILE", "params": [ { - "configFile": "rascal.properties", + "configFile": "traffic_monitor.properties", "name": "health.threshold.loadavg", "secure": false, "value": "25.0" }, { - "configFile": "rascal.properties", + "configFile": "traffic_monitor.properties", "name": "health.threshold.availableBandwidthInKbps", "secure": false, "value": ">1750000" }, { - "configFile": "rascal.properties", + "configFile": "traffic_monitor.properties", "name": "health.threshold.queryTime", "secure": false, "value": "1000" @@ -2539,31 +2539,31 @@ }, { "cdnName": "cdn1", - "description": "rascal description", - "name": "RASCAL1", + "description": "Traffic Monitor description", + "name": "TRAFFIC_MONITOR1", "routing_disabled": false, "type": "TM_PROFILE", "params": [ { - "configFile": "rascal.properties", + "configFile": "traffic_monitor.properties", "name": "health.threshold.queryTime", "secure": false, "value": "1000" }, { - "configFile": "rascal.properties", + "configFile": "traffic_monitor.properties", "name": "health.polling.url", "secure": false, "value": "http://${hostname}/_astats?application=&inf.name=${interface_name}" }, { - "configFile": "rascal-config.txt", + "configFile": "traffic_monitor-config.txt", "name": "peers.polling.interval", "secure": false, "value": "60" }, { - "configFile": "rascal-config.txt", + "configFile": "traffic_monitor-config.txt", "name": "health.polling.interval", "secure": false, "value": "30" @@ -2599,7 +2599,7 @@ "type": "ATS_PROFILE", "params": [ { - "configFile": "rascal.properties", + "configFile": "traffic_monitor.properties", "name": "test.cdnlock.delete", "secure": false, "value": "25.0" @@ -2614,7 +2614,7 @@ "type": "ATS_PROFILE", "params": [ { - "configFile": "rascal.properties", + "configFile": "traffic_monitor.properties", "name": "test.cdnlock.forbidden.delete", "secure": false, "value": "25.0" @@ -3252,7 +3252,7 @@ "cdnName": "cdn1", "domainName": "kabletown.net", "guid": null, - "hostName": "rascal01", + "hostName": "tm01", "httpsPort": 443, "iloIpAddress": "", "iloIpGateway": "", @@ -3286,12 +3286,12 @@ "mgmtIpNetmask": "", "offlineReason": null, "physLocation": "Denver", - "profileNames": ["RASCAL1"], + "profileNames": ["TRAFFIC_MONITOR1"], "rack": "RR 119.02", "revalPending": false, "status": "REPORTED", "tcpPort": 81, - "type": "RASCAL", + "type": "TRAFFIC_MONITOR", "updPending": false, "xmppId": "", "xmppPasswd": "X" @@ -6045,8 +6045,8 @@ "useInTable": "server" }, { - "description": "Traffic Monitor (Rascal)", - "name": "RASCAL", + "description": "Traffic Monitor", + "name": "TRAFFIC_MONITOR", "useInTable": "server" } ], From 77bc86298753578ea3150974710435c189923407 Mon Sep 17 00:00:00 2001 From: Rima Shah Date: Thu, 6 Oct 2022 12:44:57 -0600 Subject: [PATCH 06/11] Added migration file and updated rst file based on feedback. --- .../overview/profiles_and_parameters.rst | 2 +- ..._update_rascal_to_traffic_monitor.down.sql | 34 +++++++++++++++++++ ...00_update_rascal_to_traffic_monitor.up.sql | 34 +++++++++++++++++++ 3 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 traffic_ops/app/db/migrations/2022100610190300_update_rascal_to_traffic_monitor.down.sql create mode 100644 traffic_ops/app/db/migrations/2022100610190300_update_rascal_to_traffic_monitor.up.sql diff --git a/docs/source/overview/profiles_and_parameters.rst b/docs/source/overview/profiles_and_parameters.rst index edd337086f..c7eebfd514 100644 --- a/docs/source/overview/profiles_and_parameters.rst +++ b/docs/source/overview/profiles_and_parameters.rst @@ -498,7 +498,7 @@ For each Parameter with this Config File value on the same :ref:`Profile ` are all configuration options for Traffic Monitor. The :ref:`Names ` with meaning are as follows. .. seealso:: :ref:`health-proto` diff --git a/traffic_ops/app/db/migrations/2022100610190300_update_rascal_to_traffic_monitor.down.sql b/traffic_ops/app/db/migrations/2022100610190300_update_rascal_to_traffic_monitor.down.sql new file mode 100644 index 0000000000..e6ff40a0fd --- /dev/null +++ b/traffic_ops/app/db/migrations/2022100610190300_update_rascal_to_traffic_monitor.down.sql @@ -0,0 +1,34 @@ +/* + * 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. + */ + +UPDATE TYPE +SET name = 'RASCAL', + description = 'Rascal polling & reporting' +WHERE name = 'TRAFFIC_MONITOR'; + +UPDATE PARAMETER +SET config_file = REPLACE(config_file, 'traffic_monitor', 'rascal'), +WHERE config_file = 'traffic_monitor-config.txt' OR config_file = 'traffic_monitor.properties'; + +UPDATE PARAMETER +SET value = 'RASCAL_TOP', +WHERE value = 'TRAFFIC_MONITOR_TOP' AND name = 'latest_traffic_monitor'; + +UPDATE PROFILE +SET description = REPLACE(description, 'Traffic Monitor', 'Rascal'), name= REPLACE(name, 'TRAFFIC_MONITOR', 'RASCAL') +WHERE type = 'TM_PROFILE'; + diff --git a/traffic_ops/app/db/migrations/2022100610190300_update_rascal_to_traffic_monitor.up.sql b/traffic_ops/app/db/migrations/2022100610190300_update_rascal_to_traffic_monitor.up.sql new file mode 100644 index 0000000000..0acb1e1cfd --- /dev/null +++ b/traffic_ops/app/db/migrations/2022100610190300_update_rascal_to_traffic_monitor.up.sql @@ -0,0 +1,34 @@ +/* + * 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. + */ + +UPDATE TYPE +SET name = 'TRAFFIC_MONITOR', + description = 'Traffic Monitor polling & reporting' +WHERE name = 'RASCAL'; + +UPDATE PARAMETER +SET config_file = REPLACE(config_file, 'rascal', 'traffic_monitor'), +WHERE config_file = 'rascal-config.txt' OR config_file = 'rascal.properties'; + +UPDATE PARAMETER +SET value = 'TRAFFIC_MONITOR_TOP', +WHERE value = 'RASCAL_TOP' AND name = 'latest_traffic_monitor'; + +UPDATE PROFILE +SET description = REPLACE(description, 'Rascal', 'Traffic Monitor'), name= REPLACE(name, 'RASCAL', 'TRAFFIC_MONITOR') +WHERE type = 'TM_PROFILE'; + From 39ffafc236b573284ff3a5f7a9337089af273f42 Mon Sep 17 00:00:00 2001 From: Rima Shah Date: Thu, 6 Oct 2022 12:55:49 -0600 Subject: [PATCH 07/11] Corrected sql statements --- ...2100610190300_update_rascal_to_traffic_monitor.down.sql | 7 ++++--- ...022100610190300_update_rascal_to_traffic_monitor.up.sql | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/traffic_ops/app/db/migrations/2022100610190300_update_rascal_to_traffic_monitor.down.sql b/traffic_ops/app/db/migrations/2022100610190300_update_rascal_to_traffic_monitor.down.sql index e6ff40a0fd..3dbed258ad 100644 --- a/traffic_ops/app/db/migrations/2022100610190300_update_rascal_to_traffic_monitor.down.sql +++ b/traffic_ops/app/db/migrations/2022100610190300_update_rascal_to_traffic_monitor.down.sql @@ -21,14 +21,15 @@ SET name = 'RASCAL', WHERE name = 'TRAFFIC_MONITOR'; UPDATE PARAMETER -SET config_file = REPLACE(config_file, 'traffic_monitor', 'rascal'), +SET config_file = REPLACE(config_file, 'traffic_monitor', 'rascal') WHERE config_file = 'traffic_monitor-config.txt' OR config_file = 'traffic_monitor.properties'; UPDATE PARAMETER -SET value = 'RASCAL_TOP', +SET value = 'RASCAL_TOP' WHERE value = 'TRAFFIC_MONITOR_TOP' AND name = 'latest_traffic_monitor'; UPDATE PROFILE -SET description = REPLACE(description, 'Traffic Monitor', 'Rascal'), name= REPLACE(name, 'TRAFFIC_MONITOR', 'RASCAL') +SET description = REPLACE(description, 'Traffic Monitor', 'Rascal'), + name= REPLACE(name, 'TRAFFIC_MONITOR', 'RASCAL') WHERE type = 'TM_PROFILE'; diff --git a/traffic_ops/app/db/migrations/2022100610190300_update_rascal_to_traffic_monitor.up.sql b/traffic_ops/app/db/migrations/2022100610190300_update_rascal_to_traffic_monitor.up.sql index 0acb1e1cfd..28b6588b5d 100644 --- a/traffic_ops/app/db/migrations/2022100610190300_update_rascal_to_traffic_monitor.up.sql +++ b/traffic_ops/app/db/migrations/2022100610190300_update_rascal_to_traffic_monitor.up.sql @@ -21,14 +21,15 @@ SET name = 'TRAFFIC_MONITOR', WHERE name = 'RASCAL'; UPDATE PARAMETER -SET config_file = REPLACE(config_file, 'rascal', 'traffic_monitor'), +SET config_file = REPLACE(config_file, 'rascal', 'traffic_monitor') WHERE config_file = 'rascal-config.txt' OR config_file = 'rascal.properties'; UPDATE PARAMETER -SET value = 'TRAFFIC_MONITOR_TOP', +SET value = 'TRAFFIC_MONITOR_TOP' WHERE value = 'RASCAL_TOP' AND name = 'latest_traffic_monitor'; UPDATE PROFILE -SET description = REPLACE(description, 'Rascal', 'Traffic Monitor'), name= REPLACE(name, 'RASCAL', 'TRAFFIC_MONITOR') +SET description = REPLACE(description, 'Rascal', 'Traffic Monitor'), + name= REPLACE(name, 'RASCAL', 'TRAFFIC_MONITOR') WHERE type = 'TM_PROFILE'; From d94dbd22bd90a9846cfaf18f24201e89408cfe66 Mon Sep 17 00:00:00 2001 From: Rima Shah Date: Wed, 26 Oct 2022 23:54:25 -0600 Subject: [PATCH 08/11] Removed DB query for non-existent prod param. --- ...22100610190300_update_rascal_to_traffic_monitor.down.sql | 4 ---- ...2022100610190300_update_rascal_to_traffic_monitor.up.sql | 4 ---- traffic_ops/traffic_ops_golang/server/servers.go | 6 ------ 3 files changed, 14 deletions(-) diff --git a/traffic_ops/app/db/migrations/2022100610190300_update_rascal_to_traffic_monitor.down.sql b/traffic_ops/app/db/migrations/2022100610190300_update_rascal_to_traffic_monitor.down.sql index 3dbed258ad..500329e672 100644 --- a/traffic_ops/app/db/migrations/2022100610190300_update_rascal_to_traffic_monitor.down.sql +++ b/traffic_ops/app/db/migrations/2022100610190300_update_rascal_to_traffic_monitor.down.sql @@ -24,10 +24,6 @@ UPDATE PARAMETER SET config_file = REPLACE(config_file, 'traffic_monitor', 'rascal') WHERE config_file = 'traffic_monitor-config.txt' OR config_file = 'traffic_monitor.properties'; -UPDATE PARAMETER -SET value = 'RASCAL_TOP' -WHERE value = 'TRAFFIC_MONITOR_TOP' AND name = 'latest_traffic_monitor'; - UPDATE PROFILE SET description = REPLACE(description, 'Traffic Monitor', 'Rascal'), name= REPLACE(name, 'TRAFFIC_MONITOR', 'RASCAL') diff --git a/traffic_ops/app/db/migrations/2022100610190300_update_rascal_to_traffic_monitor.up.sql b/traffic_ops/app/db/migrations/2022100610190300_update_rascal_to_traffic_monitor.up.sql index 28b6588b5d..2cce8e30ff 100644 --- a/traffic_ops/app/db/migrations/2022100610190300_update_rascal_to_traffic_monitor.up.sql +++ b/traffic_ops/app/db/migrations/2022100610190300_update_rascal_to_traffic_monitor.up.sql @@ -24,10 +24,6 @@ UPDATE PARAMETER SET config_file = REPLACE(config_file, 'rascal', 'traffic_monitor') WHERE config_file = 'rascal-config.txt' OR config_file = 'rascal.properties'; -UPDATE PARAMETER -SET value = 'TRAFFIC_MONITOR_TOP' -WHERE value = 'RASCAL_TOP' AND name = 'latest_traffic_monitor'; - UPDATE PROFILE SET description = REPLACE(description, 'Rascal', 'Traffic Monitor'), name= REPLACE(name, 'RASCAL', 'TRAFFIC_MONITOR') diff --git a/traffic_ops/traffic_ops_golang/server/servers.go b/traffic_ops/traffic_ops_golang/server/servers.go index 8d34ba20e3..f1a827a278 100644 --- a/traffic_ops/traffic_ops_golang/server/servers.go +++ b/traffic_ops/traffic_ops_golang/server/servers.go @@ -849,12 +849,6 @@ func getServers(h http.Header, params map[string]string, tx *sqlx.Tx, user *auth ` } - if version.Major >= 5 { - if params["type"] == "RASCAL" { - params["type"] = "TRAFFIC_MONITOR" - } - } - where, orderBy, pagination, queryValues, errs := dbhelpers.BuildWhereAndOrderByAndPagination(params, queryParamsToSQLCols) if dsHasRequiredCapabilities { where += requiredCapabilitiesCondition From 1ba6e0eab4db4e6689dd806ebf5aca4ba88f1067 Mon Sep 17 00:00:00 2001 From: Rima Shah Date: Mon, 31 Oct 2022 12:02:45 -0600 Subject: [PATCH 09/11] Updated APIv5 test (cdn_lock) --- traffic_ops/testing/api/v5/cdn_locks_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/traffic_ops/testing/api/v5/cdn_locks_test.go b/traffic_ops/testing/api/v5/cdn_locks_test.go index c03338a2c3..aea18e651a 100644 --- a/traffic_ops/testing/api/v5/cdn_locks_test.go +++ b/traffic_ops/testing/api/v5/cdn_locks_test.go @@ -342,7 +342,7 @@ func TestCDNLocks(t *testing.T) { EndpointId: GetProfileID(t, "OKwhenUserOwnLocks"), ClientSession: opsUserWithLockSession, RequestOpts: client.RequestOptions{QueryParameters: url.Values{ - "parameterId": {strconv.Itoa(GetParameterID(t, "test.cdnlock.delete", "rascal.properties", "25.0")())}, + "parameterId": {strconv.Itoa(GetParameterID(t, "test.cdnlock.delete", "traffic_monitor.properties", "25.0")())}, }}, Expectations: utils.CkRequest(utils.NoError(), utils.HasStatus(http.StatusOK)), }, @@ -350,7 +350,7 @@ func TestCDNLocks(t *testing.T) { EndpointId: GetProfileID(t, "FORBIDDENwhenDoesntOwnLock"), ClientSession: TOSession, RequestOpts: client.RequestOptions{QueryParameters: url.Values{ - "parameterId": {strconv.Itoa(GetParameterID(t, "test.cdnlock.forbidden.delete", "rascal.properties", "25.0")())}, + "parameterId": {strconv.Itoa(GetParameterID(t, "test.cdnlock.forbidden.delete", "traffic_monitor.properties", "25.0")())}, }}, Expectations: utils.CkRequest(utils.HasError(), utils.HasStatus(http.StatusForbidden)), }, From 810ce59695434a845db68c4735c08b89ae5d4b25 Mon Sep 17 00:00:00 2001 From: Rima Shah Date: Mon, 31 Oct 2022 14:27:15 -0600 Subject: [PATCH 10/11] Updated changelog (added issue number) --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 128cad63d5..9f4be5a569 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - [#2388](https://github.com/apache/trafficcontrol/issues/2388) *Trafic Ops, Traffic Portal* Added the `TTLOverride` field to CDNs, which lets you override all TTLs in all Delivery Services of a CDN's snapshot with a single value ### Changed -- Renamed RASCAL references to TRAFFIC_MONITOR +- [#2564](https://github.com/apache/trafficcontrol/issues/2564) Renamed RASCAL references to TRAFFIC_MONITOR - [#7063](https://github.com/apache/trafficcontrol/pull/7063) *Traffic Ops* Python client now uses Traffic Ops API 4.1 by default. - [#6981](https://github.com/apache/trafficcontrol/pull/6981) *Traffic Portal* Obscures sensitive text in Delivery Service "Raw Remap" fields, private SSL keys, "Header Rewrite" rules, and ILO interface passwords by default. - [#7037](https://github.com/apache/trafficcontrol/pull/7037) *Traffic Router* Uses Traffic Ops API 4.0 by default From 1641753cdcf0cef76d642aeec0eb43e9b9a4c91b Mon Sep 17 00:00:00 2001 From: Rima Shah Date: Tue, 1 Nov 2022 09:40:20 -0600 Subject: [PATCH 11/11] Removed rascal ref from doc --- docs/source/admin/traffic_monitor.rst | 3 --- docs/source/overview/profiles_and_parameters.rst | 2 -- 2 files changed, 5 deletions(-) diff --git a/docs/source/admin/traffic_monitor.rst b/docs/source/admin/traffic_monitor.rst index cd370c35e9..e451a432d9 100644 --- a/docs/source/admin/traffic_monitor.rst +++ b/docs/source/admin/traffic_monitor.rst @@ -34,9 +34,6 @@ These are the recommended hardware specifications for a production deployment of * It is also recommended that you know the geographic coordinates and/or mailing address of the site where the Traffic Monitor machine lives for optimal performance #. Enter the Traffic Monitor server into Traffic Portal - - .. note:: For legacy compatibility reasons, the 'Type' field of a new Traffic Monitor server must be 'RASCAL'. - #. Make sure the :abbr:`FQDN (Fully Qualified Domain Name)` of the Traffic Monitor is resolvable in DNS. #. Install Traffic Monitor, either from source or by installing a :file:`traffic_monitor-{version string}.rpm` package generated by the instructions in :ref:`dev-building` with :manpage:`yum(8)` or :manpage:`rpm(8)` #. Configure Traffic Monitor according to `Configuring Traffic Monitor`_ diff --git a/docs/source/overview/profiles_and_parameters.rst b/docs/source/overview/profiles_and_parameters.rst index c7eebfd514..3272726705 100644 --- a/docs/source/overview/profiles_and_parameters.rst +++ b/docs/source/overview/profiles_and_parameters.rst @@ -112,8 +112,6 @@ SPLUNK_PROFILE TM_PROFILE A Traffic Monitor Profile. - .. warning:: For legacy reasons, the names of Profiles of this type *must* begin with ``RASCAL_``. This is **not** enforced by the :ref:`to-api` or Traffic Portal, but certain Traffic Control operations/components expect this and will fail to work otherwise! - TP_PROFILE A Traffic Portal Profile. This has no known special meaning to any Traffic Control component(s) (not even Traffic Portal itself), but its use is suggested for the profiles used by any and all Traffic Portal servers anyway.