trafficcontrol-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mitchell...@apache.org
Subject [trafficcontrol] branch master updated: Fix TO Go riak version as num
Date Mon, 10 Sep 2018 19:49:53 GMT
This is an automated email from the ASF dual-hosted git repository.

mitchell852 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 e4dd97b  Fix TO Go riak version as num
e4dd97b is described below

commit e4dd97bb39e9b4c27733dca89e016eb062a2f8e2
Author: Robert Butts <rob@apache.org>
AuthorDate: Mon Sep 10 13:46:40 2018 -0600

    Fix TO Go riak version as num
---
 lib/go-tc/deliveryservice_ssl_keys.go                     | 2 +-
 traffic_ops/traffic_ops_golang/deliveryservice/sslkeys.go | 2 +-
 traffic_ops/traffic_ops_golang/riaksvc/dsutil.go          | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/go-tc/deliveryservice_ssl_keys.go b/lib/go-tc/deliveryservice_ssl_keys.go
index ecd2600..0bfb15c 100644
--- a/lib/go-tc/deliveryservice_ssl_keys.go
+++ b/lib/go-tc/deliveryservice_ssl_keys.go
@@ -52,7 +52,7 @@ type DeliveryServiceSSLKeys struct {
 	Country         string                            `json:"country,omitempty"`
 	State           string                            `json:"state,omitempty"`
 	Key             string                            `json:"key"`
-	Version         string                            `json:"version"`
+	Version         util.JSONNumAsStr                 `json:"version"`
 	Certificate     DeliveryServiceSSLKeysCertificate `json:"certificate,omitempty"`
 }
 
diff --git a/traffic_ops/traffic_ops_golang/deliveryservice/sslkeys.go b/traffic_ops/traffic_ops_golang/deliveryservice/sslkeys.go
index 5eb02ec..3337943 100644
--- a/traffic_ops/traffic_ops_golang/deliveryservice/sslkeys.go
+++ b/traffic_ops/traffic_ops_golang/deliveryservice/sslkeys.go
@@ -65,7 +65,7 @@ func generatePutRiakKeys(req tc.DeliveryServiceSSLKeysReq, tx *sql.Tx, cfg
*conf
 		Country:         *req.Country,
 		State:           *req.State,
 		Key:             *req.Key,
-		Version:         string(*req.Version),
+		Version:         *req.Version,
 	}
 	if req.Certificate != nil {
 		dsSSLKeys.Certificate = *req.Certificate
diff --git a/traffic_ops/traffic_ops_golang/riaksvc/dsutil.go b/traffic_ops/traffic_ops_golang/riaksvc/dsutil.go
index 42ef54d..2742ae5 100644
--- a/traffic_ops/traffic_ops_golang/riaksvc/dsutil.go
+++ b/traffic_ops/traffic_ops_golang/riaksvc/dsutil.go
@@ -106,7 +106,7 @@ func PutDeliveryServiceSSLKeysObj(key tc.DeliveryServiceSSLKeys, tx *sql.Tx,
aut
 			ContentType:     "text/json",
 			Charset:         "utf-8",
 			ContentEncoding: "utf-8",
-			Key:             MakeDSSSLKeyKey(key.DeliveryService, key.Version),
+			Key:             MakeDSSSLKeyKey(key.DeliveryService, string(key.Version)),
 			Value:           []byte(keyJSON),
 		}
 		if err = SaveObject(obj, DeliveryServiceSSLKeysBucket, cluster); err != nil {
@@ -127,7 +127,7 @@ func PutDeliveryServiceSSLKeysObjTx(key tc.DeliveryServiceSSLKeys, tx
*sql.Tx, a
 			ContentType:     "text/json",
 			Charset:         "utf-8",
 			ContentEncoding: "utf-8",
-			Key:             MakeDSSSLKeyKey(key.DeliveryService, key.Version),
+			Key:             MakeDSSSLKeyKey(key.DeliveryService, string(key.Version)),
 			Value:           []byte(keyJSON),
 		}
 		if err = SaveObject(obj, DeliveryServiceSSLKeysBucket, cluster); err != nil {


Mime
View raw message