[GitHub] mitchell852 commented on issue #2029: [Issue 1907] TO API for backup edge cachegroup

2018-05-04 Thread GitBox
mitchell852 commented on issue #2029: [Issue 1907] TO API for backup edge 
cachegroup
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2029#issuecomment-386650324
 
 
   @elsloo - 
   
   @Vijay-1 and I discussed/agreed on these API routes but I don't think the 
changes have been made yet to support them:
   
   GET /api/1.2/cachegroup_fallbacks?cacheGroupId= <-- get all fallbacks for a 
cg
   GET /api/1.2/cachegroup_fallbacks?fallbackId= <-- get all cg's for a fb
   GET /api/1.2/cachegroup_fallbacks?cacheGroupId== <-- get one cg fb
   
   POST /api/1.2/cachegroup_fallbacks <-- create one or more fallbacks. if a 
fallback already exists, report that it already exists and bail (403)
   
   PUT /api/1.2/cachegroup_fallbacks <-- update one or more fallbacks, skip if 
fallback doesn't exist or fallback is invalid
   
   DELETE /api/1.2/cachegroup_fallbacks?cacheGroupId=3=23 <-- delete 
one fallback
   DELETE /api/1.2/cachegroup_fallbacks?cacheGroupId=3 <-- delete all fallbacks 
for cg3
   DELETE /api/1.2/cachegroup_fallbacks?fallbackId=23 <-- delete all 
cachegroups for fb23


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] asfgit commented on issue #2226: Anonymous IP TO Implementation

2018-05-04 Thread GitBox
asfgit commented on issue #2226: Anonymous IP TO Implementation
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2226#issuecomment-386685510
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/incubator-trafficcontrol-PR/1517/
   Test PASSed.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] elsloo commented on issue #2029: [Issue 1907] TO API for backup edge cachegroup

2018-05-04 Thread GitBox
elsloo commented on issue #2029: [Issue 1907] TO API for backup edge cachegroup
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2029#issuecomment-38663
 
 
   Hey @Vijay-1 and @mitchell852 – where are we on getting these changes into 
the PR?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] asfgit commented on issue #2108: create roles crud endpoints in golang

2018-05-04 Thread GitBox
asfgit commented on issue #2108: create roles crud endpoints in golang
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2108#issuecomment-386698482
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/incubator-trafficcontrol-PR/1518/
   Test PASSed.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


Build failed in Jenkins: incubator-trafficcontrol-rat #704

2018-05-04 Thread Apache Jenkins Server
See 


--
Started by upstream project "incubator-trafficcontrol-master-build" build 
number 748
originally caused by:
 Started by an SCM change
 Started by an SCM change
 Started by an SCM change
 Started by an SCM change
 Started by an SCM change
 Started by an SCM change
 Started by an SCM change
[EnvInject] - Loading node environment variables.
Building remotely on H31 (ubuntu xenial) in workspace 

[incubator-trafficcontrol-rat] $ /bin/bash -xe 
/tmp/jenkins8801379828118792061.sh
+ rm -rf 

 

 '
[operations-center-context] Requesting copy of artifacts matching '**/*.tar.gz' 
from 'Last successful build (either stable or unstable)' of 
incubator-trafficcontrol-master-build
[operations-center-context] Copied 1 artifacts matching '**/*.tar.gz' from 
'Last successful build (either stable or unstable)' of 
incubator-trafficcontrol-master-build:
[operations-center-context]   apache-trafficcontrol-2.3.0-incubating.tar.gz
[incubator-trafficcontrol-rat] $ /bin/bash -xe 
/tmp/jenkins8561899032715085351.sh
+ set -exu
++ ls apache-trafficcontrol-2.3.0-incubating.tar.gz
+ tarball=apache-trafficcontrol-2.3.0-incubating.tar.gz
+ tar xzf apache-trafficcontrol-2.3.0-incubating.tar.gz
++ pwd
++ basename apache-trafficcontrol-2.3.0-incubating.tar.gz .tar.gz
+ 
tcdir=
+ cd 

++ date +%Y
+ egrep 'Copyright .*-?2018 The Apache Software Foundation' NOTICE
Copyright 2016-2018 The Apache Software Foundation
+ set +x
Searching for class files:
PASSED: No class files found.
Searching for jar files:
PASSED: No jar files found.
Searching for tar files:
PASSED: No tar files found.
Searching for tgz files:
PASSED: No tgz files found.
Searching for zip files:
PASSED: No zip files found.
++ curl 
https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.13-SNAPSHOT/
 -sN
++ grep jar
++ awk -F '"' '{print $2}'
++ sort -r
++ head -n 1
++ grep -ve md5 -e sha1
++ cut -d / -f 12
+ ratver=apache-rat-0.13-20180329.151017-101.jar
++ mktemp -d
+ ratdir=/tmp/tmp.02MatUW51j
+ ratjar=/tmp/tmp.02MatUW51j/apache-rat-0.13.SNAPSHOT.jar
+ curl -L -o /tmp/tmp.02MatUW51j/apache-rat-0.13.SNAPSHOT.jar 
https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.13-SNAPSHOT/apache-rat-0.13-20180329.151017-101.jar
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0  
0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0100 
1587k  100 1587k0 0  1625k  0 --:--:-- --:--:-- --:--:-- 1624k
+ curl -L -o /tmp/tmp.02MatUW51j/apache-rat-0.13.SNAPSHOT.jar.sha1 
https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.13-SNAPSHOT/apache-rat-0.13-20180329.151017-101.jar.sha1
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0  
0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0100 
   40  100400 0 75  0 --:--:-- --:--:-- --:--:--75
++ sha1sum /tmp/tmp.02MatUW51j/apache-rat-0.13.SNAPSHOT.jar
++ awk '{print $1}'
++ cat /tmp/tmp.02MatUW51j/apache-rat-0.13.SNAPSHOT.jar.sha1
+ [[ 635c5eccad31cff1d713c12144eaae7fc9f10cf4 == 
635c5eccad31cff1d713c12144eaae7fc9f10cf4 ]]
++ pwd
++ pwd
+ java -jar /tmp/tmp.02MatUW51j/apache-rat-0.13.SNAPSHOT.jar -E 

 -d 

+ rm -rf /tmp/tmp.02MatUW51j
++ perl -lne 'print $1 if /(\d+) Unknown Licenses/' ratreport.txt
+ unknown=56
+ [[ 56 != 0 ]]
+ echo '56 Unknown Licenses'
56 Unknown Licenses
+ perl -lne 'print if /Files with unapproved licenses:/ .. /^\*\*\*/' 
ratreport.txt
+ sed s:::
Files with unapproved licenses:

  
apache-trafficcontrol-2.3.0-incubating/grove/vendor/code.cloudfoundry.org/bytefmt/bytes.go
  

[GitHub] mitchell852 commented on issue #2029: [Issue 1907] TO API for backup edge cachegroup

2018-05-04 Thread GitBox
mitchell852 commented on issue #2029: [Issue 1907] TO API for backup edge 
cachegroup
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2029#issuecomment-386650324
 
 
   @Vijay-1 and I discussed these routes but I don't think the changes have 
been made yet to support them:
   
   GET /api/1.2/cachegroup_fallbacks?cacheGroupId= <-- get all fallbacks for a 
cg
   GET /api/1.2/cachegroup_fallbacks?fallbackId= <-- get all cg's for a fb
   GET /api/1.2/cachegroup_fallbacks?cacheGroupId== <-- get one cg fb
   
   POST /api/1.2/cachegroup_fallbacks <-- create one or more fallbacks. if a 
fallback already exists, report that it already exists and bail (403)
   
   PUT /api/1.2/cachegroup_fallbacks <-- update one or more fallbacks, skip if 
fallback doesn't exist or fallback is invalid
   
   DELETE /api/1.2/cachegroup_fallbacks?cacheGroupId=3=23 <-- delete 
one
   DELETE /api/1.2/cachegroup_fallbacks?cacheGroupId=3 <-- delete all fallbacks 
for cg3
   DELETE /api/1.2/cachegroup_fallbacks?fallbackId=23 <-- delete all 
cachegroups for fb23


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mitchell852 commented on issue #2029: [Issue 1907] TO API for backup edge cachegroup

2018-05-04 Thread GitBox
mitchell852 commented on issue #2029: [Issue 1907] TO API for backup edge 
cachegroup
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2029#issuecomment-386650324
 
 
   @Vijay-1 and I discussed/agreed on these API routes but I don't think the 
changes have been made yet to support them:
   
   GET /api/1.2/cachegroup_fallbacks?cacheGroupId= <-- get all fallbacks for a 
cg
   GET /api/1.2/cachegroup_fallbacks?fallbackId= <-- get all cg's for a fb
   GET /api/1.2/cachegroup_fallbacks?cacheGroupId== <-- get one cg fb
   
   POST /api/1.2/cachegroup_fallbacks <-- create one or more fallbacks. if a 
fallback already exists, report that it already exists and bail (403)
   
   PUT /api/1.2/cachegroup_fallbacks <-- update one or more fallbacks, skip if 
fallback doesn't exist or fallback is invalid
   
   DELETE /api/1.2/cachegroup_fallbacks?cacheGroupId=3=23 <-- delete 
one fallback
   DELETE /api/1.2/cachegroup_fallbacks?cacheGroupId=3 <-- delete all fallbacks 
for cg3
   DELETE /api/1.2/cachegroup_fallbacks?fallbackId=23 <-- delete all 
cachegroups for fb23


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mitchell852 commented on issue #2029: [Issue 1907] TO API for backup edge cachegroup

2018-05-04 Thread GitBox
mitchell852 commented on issue #2029: [Issue 1907] TO API for backup edge 
cachegroup
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2029#issuecomment-386650324
 
 
   @Vijay-1 and I discussed/agreed on these API routes but I don't think the 
changes have been made yet to support them:
   
   GET /api/1.2/cachegroup_fallbacks?cacheGroupId= <-- get all fallbacks for a 
cg
   GET /api/1.2/cachegroup_fallbacks?fallbackId= <-- get all cg's for a fb
   GET /api/1.2/cachegroup_fallbacks?cacheGroupId== <-- get one cg fb
   
   POST /api/1.2/cachegroup_fallbacks <-- create one or more fallbacks. if a 
fallback already exists, report that it already exists and bail (403)
   
   PUT /api/1.2/cachegroup_fallbacks <-- update one or more fallbacks, skip if 
fallback doesn't exist or fallback is invalid
   
   DELETE /api/1.2/cachegroup_fallbacks?cacheGroupId=3=23 <-- delete 
one
   DELETE /api/1.2/cachegroup_fallbacks?cacheGroupId=3 <-- delete all fallbacks 
for cg3
   DELETE /api/1.2/cachegroup_fallbacks?fallbackId=23 <-- delete all 
cachegroups for fb23


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mitchell852 closed pull request #2225: Fix Traffic Ops Golang CRConfig to match Perl's magic LogRequestHeaders parameter handling

2018-05-04 Thread GitBox
mitchell852 closed pull request #2225: Fix Traffic Ops Golang CRConfig to match 
Perl's magic LogRequestHeaders parameter handling
URL: https://github.com/apache/incubator-trafficcontrol/pull/2225
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/traffic_ops/traffic_ops_golang/crconfig/config.go 
b/traffic_ops/traffic_ops_golang/crconfig/config.go
index 8cdd871a0..29398fead 100644
--- a/traffic_ops/traffic_ops_golang/crconfig/config.go
+++ b/traffic_ops/traffic_ops_golang/crconfig/config.go
@@ -38,6 +38,7 @@ func makeCRConfigConfig(cdn string, db *sql.DB, dnssecEnabled 
bool, domain strin
const soaPrefix = "tld.soa."
const ttlPrefix = "tld.ttls."
const maxmindDefaultOverrideParameterName = "maxmind.default.override"
+   const logRequestHeadersParameterName = "LogRequestHeaders"
crConfigConfig := map[string]interface{}{}
for _, param := range configParams {
k := param.Name
@@ -46,6 +47,12 @@ func makeCRConfigConfig(cdn string, db *sql.DB, 
dnssecEnabled bool, domain strin
soa[k[len(soaPrefix):]] = v
} else if strings.HasPrefix(k, ttlPrefix) {
ttl[k[len(ttlPrefix):]] = v
+   } else if k == logRequestHeadersParameterName {
+   hdrs := []string{}
+   for _, hdr := range strings.Split(param.Value, 
`__RETURN__`) {
+   hdrs = append(hdrs, strings.TrimSpace(hdr))
+   }
+   crConfigConfig["requestHeaders"] = hdrs
} else if k == maxmindDefaultOverrideParameterName {
overrideObj, err := createMaxmindDefaultOverrideObj(v)
if err != nil {


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] PeterRyder opened a new pull request #2226: Anonymous IP TO Implementation

2018-05-04 Thread GitBox
PeterRyder opened a new pull request #2226: Anonymous IP TO Implementation
URL: https://github.com/apache/incubator-trafficcontrol/pull/2226
 
 
   @rivasj
   
   New PR for Anonymous IP Traffic Ops implementation after rebase.
   
   Refer to https://github.com/apache/incubator-trafficcontrol/pull/1643 for 
original PR


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mitchell852 commented on issue #1979: DO NOT MERGE - Junk commit to test prbuilder

2018-05-04 Thread GitBox
mitchell852 commented on issue #1979: DO NOT MERGE - Junk commit to test 
prbuilder
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/1979#issuecomment-386648792
 
 
   @jhg03a - can this be closed?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


Build failed in Jenkins: incubator-trafficcontrol-rat #705

2018-05-04 Thread Apache Jenkins Server
See 


--
Started by upstream project "incubator-trafficcontrol-master-build" build 
number 749
originally caused by:
 Started by an SCM change
 Started by an SCM change
 Started by an SCM change
 Started by an SCM change
 Started by an SCM change
 Started by an SCM change
[EnvInject] - Loading node environment variables.
Building remotely on H23 (ubuntu xenial) in workspace 

[incubator-trafficcontrol-rat] $ /bin/bash -xe 
/tmp/jenkins6633460103439502944.sh
+ rm -rf 

 

 '
[operations-center-context] Requesting copy of artifacts matching '**/*.tar.gz' 
from 'Last successful build (either stable or unstable)' of 
incubator-trafficcontrol-master-build
[operations-center-context] Copied 1 artifacts matching '**/*.tar.gz' from 
'Last successful build (either stable or unstable)' of 
incubator-trafficcontrol-master-build:
[operations-center-context]   apache-trafficcontrol-2.3.0-incubating.tar.gz
[incubator-trafficcontrol-rat] $ /bin/bash -xe /tmp/jenkins583470357278144026.sh
+ set -exu
++ ls apache-trafficcontrol-2.3.0-incubating.tar.gz
+ tarball=apache-trafficcontrol-2.3.0-incubating.tar.gz
+ tar xzf apache-trafficcontrol-2.3.0-incubating.tar.gz
++ pwd
++ basename apache-trafficcontrol-2.3.0-incubating.tar.gz .tar.gz
+ 
tcdir=
+ cd 

++ date +%Y
+ egrep 'Copyright .*-?2018 The Apache Software Foundation' NOTICE
Copyright 2016-2018 The Apache Software Foundation
+ set +x
Searching for class files:
PASSED: No class files found.
Searching for jar files:
PASSED: No jar files found.
Searching for tar files:
PASSED: No tar files found.
Searching for tgz files:
PASSED: No tgz files found.
Searching for zip files:
PASSED: No zip files found.
++ curl 
https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.13-SNAPSHOT/
 -sN
++ grep jar
++ grep -ve md5 -e sha1
++ sort -r
++ head -n 1
++ cut -d / -f 12
++ awk -F '"' '{print $2}'
+ ratver=apache-rat-0.13-20180329.151017-101.jar
++ mktemp -d
+ ratdir=/tmp/tmp.1c3Yi3m7bg
+ ratjar=/tmp/tmp.1c3Yi3m7bg/apache-rat-0.13.SNAPSHOT.jar
+ curl -L -o /tmp/tmp.1c3Yi3m7bg/apache-rat-0.13.SNAPSHOT.jar 
https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.13-SNAPSHOT/apache-rat-0.13-20180329.151017-101.jar
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0 
97 1587k   97 1552k0 0  1663k  0 --:--:-- --:--:-- --:--:-- 
1663k100 1587k  100 1587k0 0  1700k  0 --:--:-- --:--:-- --:--:-- 
1699k
+ curl -L -o /tmp/tmp.1c3Yi3m7bg/apache-rat-0.13.SNAPSHOT.jar.sha1 
https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.13-SNAPSHOT/apache-rat-0.13-20180329.151017-101.jar.sha1
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 
010040  100400 0 82  0 --:--:-- --:--:-- --:--:--82
++ sha1sum /tmp/tmp.1c3Yi3m7bg/apache-rat-0.13.SNAPSHOT.jar
++ awk '{print $1}'
++ cat /tmp/tmp.1c3Yi3m7bg/apache-rat-0.13.SNAPSHOT.jar.sha1
+ [[ 635c5eccad31cff1d713c12144eaae7fc9f10cf4 == 
635c5eccad31cff1d713c12144eaae7fc9f10cf4 ]]
++ pwd
++ pwd
+ java -jar /tmp/tmp.1c3Yi3m7bg/apache-rat-0.13.SNAPSHOT.jar -E 

 -d 

+ rm -rf /tmp/tmp.1c3Yi3m7bg
++ perl -lne 'print $1 if /(\d+) Unknown Licenses/' ratreport.txt
+ unknown=56
+ [[ 56 != 0 ]]
+ echo '56 Unknown Licenses'
56 Unknown Licenses
+ perl -lne 'print if /Files with unapproved licenses:/ .. /^\*\*\*/' 
ratreport.txt
+ sed s:::
Files with unapproved licenses:

  
apache-trafficcontrol-2.3.0-incubating/grove/vendor/code.cloudfoundry.org/bytefmt/bytes.go
  
apache-trafficcontrol-2.3.0-incubating/grove/vendor/code.cloudfoundry.org/bytefmt/bytes_test.go
  

[GitHub] PeterRyder commented on issue #1643: Anonymous IP TO Implementation

2018-05-04 Thread GitBox
PeterRyder commented on issue #1643: Anonymous IP TO Implementation
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/1643#issuecomment-38980
 
 
   Closing - refer to new PR 
https://github.com/apache/incubator-trafficcontrol/pull/2226 for 2.3.x rebase


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mitchell852 commented on a change in pull request #2222: Add TO Go 1.1 routes

2018-05-04 Thread GitBox
mitchell852 commented on a change in pull request #: Add TO Go 1.1 routes
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/#discussion_r186128347
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/routes.go
 ##
 @@ -77,106 +77,107 @@ func Routes(d ServerData) ([]Route, []RawRoute, 
http.Handler, error) {
// 1.2 routes are simply a Go replacement for the equivalent 
Perl route. They may or may not conform with the API guidelines 
(https://cwiki.apache.org/confluence/display/TC/API+Guidelines).
 
//ASN: CRUD
-   {1.2, http.MethodGet, `asns/?(\.json)?$`, 
api.ReadHandler(asn.GetRefType(), d.DB), auth.PrivLevelReadOnly, Authenticated, 
nil},
-   {1.2, http.MethodGet, `asns/{id}$`, 
api.ReadHandler(asn.GetRefType(), d.DB), auth.PrivLevelReadOnly, Authenticated, 
nil},
-   {1.2, http.MethodPut, `asns/{id}$`, 
api.UpdateHandler(asn.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-   {1.2, http.MethodPost, `asns/?$`, 
api.CreateHandler(asn.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-   {1.2, http.MethodDelete, `asns/{id}$`, 
api.DeleteHandler(asn.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+   {1.2, http.MethodGet, `asns/?(\.json)?$`, 
api.ReadHandler(asn.GetRefTypeV12(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
+   {1.1, http.MethodGet, `asns/?(\.json)?$`, asn.V11ReadAll(d.DB), 
auth.PrivLevelReadOnly, Authenticated, nil},
+   {1.1, http.MethodGet, `asns/{id}$`, 
api.ReadHandler(asn.GetRefTypeV11(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
+   {1.1, http.MethodPut, `asns/{id}$`, 
api.UpdateHandler(asn.GetRefTypeV11(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+   {1.1, http.MethodPost, `asns/?$`, 
api.CreateHandler(asn.GetRefTypeV11(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+   {1.1, http.MethodDelete, `asns/{id}$`, 
api.DeleteHandler(asn.GetRefTypeV11(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
 
//CacheGroup: CRUD
-   {1.2, http.MethodGet, `cachegroups/?(\.json)?$`, 
api.ReadHandler(cachegroup.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
-   {1.2, http.MethodGet, `cachegroups/{id}$`, 
api.ReadHandler(cachegroup.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
-   {1.2, http.MethodPut, `cachegroups/{id}$`, 
api.UpdateHandler(cachegroup.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-   {1.2, http.MethodPost, `cachegroups/?$`, 
api.CreateHandler(cachegroup.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-   {1.2, http.MethodDelete, `cachegroups/{id}$`, 
api.DeleteHandler(cachegroup.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+   {1.1, http.MethodGet, `cachegroups/?(\.json)?$`, 
api.ReadHandler(cachegroup.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
+   {1.1, http.MethodGet, `cachegroups/{id}$`, 
api.ReadHandler(cachegroup.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
+   {1.1, http.MethodPut, `cachegroups/{id}$`, 
api.UpdateHandler(cachegroup.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+   {1.1, http.MethodPost, `cachegroups/?$`, 
api.CreateHandler(cachegroup.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+   {1.1, http.MethodDelete, `cachegroups/{id}$`, 
api.DeleteHandler(cachegroup.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
 
//CDN
-   {1.2, http.MethodGet, `cdns/capacity$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
-   {1.2, http.MethodGet, `cdns/configs$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
-   {1.2, http.MethodGet, `cdns/domains$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
-   {1.2, http.MethodGet, `cdns/health$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
-   {1.2, http.MethodGet, `cdns/routing$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
+   {1.1, http.MethodGet, `cdns/capacity$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
+   {1.1, http.MethodGet, `cdns/configs$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
+   {1.1, http.MethodGet, `cdns/domains$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
+   {1.1, http.MethodGet, `cdns/health$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
+   {1.1, http.MethodGet, `cdns/routing$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
 
//CDN: CRUD
-   {1.2, http.MethodGet, 

[GitHub] mitchell852 commented on a change in pull request #2222: Add TO Go 1.1 routes

2018-05-04 Thread GitBox
mitchell852 commented on a change in pull request #: Add TO Go 1.1 routes
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/#discussion_r186127827
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/routes.go
 ##
 @@ -77,106 +77,107 @@ func Routes(d ServerData) ([]Route, []RawRoute, 
http.Handler, error) {
// 1.2 routes are simply a Go replacement for the equivalent 
Perl route. They may or may not conform with the API guidelines 
(https://cwiki.apache.org/confluence/display/TC/API+Guidelines).
 
 Review comment:
   can you change this to say 1.1 and 1.2 routes are simply


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] asfgit commented on issue #2229: Add Traffic Ops Golang deliveryservicesregexes

2018-05-04 Thread GitBox
asfgit commented on issue #2229: Add Traffic Ops Golang deliveryservicesregexes
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2229#issuecomment-386760085
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/incubator-trafficcontrol-PR/1523/
   Test FAILed.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


Jenkins build is back to normal : incubator-trafficcontrol-PR #1525

2018-05-04 Thread Apache Jenkins Server
See 




Build failed in Jenkins: incubator-trafficcontrol-PR-rat #808

2018-05-04 Thread Apache Jenkins Server
See 


--
Started by upstream project "incubator-trafficcontrol-PR" build number 1525
originally caused by:
 GitHub pull request #2229 of commit f63fdb5fba63b96e49e928fd836348a8c8733e10, 
no merge conflicts.
[EnvInject] - Loading node environment variables.
Building remotely on H25 (ubuntu xenial) in workspace 

[incubator-trafficcontrol-PR-rat] $ /bin/bash -xe 
/tmp/jenkins7074122740515417113.sh
+ rm -rf 

 

 '
[operations-center-context] Requesting copy of artifacts matching '**/*.tar.gz' 
from 'Last successful build (either stable or unstable)' of 
incubator-trafficcontrol-PR
Build timed out (after 3 minutes). Marking the build as aborted.


[GitHub] asfgit commented on issue #2229: Add Traffic Ops Golang deliveryservicesregexes

2018-05-04 Thread GitBox
asfgit commented on issue #2229: Add Traffic Ops Golang deliveryservicesregexes
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2229#issuecomment-386769915
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/incubator-trafficcontrol-PR/1525/
   Test PASSed.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


Build failed in Jenkins: incubator-trafficcontrol-PR #1523

2018-05-04 Thread Apache Jenkins Server
See 


--
GitHub pull request #2229 of commit b3bd2a69deb797fc6277849167c95a391c2af37e, 
no merge conflicts.
Setting status of b3bd2a69deb797fc6277849167c95a391c2af37e to PENDING with url 
https://builds.apache.org/job/incubator-trafficcontrol-PR/1523/ and message: 
'Build started sha1 is merged.'
Using context: default
[EnvInject] - Loading node environment variables.
Building remotely on H23 (ubuntu xenial) in workspace 

Cloning the remote Git repository
Cloning repository git://github.com/apache/incubator-trafficcontrol.git
 > git init  # 
 > timeout=10
Fetching upstream changes from 
git://github.com/apache/incubator-trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress 
 > git://github.com/apache/incubator-trafficcontrol.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url 
 > git://github.com/apache/incubator-trafficcontrol.git # timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # 
 > timeout=10
 > git config remote.origin.url 
 > git://github.com/apache/incubator-trafficcontrol.git # timeout=10
Fetching upstream changes from 
git://github.com/apache/incubator-trafficcontrol.git
using GIT_SSH to set credentials 
 > git fetch --tags --progress 
 > git://github.com/apache/incubator-trafficcontrol.git 
 > +refs/pull/*:refs/remotes/origin/pr/*
 > git rev-parse b3bd2a69deb797fc6277849167c95a391c2af37e^{commit} # timeout=10
 > git rev-parse origin/b3bd2a69deb797fc6277849167c95a391c2af37e^{commit} # 
 > timeout=10
 > git rev-parse b3bd2a69deb797fc6277849167c95a391c2af37e^{commit} # timeout=10
ERROR: Couldn't find any revision to build. Verify the repository and branch 
configuration for this job.
Retrying after 10 seconds
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url 
 > git://github.com/apache/incubator-trafficcontrol.git # timeout=10
Fetching upstream changes from 
git://github.com/apache/incubator-trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress 
 > git://github.com/apache/incubator-trafficcontrol.git 
 > +refs/pull/*:refs/remotes/origin/pr/*
 > git rev-parse b3bd2a69deb797fc6277849167c95a391c2af37e^{commit} # timeout=10
 > git rev-parse origin/b3bd2a69deb797fc6277849167c95a391c2af37e^{commit} # 
 > timeout=10
 > git rev-parse b3bd2a69deb797fc6277849167c95a391c2af37e^{commit} # timeout=10
ERROR: Couldn't find any revision to build. Verify the repository and branch 
configuration for this job.
Retrying after 10 seconds
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url 
 > git://github.com/apache/incubator-trafficcontrol.git # timeout=10
Fetching upstream changes from 
git://github.com/apache/incubator-trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress 
 > git://github.com/apache/incubator-trafficcontrol.git 
 > +refs/pull/*:refs/remotes/origin/pr/*
 > git rev-parse b3bd2a69deb797fc6277849167c95a391c2af37e^{commit} # timeout=10
 > git rev-parse origin/b3bd2a69deb797fc6277849167c95a391c2af37e^{commit} # 
 > timeout=10
 > git rev-parse b3bd2a69deb797fc6277849167c95a391c2af37e^{commit} # timeout=10
ERROR: Couldn't find any revision to build. Verify the repository and branch 
configuration for this job.
Archiving artifacts
Performing Post build task...
Match found for : : True
Logical operation result is TRUE
Running script  : export COMPOSE_HTTP_TIMEOUT=120
./bin/docker-compose -p "${BUILD_TAG}" -f 
infrastructure/docker/build/docker-compose.yml down -v
[incubator-trafficcontrol-PR] $ /bin/bash -xe /tmp/jenkins3052919418525723964.sh
+ export COMPOSE_HTTP_TIMEOUT=120
+ COMPOSE_HTTP_TIMEOUT=120
+ ./bin/docker-compose -p jenkins-incubator-trafficcontrol-PR-1523 -f 
infrastructure/docker/build/docker-compose.yml down -v
/tmp/jenkins3052919418525723964.sh: line 3: ./bin/docker-compose: No such file 
or directory
POST BUILD TASK : FAILURE
END OF POST BUILD TASK : 0


Build failed in Jenkins: incubator-trafficcontrol-PR #1524

2018-05-04 Thread Apache Jenkins Server
See 


--
GitHub pull request #2229 of commit ce5bb38e55dbf01d20941b11985f61bd8c207fc2, 
no merge conflicts.
Setting status of ce5bb38e55dbf01d20941b11985f61bd8c207fc2 to PENDING with url 
https://builds.apache.org/job/incubator-trafficcontrol-PR/1524/ and message: 
'Build started sha1 is merged.'
Using context: default
[EnvInject] - Loading node environment variables.
Building remotely on H24 (ubuntu xenial) in workspace 

Cloning the remote Git repository
Cloning repository git://github.com/apache/incubator-trafficcontrol.git
 > git init  # 
 > timeout=10
Fetching upstream changes from 
git://github.com/apache/incubator-trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress 
 > git://github.com/apache/incubator-trafficcontrol.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url 
 > git://github.com/apache/incubator-trafficcontrol.git # timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # 
 > timeout=10
 > git config remote.origin.url 
 > git://github.com/apache/incubator-trafficcontrol.git # timeout=10
Fetching upstream changes from 
git://github.com/apache/incubator-trafficcontrol.git
using GIT_SSH to set credentials 
 > git fetch --tags --progress 
 > git://github.com/apache/incubator-trafficcontrol.git 
 > +refs/pull/*:refs/remotes/origin/pr/*
 > git rev-parse ce5bb38e55dbf01d20941b11985f61bd8c207fc2^{commit} # timeout=10
 > git rev-parse origin/ce5bb38e55dbf01d20941b11985f61bd8c207fc2^{commit} # 
 > timeout=10
 > git rev-parse ce5bb38e55dbf01d20941b11985f61bd8c207fc2^{commit} # timeout=10
ERROR: Couldn't find any revision to build. Verify the repository and branch 
configuration for this job.
Retrying after 10 seconds
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url 
 > git://github.com/apache/incubator-trafficcontrol.git # timeout=10
Fetching upstream changes from 
git://github.com/apache/incubator-trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress 
 > git://github.com/apache/incubator-trafficcontrol.git 
 > +refs/pull/*:refs/remotes/origin/pr/*
 > git rev-parse ce5bb38e55dbf01d20941b11985f61bd8c207fc2^{commit} # timeout=10
 > git rev-parse origin/ce5bb38e55dbf01d20941b11985f61bd8c207fc2^{commit} # 
 > timeout=10
 > git rev-parse ce5bb38e55dbf01d20941b11985f61bd8c207fc2^{commit} # timeout=10
ERROR: Couldn't find any revision to build. Verify the repository and branch 
configuration for this job.
Retrying after 10 seconds
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url 
 > git://github.com/apache/incubator-trafficcontrol.git # timeout=10
Fetching upstream changes from 
git://github.com/apache/incubator-trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress 
 > git://github.com/apache/incubator-trafficcontrol.git 
 > +refs/pull/*:refs/remotes/origin/pr/*
 > git rev-parse ce5bb38e55dbf01d20941b11985f61bd8c207fc2^{commit} # timeout=10
 > git rev-parse origin/ce5bb38e55dbf01d20941b11985f61bd8c207fc2^{commit} # 
 > timeout=10
 > git rev-parse ce5bb38e55dbf01d20941b11985f61bd8c207fc2^{commit} # timeout=10
ERROR: Couldn't find any revision to build. Verify the repository and branch 
configuration for this job.
Archiving artifacts
Performing Post build task...
Match found for : : True
Logical operation result is TRUE
Running script  : export COMPOSE_HTTP_TIMEOUT=120
./bin/docker-compose -p "${BUILD_TAG}" -f 
infrastructure/docker/build/docker-compose.yml down -v
[incubator-trafficcontrol-PR] $ /bin/bash -xe /tmp/jenkins3261573473875183659.sh
+ export COMPOSE_HTTP_TIMEOUT=120
+ COMPOSE_HTTP_TIMEOUT=120
+ ./bin/docker-compose -p jenkins-incubator-trafficcontrol-PR-1524 -f 
infrastructure/docker/build/docker-compose.yml down -v
/tmp/jenkins3261573473875183659.sh: line 3: ./bin/docker-compose: No such file 
or directory
POST BUILD TASK : FAILURE
END OF POST BUILD TASK : 0


[GitHub] asfgit commented on issue #2229: Add Traffic Ops Golang deliveryservicesregexes

2018-05-04 Thread GitBox
asfgit commented on issue #2229: Add Traffic Ops Golang deliveryservicesregexes
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2229#issuecomment-386766718
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/incubator-trafficcontrol-PR/1524/
   Test FAILed.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


Jenkins build is back to normal : incubator-trafficcontrol-PR-rat #801

2018-05-04 Thread Apache Jenkins Server
See 




[GitHub] mitchell852 opened a new pull request #2227: ensures that the state changes when the url query param changes for c…

2018-05-04 Thread GitBox
mitchell852 opened a new pull request #2227: ensures that the state changes 
when the url query param changes for c…
URL: https://github.com/apache/incubator-trafficcontrol/pull/2227
 
 
   …ustom menu items
   
   fixes a bug in TP's custom menu found by @guzzijason


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rob05c commented on issue #2229: Add Traffic Ops Golang deliveryservicesregexes

2018-05-04 Thread GitBox
rob05c commented on issue #2229: Add Traffic Ops Golang deliveryservicesregexes
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2229#issuecomment-386754750
 
 
   This is ready, in terms of functionality. I'm not sure how to write API 
tests for it though. Everything is ID based, deliveryservice_regex doesn't have 
a non-ID primary key.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rob05c commented on a change in pull request #2222: Add TO Go 1.1 routes

2018-05-04 Thread GitBox
rob05c commented on a change in pull request #: Add TO Go 1.1 routes
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/#discussion_r186188020
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/routes.go
 ##
 @@ -77,106 +77,107 @@ func Routes(d ServerData) ([]Route, []RawRoute, 
http.Handler, error) {
// 1.2 routes are simply a Go replacement for the equivalent 
Perl route. They may or may not conform with the API guidelines 
(https://cwiki.apache.org/confluence/display/TC/API+Guidelines).
 
 Review comment:
   Done


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rob05c commented on a change in pull request #2222: Add TO Go 1.1 routes

2018-05-04 Thread GitBox
rob05c commented on a change in pull request #: Add TO Go 1.1 routes
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/#discussion_r186187979
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/routes.go
 ##
 @@ -77,106 +77,107 @@ func Routes(d ServerData) ([]Route, []RawRoute, 
http.Handler, error) {
// 1.2 routes are simply a Go replacement for the equivalent 
Perl route. They may or may not conform with the API guidelines 
(https://cwiki.apache.org/confluence/display/TC/API+Guidelines).
 
//ASN: CRUD
-   {1.2, http.MethodGet, `asns/?(\.json)?$`, 
api.ReadHandler(asn.GetRefType(), d.DB), auth.PrivLevelReadOnly, Authenticated, 
nil},
-   {1.2, http.MethodGet, `asns/{id}$`, 
api.ReadHandler(asn.GetRefType(), d.DB), auth.PrivLevelReadOnly, Authenticated, 
nil},
-   {1.2, http.MethodPut, `asns/{id}$`, 
api.UpdateHandler(asn.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-   {1.2, http.MethodPost, `asns/?$`, 
api.CreateHandler(asn.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-   {1.2, http.MethodDelete, `asns/{id}$`, 
api.DeleteHandler(asn.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+   {1.2, http.MethodGet, `asns/?(\.json)?$`, 
api.ReadHandler(asn.GetRefTypeV12(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
+   {1.1, http.MethodGet, `asns/?(\.json)?$`, asn.V11ReadAll(d.DB), 
auth.PrivLevelReadOnly, Authenticated, nil},
+   {1.1, http.MethodGet, `asns/{id}$`, 
api.ReadHandler(asn.GetRefTypeV11(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
+   {1.1, http.MethodPut, `asns/{id}$`, 
api.UpdateHandler(asn.GetRefTypeV11(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+   {1.1, http.MethodPost, `asns/?$`, 
api.CreateHandler(asn.GetRefTypeV11(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+   {1.1, http.MethodDelete, `asns/{id}$`, 
api.DeleteHandler(asn.GetRefTypeV11(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
 
//CacheGroup: CRUD
-   {1.2, http.MethodGet, `cachegroups/?(\.json)?$`, 
api.ReadHandler(cachegroup.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
-   {1.2, http.MethodGet, `cachegroups/{id}$`, 
api.ReadHandler(cachegroup.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
-   {1.2, http.MethodPut, `cachegroups/{id}$`, 
api.UpdateHandler(cachegroup.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-   {1.2, http.MethodPost, `cachegroups/?$`, 
api.CreateHandler(cachegroup.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-   {1.2, http.MethodDelete, `cachegroups/{id}$`, 
api.DeleteHandler(cachegroup.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+   {1.1, http.MethodGet, `cachegroups/?(\.json)?$`, 
api.ReadHandler(cachegroup.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
+   {1.1, http.MethodGet, `cachegroups/{id}$`, 
api.ReadHandler(cachegroup.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
+   {1.1, http.MethodPut, `cachegroups/{id}$`, 
api.UpdateHandler(cachegroup.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+   {1.1, http.MethodPost, `cachegroups/?$`, 
api.CreateHandler(cachegroup.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+   {1.1, http.MethodDelete, `cachegroups/{id}$`, 
api.DeleteHandler(cachegroup.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
 
//CDN
-   {1.2, http.MethodGet, `cdns/capacity$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
-   {1.2, http.MethodGet, `cdns/configs$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
-   {1.2, http.MethodGet, `cdns/domains$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
-   {1.2, http.MethodGet, `cdns/health$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
-   {1.2, http.MethodGet, `cdns/routing$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
+   {1.1, http.MethodGet, `cdns/capacity$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
+   {1.1, http.MethodGet, `cdns/configs$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
+   {1.1, http.MethodGet, `cdns/domains$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
+   {1.1, http.MethodGet, `cdns/health$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
+   {1.1, http.MethodGet, `cdns/routing$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
 
//CDN: CRUD
-   {1.2, http.MethodGet, 

Build failed in Jenkins: incubator-trafficcontrol-PR-rat #802

2018-05-04 Thread Apache Jenkins Server
See 


--
Started by upstream project "incubator-trafficcontrol-PR" build number 1519
originally caused by:
 GitHub pull request #2227 of commit 28253114c0fbd1dd890a4a5228542fe5e13d7768, 
no merge conflicts.
[EnvInject] - Loading node environment variables.
Building remotely on H21 (ubuntu xenial) in workspace 

[incubator-trafficcontrol-PR-rat] $ /bin/bash -xe 
/tmp/jenkins7405437762456828934.sh
+ rm -rf 

 

 '
[operations-center-context] Requesting copy of artifacts matching '**/*.tar.gz' 
from 'Last successful build (either stable or unstable)' of 
incubator-trafficcontrol-PR
[operations-center-context] Copied 1 artifacts matching '**/*.tar.gz' from 
'Last successful build (either stable or unstable)' of 
incubator-trafficcontrol-PR:
[operations-center-context]   apache-trafficcontrol-2.3.0-incubating.tar.gz
[incubator-trafficcontrol-PR-rat] $ /bin/bash -xe 
/tmp/jenkins522692472377998715.sh
+ set -exu
++ ls apache-trafficcontrol-2.3.0-incubating.tar.gz
+ tarball=apache-trafficcontrol-2.3.0-incubating.tar.gz
+ tar xzf apache-trafficcontrol-2.3.0-incubating.tar.gz
++ pwd
++ basename apache-trafficcontrol-2.3.0-incubating.tar.gz .tar.gz
+ 
tcdir=
+ cd 

++ date +%Y
+ egrep 'Copyright .*-?2018 The Apache Software Foundation' NOTICE
Copyright 2016-2018 The Apache Software Foundation
+ set +x
Searching for class files:
PASSED: No class files found.
Searching for jar files:
PASSED: No jar files found.
Searching for tar files:
PASSED: No tar files found.
Searching for tgz files:
PASSED: No tgz files found.
Searching for zip files:
PASSED: No zip files found.
++ curl 
https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.13-SNAPSHOT/
 -sN
++ grep jar
++ grep -ve md5 -e sha1
++ awk -F '"' '{print $2}'
++ sort -r
++ head -n 1
++ cut -d / -f 12
+ ratver=apache-rat-0.13-20180329.151017-101.jar
++ mktemp -d
+ ratdir=/tmp/tmp.wFX0k3vxjt
+ ratjar=/tmp/tmp.wFX0k3vxjt/apache-rat-0.13.SNAPSHOT.jar
+ curl -L -o /tmp/tmp.wFX0k3vxjt/apache-rat-0.13.SNAPSHOT.jar 
https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.13-SNAPSHOT/apache-rat-0.13-20180329.151017-101.jar
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0 
74 1587k   74 1184k0 0  1152k  0  0:00:01  0:00:01 --:--:-- 
1152k100 1587k  100 1587k0 0  1537k  0  0:00:01  0:00:01 --:--:-- 
1538k
+ curl -L -o /tmp/tmp.wFX0k3vxjt/apache-rat-0.13.SNAPSHOT.jar.sha1 
https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.13-SNAPSHOT/apache-rat-0.13-20180329.151017-101.jar.sha1
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 
010040  100400 0 78  0 --:--:-- --:--:-- --:--:--78
++ sha1sum /tmp/tmp.wFX0k3vxjt/apache-rat-0.13.SNAPSHOT.jar
++ awk '{print $1}'
++ cat /tmp/tmp.wFX0k3vxjt/apache-rat-0.13.SNAPSHOT.jar.sha1
+ [[ 635c5eccad31cff1d713c12144eaae7fc9f10cf4 == 
635c5eccad31cff1d713c12144eaae7fc9f10cf4 ]]
++ pwd
++ pwd
+ java -jar /tmp/tmp.wFX0k3vxjt/apache-rat-0.13.SNAPSHOT.jar -E 

 -d 

+ rm -rf /tmp/tmp.wFX0k3vxjt
++ perl -lne 'print $1 if /(\d+) Unknown Licenses/' ratreport.txt
+ unknown=56
+ [[ 56 != 0 ]]
+ echo '56 Unknown Licenses'
56 Unknown Licenses
+ perl -lne 'print if /Files with unapproved licenses:/ .. /^\*\*\*/' 
ratreport.txt
+ sed s:::
Files with unapproved licenses:

  
apache-trafficcontrol-2.3.0-incubating/grove/vendor/code.cloudfoundry.org/bytefmt/bytes.go
  
apache-trafficcontrol-2.3.0-incubating/grove/vendor/code.cloudfoundry.org/bytefmt/bytes_test.go
  
apache-trafficcontrol-2.3.0-incubating/grove/vendor/code.cloudfoundry.org/bytefmt/formatters_suite_test.go
  

[GitHub] asfgit commented on issue #2222: Add TO Go 1.1 routes

2018-05-04 Thread GitBox
asfgit commented on issue #: Add TO Go 1.1 routes
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/#issuecomment-386733440
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/incubator-trafficcontrol-PR/1520/
   Test PASSed.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] ajschmidt opened a new pull request #2228: Added the Get API in Go for the DeliveryserviceServers endpoint

2018-05-04 Thread GitBox
ajschmidt opened a new pull request #2228: Added the Get API in Go for the 
DeliveryserviceServers endpoint
URL: https://github.com/apache/incubator-trafficcontrol/pull/2228
 
 
   This is the first of 6 methods in the API.  More to come. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] asfgit commented on issue #2227: ensures that the state changes when the url query param changes for c…

2018-05-04 Thread GitBox
asfgit commented on issue #2227: ensures that the state changes when the url 
query param changes for c…
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2227#issuecomment-386714004
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/incubator-trafficcontrol-PR/1519/
   Test PASSed.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] asfgit commented on issue #2228: Added the Get API in Go for the DeliveryserviceServers endpoint

2018-05-04 Thread GitBox
asfgit commented on issue #2228: Added the Get API in Go for the 
DeliveryserviceServers endpoint
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2228#issuecomment-386743973
 
 
   Can one of the admins verify this patch?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] asfgit commented on issue #2108: create roles crud endpoints in golang

2018-05-04 Thread GitBox
asfgit commented on issue #2108: create roles crud endpoints in golang
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2108#issuecomment-386753582
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/incubator-trafficcontrol-PR/1522/
   Test PASSed.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mitchell852 closed pull request #2222: Add TO Go 1.1 routes

2018-05-04 Thread GitBox
mitchell852 closed pull request #: Add TO Go 1.1 routes
URL: https://github.com/apache/incubator-trafficcontrol/pull/
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/traffic_ops/traffic_ops_golang/asn/asns.go 
b/traffic_ops/traffic_ops_golang/asn/asns.go
index 4a5db6707..ff77b4410 100644
--- a/traffic_ops/traffic_ops_golang/asn/asns.go
+++ b/traffic_ops/traffic_ops_golang/asn/asns.go
@@ -21,8 +21,10 @@ package asn
 
 import (
"errors"
+   "net/http"
"fmt"
"strconv"
+   "encoding/json"
 
"github.com/apache/incubator-trafficcontrol/lib/go-log"
"github.com/apache/incubator-trafficcontrol/lib/go-tc"
@@ -39,33 +41,40 @@ import (
 const ASNsPrivLevel = 10
 
 //we need a type alias to define functions on
-type TOASN tc.ASNNullable
+type TOASNV11 tc.ASNNullable
 
-//the refType is passed into the handlers where a copy of its type is used to 
decode the json.
-var refType = TOASN(tc.ASNNullable{})
+type TOASNV12 TOASNV11
 
-func GetRefType() *TOASN {
-   return 
+func GetRefTypeV11() *TOASNV11 {
+   asn := TOASNV11(tc.ASNNullable{})
+   return 
 }
 
-func (asn TOASN) GetKeyFieldsInfo() []api.KeyFieldInfo {
+func GetRefTypeV12() *TOASNV12 {
+   asn := TOASNV12(tc.ASNNullable{})
+   return 
+}
+
+func (asn TOASNV11) GetKeyFieldsInfo() []api.KeyFieldInfo {
return []api.KeyFieldInfo{{"id", api.GetIntKey}}
 }
 
+// func (asn TOASNV12) GetKeyFieldsInfo() []api.KeyFieldInfo { return 
TOASNV11(asn).GetKeyFieldsInfo() }
+
 //Implementation of the Identifier, Validator interface functions
-func (asn TOASN) GetKeys() (map[string]interface{}, bool) {
+func (asn TOASNV11) GetKeys() (map[string]interface{}, bool) {
if asn.ID == nil {
return map[string]interface{}{"id": 0}, false
}
return map[string]interface{}{"id": *asn.ID}, true
 }
 
-func (asn *TOASN) SetKeys(keys map[string]interface{}) {
+func (asn *TOASNV11) SetKeys(keys map[string]interface{}) {
i, _ := keys["id"].(int) //this utilizes the non panicking type 
assertion, if the thrown away ok variable is false i will be the zero of the 
type, 0 here.
asn.ID = 
 }
 
-func (asn TOASN) GetAuditName() string {
+func (asn TOASNV11) GetAuditName() string {
if asn.ASN != nil {
return strconv.Itoa(*asn.ASN)
}
@@ -75,11 +84,11 @@ func (asn TOASN) GetAuditName() string {
return "unknown"
 }
 
-func (asn TOASN) GetType() string {
+func (asn TOASNV11) GetType() string {
return "asn"
 }
 
-func (asn TOASN) Validate(db *sqlx.DB) []error {
+func (asn TOASNV11) Validate(db *sqlx.DB) []error {
errs := validation.Errors{
"asn":  validation.Validate(asn.ASN, validation.NotNil, 
validation.Min(0)),
"cachegroupId": validation.Validate(asn.CachegroupID, 
validation.NotNil, validation.Min(0)),
@@ -87,14 +96,14 @@ func (asn TOASN) Validate(db *sqlx.DB) []error {
return tovalidate.ToErrors(errs)
 }
 
-//The TOASN implementation of the Creator interface
+//The TOASNV11 implementation of the Creator interface
 //all implementations of Creator should use transactions and return the proper 
errorType
 //ParsePQUniqueConstraintError is used to determine if a asn with conflicting 
values exists
 //if so, it will return an errorType of DataConflict and the type should be 
appended to the
 //generic error message returned
 //The insert sql returns the id and lastUpdated values of the newly inserted 
asn and have
 //to be added to the struct
-func (asn *TOASN) Create(db *sqlx.DB, user auth.CurrentUser) (error, 
tc.ApiErrorType) {
+func (asn *TOASNV11) Create(db *sqlx.DB, user auth.CurrentUser) (error, 
tc.ApiErrorType) {
rollbackTransaction := true
tx, err := db.Beginx()
defer func() {
@@ -156,9 +165,64 @@ func (asn *TOASN) Create(db *sqlx.DB, user 
auth.CurrentUser) (error, tc.ApiError
return nil, tc.NoError
 }
 
-func (asn *TOASN) Read(db *sqlx.DB, parameters map[string]string, user 
auth.CurrentUser) ([]interface{}, []error, tc.ApiErrorType) {
-   var rows *sqlx.Rows
+func (asn *TOASNV12) Read(db *sqlx.DB, parameters map[string]string, user 
auth.CurrentUser) ([]interface{}, []error, tc.ApiErrorType) {
+   asns, err, errType := read(db, parameters, user)
+   if len(err) > 0 {
+   return nil, err, errType
+   }
+   iasns := make([]interface{}, len(asns), len(asns))
+   for i, readASN := range asns {
+   iasns[i] = readASN
+   }
+   return iasns, err, errType
+}
+
+// Read implements the /api/1.1/asns/id route for reading individual ASNs.
+// Note this does NOT correctly implement the 1.1 API for all ASNs, because 
that route is in a 

Build failed in Jenkins: incubator-trafficcontrol-PR-rat #803

2018-05-04 Thread Apache Jenkins Server
See 


--
Started by upstream project "incubator-trafficcontrol-PR" build number 1520
originally caused by:
 GitHub pull request # of commit a013533909cd770d70d1b0548461897f58a8a79c, 
no merge conflicts.
[EnvInject] - Loading node environment variables.
Building remotely on H27 (ubuntu xenial) in workspace 

[incubator-trafficcontrol-PR-rat] $ /bin/bash -xe 
/tmp/jenkins258456446592400832.sh
+ rm -rf 

 

 '
[operations-center-context] Requesting copy of artifacts matching '**/*.tar.gz' 
from 'Last successful build (either stable or unstable)' of 
incubator-trafficcontrol-PR
[operations-center-context] Copied 1 artifacts matching '**/*.tar.gz' from 
'Last successful build (either stable or unstable)' of 
incubator-trafficcontrol-PR:
[operations-center-context]   apache-trafficcontrol-2.3.0-incubating.tar.gz
[incubator-trafficcontrol-PR-rat] $ /bin/bash -xe 
/tmp/jenkins9020930492685637206.sh
+ set -exu
++ ls apache-trafficcontrol-2.3.0-incubating.tar.gz
+ tarball=apache-trafficcontrol-2.3.0-incubating.tar.gz
+ tar xzf apache-trafficcontrol-2.3.0-incubating.tar.gz
++ pwd
++ basename apache-trafficcontrol-2.3.0-incubating.tar.gz .tar.gz
+ 
tcdir=
+ cd 

++ date +%Y
+ egrep 'Copyright .*-?2018 The Apache Software Foundation' NOTICE
Copyright 2016-2018 The Apache Software Foundation
+ set +x
Searching for class files:
PASSED: No class files found.
Searching for jar files:
PASSED: No jar files found.
Searching for tar files:
PASSED: No tar files found.
Searching for tgz files:
PASSED: No tgz files found.
Searching for zip files:
PASSED: No zip files found.
++ curl 
https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.13-SNAPSHOT/
 -sN
++ grep jar
++ grep -ve md5 -e sha1
++ sort -r
++ awk -F '"' '{print $2}'
++ head -n 1
++ cut -d / -f 12
+ ratver=apache-rat-0.13-20180329.151017-101.jar
++ mktemp -d
+ ratdir=/tmp/tmp.56hh14ifxD
+ ratjar=/tmp/tmp.56hh14ifxD/apache-rat-0.13.SNAPSHOT.jar
+ curl -L -o /tmp/tmp.56hh14ifxD/apache-rat-0.13.SNAPSHOT.jar 
https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.13-SNAPSHOT/apache-rat-0.13-20180329.151017-101.jar
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0  
0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0100 
1587k  100 1587k0 0  1703k  0 --:--:-- --:--:-- --:--:-- 1703k
+ curl -L -o /tmp/tmp.56hh14ifxD/apache-rat-0.13.SNAPSHOT.jar.sha1 
https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.13-SNAPSHOT/apache-rat-0.13-20180329.151017-101.jar.sha1
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0  
0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0100 
   40  100400 0 72  0 --:--:-- --:--:-- --:--:--72
++ sha1sum /tmp/tmp.56hh14ifxD/apache-rat-0.13.SNAPSHOT.jar
++ awk '{print $1}'
++ cat /tmp/tmp.56hh14ifxD/apache-rat-0.13.SNAPSHOT.jar.sha1
+ [[ 635c5eccad31cff1d713c12144eaae7fc9f10cf4 == 
635c5eccad31cff1d713c12144eaae7fc9f10cf4 ]]
++ pwd
++ pwd
+ java -jar /tmp/tmp.56hh14ifxD/apache-rat-0.13.SNAPSHOT.jar -E 

 -d 

+ rm -rf /tmp/tmp.56hh14ifxD
++ perl -lne 'print $1 if /(\d+) Unknown Licenses/' ratreport.txt
+ unknown=56
+ [[ 56 != 0 ]]
+ echo '56 Unknown Licenses'
56 Unknown Licenses
+ perl -lne 'print if /Files with unapproved licenses:/ .. /^\*\*\*/' 
ratreport.txt
+ sed s:::
Files with unapproved licenses:

  
apache-trafficcontrol-2.3.0-incubating/grove/vendor/code.cloudfoundry.org/bytefmt/bytes.go
  
apache-trafficcontrol-2.3.0-incubating/grove/vendor/code.cloudfoundry.org/bytefmt/bytes_test.go
  

[GitHub] asfgit commented on issue #2124: Add TO Go deliveryservices routes

2018-05-04 Thread GitBox
asfgit commented on issue #2124: Add TO Go deliveryservices routes
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2124#issuecomment-386742179
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/incubator-trafficcontrol-PR/1521/
   Test PASSed.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


Build failed in Jenkins: incubator-trafficcontrol-traffic_ops-test #607

2018-05-04 Thread Apache Jenkins Server
See 


Changes:

[mitchell852] Add TO Go 1.1 routes

[rob05c] ensures that the state changes when the url query param changes for

--
[...truncated 84.17 KB...]
unit_golang_1  | coverage: 65.6% of statements
unit_golang_1  | ok 
github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/auth  
0.797s  coverage: 65.6% of statements
unit_golang_1  | === RUN   TestReadCacheGroups
unit_golang_1  | --- PASS: TestReadCacheGroups (0.00s)
unit_golang_1  | === RUN   TestFuncs
unit_golang_1  | --- PASS: TestFuncs (0.00s)
unit_golang_1  | === RUN   TestInterfaces
unit_golang_1  | --- PASS: TestInterfaces (0.00s)
unit_golang_1  | === RUN   TestValidate
unit_golang_1  | --- PASS: TestValidate (0.00s)
unit_golang_1  | PASS
unit_golang_1  | coverage: 20.6% of statements
unit_golang_1  | ok 
github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/cachegroup
0.019s  coverage: 20.6% of statements
unit_golang_1  | === RUN   TestReadCDNs
unit_golang_1  | --- PASS: TestReadCDNs (0.00s)
unit_golang_1  | === RUN   TestFuncs
unit_golang_1  | --- PASS: TestFuncs (0.00s)
unit_golang_1  | === RUN   TestInterfaces
unit_golang_1  | --- PASS: TestInterfaces (0.00s)
unit_golang_1  | === RUN   TestValidate
unit_golang_1  | --- PASS: TestValidate (0.00s)
unit_golang_1  | PASS
unit_golang_1  | coverage: 23.0% of statements
unit_golang_1  | ok 
github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/cdn   
0.022s  coverage: 23.0% of statements
unit_golang_1  | === RUN   TestLogLocation
unit_golang_1  | --- PASS: TestLogLocation (0.00s)
unit_golang_1  | === RUN   TestLoadConfig
unit_golang_1  | --- PASS: TestLoadConfig (0.00s)
unit_golang_1  | PASS
unit_golang_1  | coverage: 78.9% of statements
unit_golang_1  | ok 
github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/config
0.063s  coverage: 78.9% of statements
unit_golang_1  | === RUN   TestReadCoordinates
unit_golang_1  | --- PASS: TestReadCoordinates (0.00s)
unit_golang_1  | === RUN   TestFuncs
unit_golang_1  | --- PASS: TestFuncs (0.00s)
unit_golang_1  | === RUN   TestInterfaces
unit_golang_1  | --- PASS: TestInterfaces (0.00s)
unit_golang_1  | === RUN   TestValidate
unit_golang_1  | --- PASS: TestValidate (0.00s)
unit_golang_1  | PASS
unit_golang_1  | coverage: 23.7% of statements
unit_golang_1  | ok 
github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/coordinate
0.008s  coverage: 23.7% of statements
unit_golang_1  | === RUN   TestGetConfigParams
unit_golang_1  | --- PASS: TestGetConfigParams (0.00s)
unit_golang_1  | === RUN   TestMakeCRConfigConfig
unit_golang_1  | --- PASS: TestMakeCRConfigConfig (0.00s)
unit_golang_1  | === RUN   TestMakeDSes
unit_golang_1  | --- PASS: TestMakeDSes (0.00s)
unit_golang_1  | === RUN   TestGetServerProfileParams
unit_golang_1  | --- PASS: TestGetServerProfileParams (0.00s)
unit_golang_1  | === RUN   TestGetDSRegexesDomains
unit_golang_1  | --- PASS: TestGetDSRegexesDomains (0.00s)
unit_golang_1  | === RUN   TestGetStaticDNSEntries
unit_golang_1  | --- PASS: TestGetStaticDNSEntries (0.00s)
unit_golang_1  | === RUN   TestMakeLocations
unit_golang_1  | --- PASS: TestMakeLocations (0.00s)
unit_golang_1  | === RUN   TestGetServerParams
unit_golang_1  | --- PASS: TestGetServerParams (0.00s)
unit_golang_1  | === RUN   TestGetAllServers
unit_golang_1  | --- PASS: TestGetAllServers (0.00s)
unit_golang_1  | === RUN   TestGetServerDSNames
unit_golang_1  | --- PASS: TestGetServerDSNames (0.00s)
unit_golang_1  | === RUN   TestGetServerDSes
unit_golang_1  | --- PASS: TestGetServerDSes (0.00s)
unit_golang_1  | === RUN   TestGetCDNInfo
unit_golang_1  | --- PASS: TestGetCDNInfo (0.00s)
unit_golang_1  | === RUN   TestGetCDNNameFromID
unit_golang_1  | --- PASS: TestGetCDNNameFromID (0.00s)
unit_golang_1  | === RUN   TestGetSnapshot
unit_golang_1  | --- PASS: TestGetSnapshot (0.00s)
unit_golang_1  | === RUN   TestSnapshot
unit_golang_1  | --- PASS: TestSnapshot (0.00s)
unit_golang_1  | === RUN   TestMakeStats
unit_golang_1  | --- PASS: TestMakeStats (0.00s)
unit_golang_1  | PASS
unit_golang_1  | coverage: 50.7% of statements
unit_golang_1  | ok 
github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/crconfig
  0.012s  coverage: 50.7% of statements
unit_golang_1  | === RUN   TestBuildQuery
unit_golang_1  | --- PASS: TestBuildQuery (0.00s)
unit_golang_1  | PASS
unit_golang_1  | coverage: 59.6% of statements
unit_golang_1  | ok 
github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/dbhelpers
 0.031s  coverage: 59.6% of statements
unit_golang_1  | === RUN   TestInterfaces
unit_golang_1  | --- PASS: TestInterfaces (0.00s)
unit_golang_1  | === RUN   TestValidateErrors
unit_golang_1  | --- PASS: TestValidateErrors (0.00s)
unit_golang_1  | PASS

[GitHub] rob05c opened a new pull request #2229: Add Traffic Ops Golang deliveryservicesregexes

2018-05-04 Thread GitBox
rob05c opened a new pull request #2229: Add Traffic Ops Golang 
deliveryservicesregexes
URL: https://github.com/apache/incubator-trafficcontrol/pull/2229
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rob05c closed pull request #2227: ensures that the state changes when the url query param changes for c…

2018-05-04 Thread GitBox
rob05c closed pull request #2227: ensures that the state changes when the url 
query param changes for c…
URL: https://github.com/apache/incubator-trafficcontrol/pull/2227
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/traffic_portal/app/src/modules/private/custom/index.js 
b/traffic_portal/app/src/modules/private/custom/index.js
index a46fbe6e4..c9ae8b919 100644
--- a/traffic_portal/app/src/modules/private/custom/index.js
+++ b/traffic_portal/app/src/modules/private/custom/index.js
@@ -20,7 +20,7 @@ module.exports = 
angular.module('trafficPortal.private.custom', [])
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('trafficPortal.private.custom', {
-   url: 'custom',
+   url: 'custom?url',
views: {
privateContent: {
templateUrl: 
'modules/private/custom/custom.tpl.html',


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rawlinp commented on a change in pull request #2124: Add TO Go deliveryservices routes

2018-05-04 Thread GitBox
rawlinp commented on a change in pull request #2124: Add TO Go deliveryservices 
routes
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2124#discussion_r186202885
 
 

 ##
 File path: 
traffic_ops/traffic_ops_golang/deliveryservice/deliveryservicesv12.go
 ##
 @@ -0,0 +1,326 @@
+package deliveryservice
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import (
+   "database/sql"
+   "errors"
+   "fmt"
+   "regexp"
+   "strings"
+
+   "github.com/apache/incubator-trafficcontrol/lib/go-tc"
+   "github.com/apache/incubator-trafficcontrol/lib/go-log"
+   
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/api"
+   
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/auth"
+   
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/config"
+   
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/tenant"
+   
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/tovalidate"
+
+   "github.com/asaskevich/govalidator"
+   "github.com/go-ozzo/ozzo-validation"
+   "github.com/jmoiron/sqlx"
+)
+
+type TODeliveryServiceV12 struct {
+   DS  *tc.DeliveryServiceNullableV12
+   Cfg config.Config
+   DB  *sqlx.DB
+}
+
+func GetRefTypeV12(cfg config.Config, db *sqlx.DB) *TODeliveryServiceV12 {
+   return {Cfg: cfg, DB: db, DS: 
{}}
+}
+
+func (ds TODeliveryServiceV12) GetKeyFieldsInfo() []api.KeyFieldInfo {
+   return []api.KeyFieldInfo{{"id", api.GetIntKey}}
+}
+
+func (tods TODeliveryServiceV12) GetKeys() (map[string]interface{}, bool) {
+   if tods.DS.ID == nil {
+   return map[string]interface{}{"id": 0}, false
+   }
+   return map[string]interface{}{"id": *tods.DS.ID}, true
+}
+
+func (tods *TODeliveryServiceV12) SetKeys(keys map[string]interface{}) {
+   i, _ := keys["id"].(int) //this utilizes the non panicking type 
assertion, if the thrown away ok variable is false i will be the zero of the 
type, 0 here.
+   tods.DS.ID = 
+}
+
+func (tods *TODeliveryServiceV12) GetAuditName() string {
+   if tods.DS != nil && tods.DS.XMLID != nil {
+   return *tods.DS.XMLID
+   }
+   return ""
+}
+
+func (tods *TODeliveryServiceV12) GetType() string {
+   return "ds"
+}
+
+func ValidateV12(db *sqlx.DB, ds *tc.DeliveryServiceNullableV12) []error {
+   if ds == nil {
+   return []error{}
+   }
+   tods := TODeliveryServiceV12{DS: ds, DB: db} // TODO pass config?
+   return tods.Validate(db)
+}
+
+func (tods *TODeliveryServiceV12) Sanitize(db *sqlx.DB) {
+   ds := tods.DS
+   if ds.GeoLimitCountries != nil {
+   *ds.GeoLimitCountries = 
strings.ToUpper(strings.Replace(*ds.GeoLimitCountries, " ", "", -1))
+   }
+   if ds.ProfileID != nil && *ds.ProfileID == -1 {
+   ds.ProfileID = nil
+   }
+   if ds.EdgeHeaderRewrite != nil && 
strings.TrimSpace(*ds.EdgeHeaderRewrite) == "" {
+   ds.EdgeHeaderRewrite = nil
+   }
+   if ds.MidHeaderRewrite != nil && 
strings.TrimSpace(*ds.MidHeaderRewrite) == "" {
+   ds.MidHeaderRewrite = nil
+   }
+}
+
+// LoadTenantID loads the DeliveryService's tenant ID from the database, using 
the DS ID or XMLID if either exists. Sets tods.DS.TenantID on success, and 
returns whether the delivery service was found, and any error.
+func (tods *TODeliveryServiceV12) LoadTenantID(db *sqlx.DB) (bool, error) {
+   if tods.DS.ID != nil {
+   tenantID := 0
+   if err := db.QueryRow(`SELECT tenant_id FROM deliveryservice 
where id = $1`, tods.DS.ID).Scan(); err != nil {
+   if err == sql.ErrNoRows {
+   return false, nil
+   }
+   return false, fmt.Errorf("querying tenant ID for 
delivery service ID '%v': %v", *tods.DS.ID, err)
+   }
+   tods.DS.TenantID = 
+   return true, nil
+   }
+   if tods.DS.XMLID != nil {
+   tenantID := 0
+   if err := db.QueryRow(`SELECT tenant_id FROM 

[GitHub] rob05c commented on issue #2229: Add Traffic Ops Golang deliveryservicesregexes

2018-05-04 Thread GitBox
rob05c commented on issue #2229: Add Traffic Ops Golang deliveryservicesregexes
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2229#issuecomment-386754750
 
 
   This is ready, in terms of functionality. I'm not sure how to write API 
tests for it though. Everything is ID based, deliveryservice_regex doesn't have 
a non-ID key.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dewrich closed pull request #2221: Fix TO Go CRConfig to omit null missLocations

2018-05-04 Thread GitBox
dewrich closed pull request #2221: Fix TO Go CRConfig to omit null missLocations
URL: https://github.com/apache/incubator-trafficcontrol/pull/2221
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/traffic_ops/traffic_ops_golang/crconfig/deliveryservice.go 
b/traffic_ops/traffic_ops_golang/crconfig/deliveryservice.go
index 078487fe9..802cbc54b 100644
--- a/traffic_ops/traffic_ops_golang/crconfig/deliveryservice.go
+++ b/traffic_ops/traffic_ops_golang/crconfig/deliveryservice.go
@@ -105,7 +105,6 @@ and d.active = true
 
for rows.Next() {
ds := tc.CRConfigDeliveryService{
-   MissLocation:{},
Protocol:{},
ResponseHeaders: map[string]string{},
Soa: cdnSOA,
@@ -139,12 +138,13 @@ and d.active = true
if err := rows.Scan(, , , , 
, , , , , , 
, , , , 
, , , , , 
, , , , 
, ); err != nil {
return nil, errors.New("scanning deliveryservice: " + 
err.Error())
}
-
-   if missLat.Valid {
-   ds.MissLocation.Lat = missLat.Float64
-   }
-   if missLon.Valid {
-   ds.MissLocation.Lon = missLon.Float64
+   // TODO prevent (lat XOR lon) in the DB and UI
+   if missLat.Valid && missLon.Valid {
+   ds.MissLocation = 
{Lat: missLat.Float64, Lon: missLon.Float64}
+   } else if missLat.Valid {
+   log.Warnln("delivery service " + xmlID + " has miss 
latitude but not longitude: omitting miss lat-lon from CRConfig")
+   } else if missLon.Valid {
+   log.Warnln("delivery service " + xmlID + " has miss 
longitude but not latitude: omitting miss lat-lon from CRConfig")
}
if ttl.Valid {
ttl := int(ttl.Int64)


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services