You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by ra...@apache.org on 2022/05/19 21:17:20 UTC
[trafficcontrol] branch master updated: Update Traffic Stats to use TO API v3 (#6844)
This is an automated email from the ASF dual-hosted git repository.
rawlin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
The following commit(s) were added to refs/heads/master by this push:
new 1c9fd16c55 Update Traffic Stats to use TO API v3 (#6844)
1c9fd16c55 is described below
commit 1c9fd16c555073537e7afacae3d15923cf9e1410
Author: jhowar201 <ju...@cable.comcast.com>
AuthorDate: Thu May 19 17:17:15 2022 -0400
Update Traffic Stats to use TO API v3 (#6844)
* Switching TS api client to v3
* Updating TS to use API3 TO client
* Added issue to changelog entry
---
CHANGELOG.md | 1 +
traffic_stats/traffic_stats.go | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e8e85c9a58..47ecd946c3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -59,6 +59,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- The `/servers/details` endpoint of the Traffic Ops API has been dropped in version 4.0, and marked deprecated in earlier versions.
### Changed
+- [#6694](https://github.com/apache/trafficcontrol/issues/6694) Traffic Stats now uses the TO API 3.0
- [#6654](https://github.com/apache/trafficcontrol/issues/6654) Traffic Monitor now uses the TO API 4.0 by default and falls back to 3.1
- Added Rocky Linux 8 support
- Traffic Monitors now peer with other Traffic Monitors of the same status (e.g. ONLINE with ONLINE, OFFLINE with OFFLINE), instead of all peering with ONLINE.
diff --git a/traffic_stats/traffic_stats.go b/traffic_stats/traffic_stats.go
index 034d86f9ce..6caa1f7542 100644
--- a/traffic_stats/traffic_stats.go
+++ b/traffic_stats/traffic_stats.go
@@ -40,7 +40,7 @@ import (
"github.com/apache/trafficcontrol/lib/go-log"
"github.com/apache/trafficcontrol/lib/go-tc"
"github.com/apache/trafficcontrol/lib/go-util"
- client "github.com/apache/trafficcontrol/traffic_ops/v2-client"
+ client "github.com/apache/trafficcontrol/traffic_ops/v3-client"
"github.com/Shopify/sarama"
"github.com/cihub/seelog"
@@ -743,7 +743,7 @@ func getToData(config StartupConfig, init bool, configChan chan RunningConfig) {
return
}
- servers, _, err := to.GetServers()
+ servers, _, err := to.GetServers(nil)
if err != nil {
msg := fmt.Sprintf("Error getting server list from %v: %v ", config.ToURL, err)
if init {