You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by zr...@apache.org on 2022/11/03 19:42:54 UTC

[trafficcontrol] 01/01: Update Traffic Stats to use TO API v3 (#6844)

This is an automated email from the ASF dual-hosted git repository.

zrhoffman pushed a commit to branch 6.1.x
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git

commit 84c3cf16b376cc026d2bd2fa1a920f913729c4a3
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
    
    (cherry picked from commit 1c9fd16c555073537e7afacae3d15923cf9e1410)
---
 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 4548362599..24261624c3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
 ### Changed
 - Added Rocky Linux 8 support
 - Updated Apache Tomcat from 9.0.43 to 9.0.67
+- [#6694](https://github.com/apache/trafficcontrol/issues/6694) Traffic Stats now uses the TO API 3.0
 
 ## [6.1.0] - 2022-01-18
 ### Added
diff --git a/traffic_stats/traffic_stats.go b/traffic_stats/traffic_stats.go
index 65680990c9..e6cb98392f 100644
--- a/traffic_stats/traffic_stats.go
+++ b/traffic_stats/traffic_stats.go
@@ -38,7 +38,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/cihub/seelog"
 	influx "github.com/influxdata/influxdb/client/v2"
@@ -546,7 +546,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 {