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/incubator-trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new ee715fa  fixed the package reference for CacheGroups
ee715fa is described below

commit ee715fa889c07f041ef80d12ae5448e615504140
Author: Dewayne Richardson <dewr...@apache.org>
AuthorDate: Wed Apr 11 14:02:13 2018 -0600

    fixed the package reference for CacheGroups
    
    added back for other deps
    
    fixed package
    
    fixed imports
    
    removed to reference v13
    
    updated to reference the v13 cachegroup because TO client is being used
---
 traffic_monitor/towrap/towrap.go | 5 +++--
 traffic_ops/client/cachegroup.go | 8 ++++----
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/traffic_monitor/towrap/towrap.go b/traffic_monitor/towrap/towrap.go
index e9d4e3e..bad18a3 100644
--- a/traffic_monitor/towrap/towrap.go
+++ b/traffic_monitor/towrap/towrap.go
@@ -29,6 +29,7 @@ import (
 
        "github.com/apache/incubator-trafficcontrol/lib/go-log"
        "github.com/apache/incubator-trafficcontrol/lib/go-tc"
+       "github.com/apache/incubator-trafficcontrol/lib/go-tc/v13"
        "github.com/apache/incubator-trafficcontrol/traffic_ops/client"
 )
 
@@ -44,7 +45,7 @@ type ITrafficOpsSession interface {
        Profiles() ([]tc.Profile, error)
        Parameters(profileName string) ([]tc.Parameter, error)
        DeliveryServices() ([]tc.DeliveryService, error)
-       CacheGroups() ([]tc.CacheGroup, error)
+       CacheGroups() ([]v13.CacheGroup, error)
        CRConfigHistory() []CRConfigStat
 }
 
@@ -446,7 +447,7 @@ func (s TrafficOpsSessionThreadsafe) DeliveryServices() 
([]tc.DeliveryService, e
        return ss.DeliveryServices()
 }
 
-func (s TrafficOpsSessionThreadsafe) CacheGroups() ([]tc.CacheGroup, error) {
+func (s TrafficOpsSessionThreadsafe) CacheGroups() ([]v13.CacheGroup, error) {
        ss := s.get()
        if ss == nil {
                return nil, ErrNilSession
diff --git a/traffic_ops/client/cachegroup.go b/traffic_ops/client/cachegroup.go
index 895ef63..3a97849 100644
--- a/traffic_ops/client/cachegroup.go
+++ b/traffic_ops/client/cachegroup.go
@@ -18,18 +18,18 @@ package client
 import (
        "encoding/json"
 
-       tc "github.com/apache/incubator-trafficcontrol/lib/go-tc"
+       "github.com/apache/incubator-trafficcontrol/lib/go-tc/v13"
 )
 
 // CacheGroups gets the CacheGroups in an array of CacheGroup structs
 // (note CacheGroup used to be called location)
 // Deprecated: use GetCacheGroups.
-func (to *Session) CacheGroups() ([]tc.CacheGroup, error) {
+func (to *Session) CacheGroups() ([]v13.CacheGroup, error) {
        cgs, _, err := to.GetCacheGroups()
        return cgs, err
 }
 
-func (to *Session) GetCacheGroups() ([]tc.CacheGroup, ReqInf, error) {
+func (to *Session) GetCacheGroups() ([]v13.CacheGroup, ReqInf, error) {
        url := "/api/1.2/cachegroups.json"
        resp, remoteAddr, err := to.request("GET", url, nil) // TODO change to 
getBytesWithTTL, return CacheHitStatus
        reqInf := ReqInf{CacheHitStatus: CacheHitStatusMiss, RemoteAddr: 
remoteAddr}
@@ -38,7 +38,7 @@ func (to *Session) GetCacheGroups() ([]tc.CacheGroup, ReqInf, 
error) {
        }
        defer resp.Body.Close()
 
-       var data tc.CacheGroupsResponse
+       var data v13.CacheGroupsResponse
        if err := json.NewDecoder(resp.Body).Decode(&data); err != nil {
                return nil, reqInf, err
        }

-- 
To stop receiving notification emails like this one, please contact
mitchell...@apache.org.

Reply via email to