You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by de...@apache.org on 2018/06/12 17:36:34 UTC

[incubator-trafficcontrol] branch master updated: allow cachegroup select by type

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

dewrich 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 389d296  allow cachegroup select by type
389d296 is described below

commit 389d296c0e246d2f5be25324b878911fc1b8433b
Author: Dan Kirkwood <da...@gmail.com>
AuthorDate: Tue Jun 12 17:27:18 2018 +0000

    allow cachegroup select by type
---
 traffic_ops/testing/compare/testroutes.txt               | 2 ++
 traffic_ops/traffic_ops_golang/cachegroup/cachegroups.go | 1 +
 2 files changed, 3 insertions(+)

diff --git a/traffic_ops/testing/compare/testroutes.txt b/traffic_ops/testing/compare/testroutes.txt
index 4c9e72c..cdb34e7 100644
--- a/traffic_ops/testing/compare/testroutes.txt
+++ b/traffic_ops/testing/compare/testroutes.txt
@@ -8,3 +8,5 @@ api/1.3/regions?orderby=id
 api/1.3/servers?orderby=id
 api/1.3/statuses?orderby=id
 api/1.3/profiles?orderby=id
+api/1.3/cachegroups?orderby=id
+api/1.3/cachegroups?type=4
diff --git a/traffic_ops/traffic_ops_golang/cachegroup/cachegroups.go b/traffic_ops/traffic_ops_golang/cachegroup/cachegroups.go
index 187d380..1faf7ce 100644
--- a/traffic_ops/traffic_ops_golang/cachegroup/cachegroups.go
+++ b/traffic_ops/traffic_ops_golang/cachegroup/cachegroups.go
@@ -314,6 +314,7 @@ func (cachegroup *TOCacheGroup) Read(db *sqlx.DB, parameters map[string]string,
 		"id":        dbhelpers.WhereColumnInfo{"cachegroup.id", api.IsInt},
 		"name":      dbhelpers.WhereColumnInfo{"cachegroup.name", nil},
 		"shortName": dbhelpers.WhereColumnInfo{"short_name", nil},
+		"type":      dbhelpers.WhereColumnInfo{"cachegroup.type", nil},
 	}
 	where, orderBy, queryValues, errs := dbhelpers.BuildWhereAndOrderBy(parameters, queryParamsToQueryCols)
 	if len(errs) > 0 {

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