From ff84684d40bc3447280964a1fb84c9a9ba01e2dc Mon Sep 17 00:00:00 2001 From: Srijeet Chatterjee Date: Tue, 29 Aug 2023 12:34:42 -0600 Subject: [PATCH 1/3] Changing Traffic Router to point to Traffic Ops api version 5.0 --- CHANGELOG.md | 1 + .../traffic_router/core/util/TrafficOpsUtils.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a435a14d61..72b8fd332d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - [#7652](https://github.com/apache/trafficcontrol/pull/7652) *t3c* added rpmdb checks and use package data from t3c-apply-metadata.json if rpmdb is corrupt. ### Changed +- [#](https://github.com/apache/trafficcontrol/pull/) *Traffic Router* Changed Traffic Router to point to api version 5.0 of Traffic Ops. - [#7732](https://github.com/apache/trafficcontrol/pull/7732) *Traffic Router* Increased negative TTL value to 900 seconds. - [#7584](https://github.com/apache/trafficcontrol/pull/7584) *Documentation* Upgrade Traffic Control Sphinx documentation Makefile OS intelligent. - [#7521](https://github.com/apache/trafficcontrol/pull/7521) *Traffic Ops* Returns empty array instead of null when no permissions are given for roles endpoint using POST or PUT request. diff --git a/traffic_router/core/src/main/java/org/apache/traffic_control/traffic_router/core/util/TrafficOpsUtils.java b/traffic_router/core/src/main/java/org/apache/traffic_control/traffic_router/core/util/TrafficOpsUtils.java index b8283869a3..9cf191b53f 100644 --- a/traffic_router/core/src/main/java/org/apache/traffic_control/traffic_router/core/util/TrafficOpsUtils.java +++ b/traffic_router/core/src/main/java/org/apache/traffic_control/traffic_router/core/util/TrafficOpsUtils.java @@ -23,7 +23,7 @@ import java.util.Map; public class TrafficOpsUtils { - public static final String TO_API_VERSION = "4.0"; + public static final String TO_API_VERSION = "5.0"; private String username; private String password; From 3a9fd9232ba3b2202ce86ca39fb1b3bc885b38a1 Mon Sep 17 00:00:00 2001 From: Srijeet Chatterjee Date: Tue, 29 Aug 2023 12:37:02 -0600 Subject: [PATCH 2/3] add changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72b8fd332d..a66862ca15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,7 +50,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - [#7652](https://github.com/apache/trafficcontrol/pull/7652) *t3c* added rpmdb checks and use package data from t3c-apply-metadata.json if rpmdb is corrupt. ### Changed -- [#](https://github.com/apache/trafficcontrol/pull/) *Traffic Router* Changed Traffic Router to point to api version 5.0 of Traffic Ops. +- [#7757](https://github.com/apache/trafficcontrol/pull/7757) *Traffic Router* Changed Traffic Router to point to api version 5.0 of Traffic Ops. - [#7732](https://github.com/apache/trafficcontrol/pull/7732) *Traffic Router* Increased negative TTL value to 900 seconds. - [#7584](https://github.com/apache/trafficcontrol/pull/7584) *Documentation* Upgrade Traffic Control Sphinx documentation Makefile OS intelligent. - [#7521](https://github.com/apache/trafficcontrol/pull/7521) *Traffic Ops* Returns empty array instead of null when no permissions are given for roles endpoint using POST or PUT request. From 9c19dc7459fbdcfdbc3bce628cf840b04f7287e7 Mon Sep 17 00:00:00 2001 From: Srijeet Chatterjee Date: Tue, 29 Aug 2023 12:51:06 -0600 Subject: [PATCH 3/3] fix tests --- .../api/{4.0 => 5.0}/cdns/name/thecdn/sslkeys | 0 .../{4.0 => 5.0}/cdns/name/thecdn/sslkeys-missing-1 | 0 .../test/resources/api/{4.0 => 5.0}/federations/all | 0 .../src/test/resources/api/{4.0 => 5.0}/steering | 0 .../src/test/resources/api/{4.0 => 5.0}/steering2 | 0 .../core/src/test/resources/publish/CrConfig.json | 12 ++++++------ .../core/src/test/resources/publish/CrConfig2.json | 12 ++++++------ .../core/src/test/resources/publish/CrConfig3.json | 12 ++++++------ .../core/src/test/resources/publish/CrConfig4.json | 12 ++++++------ 9 files changed, 24 insertions(+), 24 deletions(-) rename traffic_router/core/src/test/resources/api/{4.0 => 5.0}/cdns/name/thecdn/sslkeys (100%) rename traffic_router/core/src/test/resources/api/{4.0 => 5.0}/cdns/name/thecdn/sslkeys-missing-1 (100%) rename traffic_router/core/src/test/resources/api/{4.0 => 5.0}/federations/all (100%) rename traffic_router/core/src/test/resources/api/{4.0 => 5.0}/steering (100%) rename traffic_router/core/src/test/resources/api/{4.0 => 5.0}/steering2 (100%) diff --git a/traffic_router/core/src/test/resources/api/4.0/cdns/name/thecdn/sslkeys b/traffic_router/core/src/test/resources/api/5.0/cdns/name/thecdn/sslkeys similarity index 100% rename from traffic_router/core/src/test/resources/api/4.0/cdns/name/thecdn/sslkeys rename to traffic_router/core/src/test/resources/api/5.0/cdns/name/thecdn/sslkeys diff --git a/traffic_router/core/src/test/resources/api/4.0/cdns/name/thecdn/sslkeys-missing-1 b/traffic_router/core/src/test/resources/api/5.0/cdns/name/thecdn/sslkeys-missing-1 similarity index 100% rename from traffic_router/core/src/test/resources/api/4.0/cdns/name/thecdn/sslkeys-missing-1 rename to traffic_router/core/src/test/resources/api/5.0/cdns/name/thecdn/sslkeys-missing-1 diff --git a/traffic_router/core/src/test/resources/api/4.0/federations/all b/traffic_router/core/src/test/resources/api/5.0/federations/all similarity index 100% rename from traffic_router/core/src/test/resources/api/4.0/federations/all rename to traffic_router/core/src/test/resources/api/5.0/federations/all diff --git a/traffic_router/core/src/test/resources/api/4.0/steering b/traffic_router/core/src/test/resources/api/5.0/steering similarity index 100% rename from traffic_router/core/src/test/resources/api/4.0/steering rename to traffic_router/core/src/test/resources/api/5.0/steering diff --git a/traffic_router/core/src/test/resources/api/4.0/steering2 b/traffic_router/core/src/test/resources/api/5.0/steering2 similarity index 100% rename from traffic_router/core/src/test/resources/api/4.0/steering2 rename to traffic_router/core/src/test/resources/api/5.0/steering2 diff --git a/traffic_router/core/src/test/resources/publish/CrConfig.json b/traffic_router/core/src/test/resources/publish/CrConfig.json index b327d38752..648d3605c1 100644 --- a/traffic_router/core/src/test/resources/publish/CrConfig.json +++ b/traffic_router/core/src/test/resources/publish/CrConfig.json @@ -1916,12 +1916,12 @@ } }, "config": { - "certificate.api.url": "http://${toHostname}/api/4.0/cdns/name/${cdnName}/sslkeys", - "dnschallengemapping.polling.url": "http://${toHostname}/api/4.0/dnsrecords/", + "certificate.api.url": "http://${toHostname}/api/5.0/cdns/name/${cdnName}/sslkeys", + "dnschallengemapping.polling.url": "http://${toHostname}/api/5.0/dnsrecords/", "dnschallengemapping.polling.interval": "600000", - "federationmapping.polling.url": "http://${toHostname}/api/4.0/federations/all", + "federationmapping.polling.url": "http://${toHostname}/api/5.0/federations/all", "federationmapping.polling.interval": "600000", - "steeringmapping.polling.url": "http://${toHostname}/api/4.0/steering", + "steeringmapping.polling.url": "http://${toHostname}/api/5.0/steering", "steeringmapping.polling.interval": "15000", "weight": "1.0", "requestHeaders": [ @@ -1940,7 +1940,7 @@ }, "coveragezone.polling.interval": "86400000", "regional_geoblock.polling.url.renamed": "http://testing-tm-01.cdn.example.com/some/path", - "keystore.auth.url": "http://localhost:3000/api/4.0/user/login", + "keystore.auth.url": "http://localhost:3000/api/5.0/user/login", "neustar.polling.interval": "12800000", "geolocation6.polling.interval": "86400000", "domain_name": "thecdn.example.com", @@ -1954,7 +1954,7 @@ }, "coveragezone.polling.url": "http://localhost:8889/czf.json", "deepcoveragezone.polling.url": "http://localhost:8889/dczmap.json", - "api.auth.url": "http://${toHostname}/api/4.0/user/login", + "api.auth.url": "http://${toHostname}/api/5.0/user/login", "certificates.polling.interval": "10000", "dnssec.enabled": "false", "edge.dns.routing": "true", diff --git a/traffic_router/core/src/test/resources/publish/CrConfig2.json b/traffic_router/core/src/test/resources/publish/CrConfig2.json index 0a1e7dc402..695ba5843e 100644 --- a/traffic_router/core/src/test/resources/publish/CrConfig2.json +++ b/traffic_router/core/src/test/resources/publish/CrConfig2.json @@ -1210,12 +1210,12 @@ } }, "config": { - "certificate.api.url": "http://${toHostname}/api/4.0/cdns/name/${cdnName}/sslkeys", - "dnschallengemapping.polling.url": "http://${toHostname}/api/4.0/dnsrecords/", + "certificate.api.url": "http://${toHostname}/api/5.0/cdns/name/${cdnName}/sslkeys", + "dnschallengemapping.polling.url": "http://${toHostname}/api/5.0/dnsrecords/", "dnschallengemapping.polling.interval": "600000", - "federationmapping.polling.url": "http://${toHostname}/api/4.0/federations/all", + "federationmapping.polling.url": "http://${toHostname}/api/5.0/federations/all", "federationmapping.polling.interval": "600000", - "steeringmapping.polling.url": "http://${toHostname}/api/4.0/steering", + "steeringmapping.polling.url": "http://${toHostname}/api/5.0/steering", "steeringmapping.polling.interval": "15000", "weight": "1.0", "requestHeaders": [ @@ -1234,7 +1234,7 @@ }, "coveragezone.polling.interval": "86400000", "regional_geoblock.polling.url.renamed": "http://testing-tm-01.cdn.example.com/some/path", - "keystore.auth.url": "http://localhost:3000/api/4.0/user/login", + "keystore.auth.url": "http://localhost:3000/api/5.0/user/login", "neustar.polling.interval": "12800000", "geolocation6.polling.interval": "86400000", "domain_name": "thecdn.example.com", @@ -1247,7 +1247,7 @@ "refresh": "28800" }, "coveragezone.polling.url": "http://localhost:8889/czf.json", - "api.auth.url": "http://${toHostname}/api/4.0/user/login", + "api.auth.url": "http://${toHostname}/api/5.0/user/login", "certificates.polling.interval": "10000", "dnssec.enabled": "false" } diff --git a/traffic_router/core/src/test/resources/publish/CrConfig3.json b/traffic_router/core/src/test/resources/publish/CrConfig3.json index dfd38500af..c7ef31d3a6 100644 --- a/traffic_router/core/src/test/resources/publish/CrConfig3.json +++ b/traffic_router/core/src/test/resources/publish/CrConfig3.json @@ -1210,12 +1210,12 @@ } }, "config": { - "certificate.api.url": "http://${toHostname}/api/4.0/cdns/name/${cdnName}/sslkeys", - "dnschallengemapping.polling.url": "http://${toHostname}/api/4.0/dnsrecords/", + "certificate.api.url": "http://${toHostname}/api/5.0/cdns/name/${cdnName}/sslkeys", + "dnschallengemapping.polling.url": "http://${toHostname}/api/5.0/dnsrecords/", "dnschallengemapping.polling.interval": "600000", - "federationmapping.polling.url": "http://${toHostname}/api/4.0/federations/all", + "federationmapping.polling.url": "http://${toHostname}/api/5.0/federations/all", "federationmapping.polling.interval": "600000", - "steeringmapping.polling.url": "http://${toHostname}/api/4.0/steering", + "steeringmapping.polling.url": "http://${toHostname}/api/5.0/steering", "steeringmapping.polling.interval": "15000", "weight": "1.0", "requestHeaders": [ @@ -1234,7 +1234,7 @@ }, "coveragezone.polling.interval": "86400000", "regional_geoblock.polling.url.renamed": "http://testing-tm-01.cdn.example.com/some/path", - "keystore.auth.url": "http://localhost:3000/api/4.0/user/login", + "keystore.auth.url": "http://localhost:3000/api/5.0/user/login", "neustar.polling.interval": "12800000", "geolocation6.polling.interval": "86400000", "domain_name": "thecdn.example.com", @@ -1247,7 +1247,7 @@ "refresh": "28800" }, "coveragezone.polling.url": "http://localhost:8889/czf.json", - "api.auth.url": "http://${toHostname}/api/4.0/user/login", + "api.auth.url": "http://${toHostname}/api/5.0/user/login", "certificates.polling.interval": "10000", "dnssec.enabled": "false" } diff --git a/traffic_router/core/src/test/resources/publish/CrConfig4.json b/traffic_router/core/src/test/resources/publish/CrConfig4.json index b656dd7c8f..afe74a6c5a 100644 --- a/traffic_router/core/src/test/resources/publish/CrConfig4.json +++ b/traffic_router/core/src/test/resources/publish/CrConfig4.json @@ -1255,12 +1255,12 @@ } }, "config": { - "certificate.api.url": "http://${toHostname}/api/4.0/cdns/name/${cdnName}/sslkeys", - "dnschallengemapping.polling.url": "http://${toHostname}/api/4.0/dnsrecords/", + "certificate.api.url": "http://${toHostname}/api/5.0/cdns/name/${cdnName}/sslkeys", + "dnschallengemapping.polling.url": "http://${toHostname}/api/5.0/dnsrecords/", "dnschallengemapping.polling.interval": "600000", - "federationmapping.polling.url": "http://${toHostname}/api/4.0/federations/all", + "federationmapping.polling.url": "http://${toHostname}/api/5.0/federations/all", "federationmapping.polling.interval": "600000", - "steeringmapping.polling.url": "http://${toHostname}/api/4.0/steering", + "steeringmapping.polling.url": "http://${toHostname}/api/5.0/steering", "steeringmapping.polling.interval": "15000", "weight": "1.0", "requestHeaders": [ @@ -1279,7 +1279,7 @@ }, "coveragezone.polling.interval": "86400000", "regional_geoblock.polling.url.renamed": "http://testing-tm-01.cdn.example.com/some/path", - "keystore.auth.url": "http://localhost:3000/api/4.0/user/login", + "keystore.auth.url": "http://localhost:3000/api/5.0/user/login", "neustar.polling.interval": "12800000", "geolocation6.polling.interval": "86400000", "domain_name": "thecdn.example.com", @@ -1292,7 +1292,7 @@ "refresh": "28800" }, "coveragezone.polling.url": "http://localhost:8889/czf.json", - "api.auth.url": "http://${toHostname}/api/4.0/user/login", + "api.auth.url": "http://${toHostname}/api/5.0/user/login", "certificates.polling.interval": "10000", "dnssec.enabled": "false" }