trafficcontrol-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dang...@apache.org
Subject [trafficcontrol] 01/02: Fix Grove grovetccfg for lib/tc version change
Date Mon, 10 Sep 2018 19:46:14 GMT
This is an automated email from the ASF dual-hosted git repository.

dangogh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git

commit ad3205814fe3359fa00c802bf131754786c5d158
Author: Robert Butts <rob@apache.org>
AuthorDate: Mon Sep 10 11:46:58 2018 -0600

    Fix Grove grovetccfg for lib/tc version change
---
 grove/grovetccfg/grovetccfg.go | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/grove/grovetccfg/grovetccfg.go b/grove/grovetccfg/grovetccfg.go
index a7543ae..a507af8 100644
--- a/grove/grovetccfg/grovetccfg.go
+++ b/grove/grovetccfg/grovetccfg.go
@@ -35,7 +35,6 @@ import (
 	"time"
 
 	"github.com/apache/trafficcontrol/lib/go-tc"
-	tcv13 "github.com/apache/trafficcontrol/lib/go-tc/v13"
 	to "github.com/apache/trafficcontrol/traffic_ops/client"
 
 	"github.com/apache/trafficcontrol/grove/config"
@@ -645,8 +644,8 @@ func makeServersHostnameMap(servers []tc.Server) map[string]tc.Server
{
 	return m
 }
 
-func makeCachegroupsNameMap(cgs []tcv13.CacheGroup) map[string]tcv13.CacheGroup {
-	m := map[string]tcv13.CacheGroup{}
+func makeCachegroupsNameMap(cgs []tc.CacheGroup) map[string]tc.CacheGroup {
+	m := map[string]tc.CacheGroup{}
 	for _, cg := range cgs {
 		m[cg.Name] = cg
 	}
@@ -677,16 +676,16 @@ func makeDeliveryserviceRegexMap(dsrs []tc.DeliveryServiceRegexes) map[string][]
 	return m
 }
 
-func makeCDNMap(cdns []tcv13.CDN) map[string]tcv13.CDN {
-	m := map[string]tcv13.CDN{}
+func makeCDNMap(cdns []tc.CDN) map[string]tc.CDN {
+	m := map[string]tc.CDN{}
 	for _, cdn := range cdns {
 		m[cdn.Name] = cdn
 	}
 	return m
 }
 
-func makeDSCertMap(sslKeys []tcv13.CDNSSLKeys) map[string]tcv13.CDNSSLKeys {
-	m := map[string]tcv13.CDNSSLKeys{}
+func makeDSCertMap(sslKeys []tc.CDNSSLKeys) map[string]tc.CDNSSLKeys {
+	m := map[string]tc.CDNSSLKeys{}
 	for _, sslkey := range sslKeys {
 		m[sslkey.DeliveryService] = sslkey
 	}
@@ -722,7 +721,7 @@ func getServerDeliveryservices(hostname string, servers map[string]tc.Server,
ds
 	return serverDses, nil
 }
 
-func getParents(hostname string, servers map[string]tc.Server, cachegroups map[string]tcv13.CacheGroup)
([]tc.Server, error) {
+func getParents(hostname string, servers map[string]tc.Server, cachegroups map[string]tc.CacheGroup)
([]tc.Server, error) {
 	server, ok := servers[hostname]
 	if !ok {
 		return nil, fmt.Errorf("hostname not found in Servers")
@@ -880,9 +879,9 @@ func createRulesOld(
 	dses []tc.DeliveryService,
 	parents []tc.Server,
 	dsRegexes map[string][]tc.DeliveryServiceRegex,
-	cdns map[string]tcv13.CDN,
+	cdns map[string]tc.CDN,
 	hostParams []tc.Parameter,
-	dsCerts map[string]tcv13.CDNSSLKeys,
+	dsCerts map[string]tc.CDNSSLKeys,
 	certDir string,
 ) (remap.RemapRules, error) {
 	rules := []remapdata.RemapRule{}
@@ -1025,15 +1024,15 @@ func createRulesOld(
 	return remapRules, nil
 }
 
-func getCertFileName(cert tcv13.CDNSSLKeys, dir string) string {
+func getCertFileName(cert tc.CDNSSLKeys, dir string) string {
 	return dir + string(os.PathSeparator) + strings.Replace(cert.Hostname, "*.", "", -1) + ".crt"
 }
 
-func getCertKeyFileName(cert tcv13.CDNSSLKeys, dir string) string {
+func getCertKeyFileName(cert tc.CDNSSLKeys, dir string) string {
 	return dir + string(os.PathSeparator) + strings.Replace(cert.Hostname, "*.", "", -1) + ".key"
 }
 
-func createCertificateFiles(cert tcv13.CDNSSLKeys, dir string) error {
+func createCertificateFiles(cert tc.CDNSSLKeys, dir string) error {
 	certFileName := getCertFileName(cert, dir)
 	crt, err := base64.StdEncoding.DecodeString(cert.Certificate.Crt)
 	if err != nil {


Mime
View raw message