[GitHub] rob05c commented on issue #2232: Rewrite Traffic Ops CRConfig Table Endpoints in Go

2018-06-18 Thread GitBox
rob05c commented on issue #2232: Rewrite Traffic Ops CRConfig Table Endpoints 
in Go
URL: https://github.com/apache/trafficcontrol/issues/2232#issuecomment-398070296
 
 
   # Table Usage
   
   ```
   get /api/1.1/cdns/:name/configs/routing
   - DB: Server, Profile, Cdn, Parameter, ProfileParameter, CacheGroup, Regex, 
Type, StaticDNSEntry, DeliveryService
   
   get /api/1.1/cdns/domains
   - DB: Profile, CDN
   
   get /api/1.1/servers/:id/configfiles/ats
   get /api/1.1/profiles/:id/configfiles/ats/:filename
   get /api/1.1/servers/:id/configfiles/ats/:filename
   get /api/1.1/cdns/:id/configfiles/ats/:filename
   
   get /api/1.1/dbdump
   - Ext: pg_dump
   
   put /api/1.1/deliveryservices/:id/safe
   - DB: Deliveryservice, DeliveryServiceRegex, Regex, Profile, Type, Tenant
   
   delete /api/1.1/deliveryservice_server/:dsId/:serverId
   - DB: DeliveryService, DeliveryServiceServer, Tenant
   
   get /api/1.1/deliveryservices/:id/health
   - DB: Tenant, DeliveryService
   - Ext: Monitor
   
   get /api/1.1/deliveryservices/:id/capacity
   - DB: Tenant, DeliveryService
   - Ext: Monitor
   
   get /api/1.1/deliveryservices/:id/routing
   - DB: Tenant, DeliveryService, DeliveryServiceRegex, Regex, Cdn, Type
   - Ext: Router
   
   get /api/1.1/deliveryservices/:id/state
   - DB: Tenant, DeliveryService, CDN
   - Ext: Monitor
   
   post /api/1.1/deliveryservices/request
   - Ext: Email
   
   get /api/1.1/steering/:id/targets
   - DB: Tenant, DeliveryService, SteeringTarget, Type
   
   get /api/1.1/steering/:id/targets/:target_id
   - DB: Tenant, DeliveryService, SteeringTarget, Type
   
   post /api/1.1/steering/:id/targets
   - DB: Tenant, DeliveryService, SteeringTarget, Type
   
   put /api/1.1/steering/:id/targets/:target_id
   - DB: Tenant, DeliveryService, SteeringTarget, Type
   
   delete /api/1.1/steering/:id/targets/:target_id
   - DB: Tenant, DeliveryService, SteeringTarget
   
   get /api/1.1/deliveryservices/xmlId/:xmlid/sslkeys/delete
   - DB: DeliveryService, Tenant
   - Ext: Riak
   
   post /api/1.1/deliveryservices/xmlId/:xmlId/urlkeys/generate
   - DB: DeliveryService, Tenant
   - Ext: Riak
   
   post 
/api/1.1/deliveryservices/xmlId/:xmlId/urlkeys/copyFromXmlId/:copyFromXmlId
   - DB: DeliveryService, Tenant
   - Ext: Riak
   
   get /api/1.1/deliveryservices/xmlId/:xmlId/urlkeys
   - DB: DeliveryService, Tenant
   - Ext: Riak
   
   get /api/1.1/deliveryservices/:id/urlkeys
   - DB: DeliveryService, Tenant
   - Ext: Riak
   
   delete /api/1.1/divisions/name/:name
   - DB: Division, Region
   
   get /api/1.1/federations
   - DB: TmUser, FederationTmUser, FederationDeliveryService, DeliveryService
   
   post /api/1.1/federations
   put /api/1.1/federations
   delete /api/1.1/federations
   get /api/1.1/cdns/:name/federations
   get /api/1.1/cdns/:name/federations/:fedId
   post /api/1.1/cdns/:name/federations
   put /api/1.1/cdns/:name/federations/:fedId
   delete /api/1.1/cdns/:name/federations/:fedId
   get /api/1.1/federations/:fedId/users
   post /api/1.1/federations/:fedId/users
   delete /api/1.1/federations/:fedId/users/:userId
   get /api/1.1/federations/:fedId/deliveryservices
   post /api/1.1/federations/:fedId/deliveryservices
   delete /api/1.1/federations/:fedId/deliveryservices/:dsId
   get /api/1.1/federations/:fedId/federation_resolvers
   post /api/1.1/federations/:fedId/federation_resolvers
   post /api/1.1/federation_resolvers
   delete /api/1.1/federation_resolvers/:id
   - DB: TmUser, FederationTmUser, FederationDeliveryService, DeliveryService, 
FederationResolver, FederationFederationResolver
   
   get /api/1.1/hwinfo/dtdata
   - DB: HwInfo, Server
   
   get /api/1.1/osversions
   - DB: Parameter, Server
   - Ext: file:osversions.cfg
   
   post /api/1.1/isos
   - DB: Parameter
   - Ext: mkisofs
   
   get /api/1.1/jobs
   - DB: DeliveryService, Tenant, Job
   
   get /api/1.1/jobs/:id
   - DB: DeliveryService, Job
   
   get /api/1.1/user/current/jobs
   - DB: Tenant, DeliveryService, Job, TmUser
   
   post /api/1.1/user/current/jobs
   - DB: Tenant, DeliveryService, Job, TmUser
   
   post /api/1.1/parameters/validate
   - DB: Parameter
   
   get /api/1.1/cachegroups/:id/parameters
   - DB: Parameter, CachegroupParameter
   
   get /api/1.1/cachegroups/:id/unassigned_parameters
   - DB: Parameter, CachegroupParameter
   
   get /api/1.1/cachegroup/:parameter_id/parameter
   - DB: Cachegroup, CachegroupParameter
   
   get /api/1.1/cachegroupparameters
   - DB: CachegroupParameter
   
   post /api/1.1/cachegroupparameters
   - DB: Cachegroup, Parameter, ProfileParameter, CachegroupParameter
   
   delete /api/1.1/cachegroupparameters/:cachegroup_id/:parameter_id
   - DB: Cachegroup, Parameter, CachegroupParameter
   
   get /api/1.1/cachegroups/:parameter_id/parameter/available
   - DB: Cachegroup, CachegroupParameter
   
   post /api/1.1/regions/:region_name/phys_locations
   - DB: PhysLocation, Region
   
   post /api/1.1/profiles/name/:profile_name

[GitHub] rob05c commented on issue #2232: Rewrite Traffic Ops CRConfig Table Endpoints in Go

2018-06-18 Thread GitBox
rob05c commented on issue #2232: Rewrite Traffic Ops CRConfig Table Endpoints 
in Go
URL: https://github.com/apache/trafficcontrol/issues/2232#issuecomment-398070296
 
 
   # Table Usage
   
   ```
   get /api/1.1/cdns/:name/configs/routing
   - DB: Server, Profile, Cdn, Parameter, ProfileParameter, CacheGroup, Regex, 
Type, StaticDNSEntry, DeliveryService
   
   get /api/1.1/cdns/domains
   - DB: Profile, CDN
   
   get /api/1.1/servers/:id/configfiles/ats
   get /api/1.1/profiles/:id/configfiles/ats/:filename
   get /api/1.1/servers/:id/configfiles/ats/:filename
   get /api/1.1/cdns/:id/configfiles/ats/:filename
   
   get /api/1.1/dbdump
   - Ext: pg_dump
   
   put /api/1.1/deliveryservices/:id/safe
   - DB: Deliveryservice, DeliveryServiceRegex, Regex, Profile, Type, Tenant
   
   delete /api/1.1/deliveryservice_server/:dsId/:serverId
   - DB: DeliveryService, DeliveryServiceServer, Tenant
   
   get /api/1.1/deliveryservices/:id/health
   - DB: Tenant, DeliveryService
   - Ext: Monitor
   
   get /api/1.1/deliveryservices/:id/capacity
   - DB: Tenant, DeliveryService
   - Ext: Monitor
   
   get /api/1.1/deliveryservices/:id/routing
   - DB: Tenant, DeliveryService, DeliveryServiceRegex, Regex, Cdn, Type
   - Ext: Router
   
   get /api/1.1/deliveryservices/:id/state
   - DB: Tenant, DeliveryService, CDN
   - Ext: Monitor
   
   post /api/1.1/deliveryservices/request
   - Ext: Email
   
   get /api/1.1/steering/:id/targets
   - DB: Tenant, DeliveryService, SteeringTarget, Type
   
   get /api/1.1/steering/:id/targets/:target_id
   - DB: Tenant, DeliveryService, SteeringTarget, Type
   
   post /api/1.1/steering/:id/targets
   - DB: Tenant, DeliveryService, SteeringTarget, Type
   
   put /api/1.1/steering/:id/targets/:target_id
   - DB: Tenant, DeliveryService, SteeringTarget, Type
   
   delete /api/1.1/steering/:id/targets/:target_id
   - DB: Tenant, DeliveryService, SteeringTarget
   
   get /api/1.1/deliveryservices/xmlId/:xmlid/sslkeys/delete
   - DB: DeliveryService, Tenant
   - Ext: Riak
   
   post /api/1.1/deliveryservices/xmlId/:xmlId/urlkeys/generate
   - DB: DeliveryService, Tenant
   - Ext: Riak
   
   post 
/api/1.1/deliveryservices/xmlId/:xmlId/urlkeys/copyFromXmlId/:copyFromXmlId
   - DB: DeliveryService, Tenant
   - Ext: Riak
   
   get /api/1.1/deliveryservices/xmlId/:xmlId/urlkeys
   - DB: DeliveryService, Tenant
   - Ext: Riak
   
   get /api/1.1/deliveryservices/:id/urlkeys
   - DB: DeliveryService, Tenant
   - Ext: Riak
   
   delete /api/1.1/divisions/name/:name
   - DB: Division, Region
   
   get /api/1.1/federations
   - DB: TmUser, FederationTmUser, FederationDeliveryService, DeliveryService
   
   post /api/1.1/federations
   put /api/1.1/federations
   delete /api/1.1/federations
   get /api/1.1/cdns/:name/federations
   get /api/1.1/cdns/:name/federations/:fedId
   post /api/1.1/cdns/:name/federations
   put /api/1.1/cdns/:name/federations/:fedId
   delete /api/1.1/cdns/:name/federations/:fedId
   get /api/1.1/federations/:fedId/users
   post /api/1.1/federations/:fedId/users
   delete /api/1.1/federations/:fedId/users/:userId
   get /api/1.1/federations/:fedId/deliveryservices
   post /api/1.1/federations/:fedId/deliveryservices
   delete /api/1.1/federations/:fedId/deliveryservices/:dsId
   get /api/1.1/federations/:fedId/federation_resolvers
   post /api/1.1/federations/:fedId/federation_resolvers
   post /api/1.1/federation_resolvers
   delete /api/1.1/federation_resolvers/:id
   - DB: TmUser, FederationTmUser, FederationDeliveryService, DeliveryService, 
FederationResolver, FederationFederationResolver
   
   get /api/1.1/hwinfo/dtdata
   - DB: HwInfo, Server
   
   get /api/1.1/osversions
   - DB: Parameter, Server
   - Ext: file:osversions.cfg
   
   post /api/1.1/isos
   - DB: Parameter
   - Ext: mkisofs
   
   get /api/1.1/jobs
   - DB: DeliveryService, Tenant, Job
   
   get /api/1.1/jobs/:id
   - DB: DeliveryService, Job
   
   get /api/1.1/user/current/jobs
   - DB: Tenant, DeliveryService, Job, TmUser
   
   post /api/1.1/user/current/jobs
   - DB: Tenant, DeliveryService, Job, TmUser
   
   post /api/1.1/parameters/validate
   - DB: Parameter
   
   get /api/1.1/cachegroups/:id/parameters
   - DB: Parameter, CachegroupParameter
   
   get /api/1.1/cachegroups/:id/unassigned_parameters
   - DB: Parameter, CachegroupParameter
   
   get /api/1.1/cachegroup/:parameter_id/parameter
   - DB: Cachegroup, CachegroupParameter
   
   get /api/1.1/cachegroupparameters
   - DB: CachegroupParameter
   
   post /api/1.1/cachegroupparameters
   - DB: Cachegroup, Parameter, ProfileParameter, CachegroupParameter
   
   delete /api/1.1/cachegroupparameters/:cachegroup_id/:parameter_id
   - DB: Cachegroup, Parameter, CachegroupParameter
   
   get /api/1.1/cachegroups/:parameter_id/parameter/available
   - DB: Cachegroup, CachegroupParameter
   
   post /api/1.1/regions/:region_name/phys_locations
   - DB: PhysLocation, Region
   
   post /api/1.1/profiles/name/:profile_name

[GitHub] rawlinp commented on a change in pull request #2401: Implement Origin UI in Traffic Portal

2018-06-18 Thread GitBox
rawlinp commented on a change in pull request #2401: Implement Origin UI in 
Traffic Portal
URL: https://github.com/apache/trafficcontrol/pull/2401#discussion_r196107562
 
 

 ##
 File path: 
traffic_portal/app/src/common/modules/form/origin/form.origin.tpl.html
 ##
 @@ -0,0 +1,147 @@
+
+
+
+
+
+Origins
+{{originName}}
+
+
+
+
+
+
+
+Primary:
+
+
 
 Review comment:
   `isPrimary` is a read-only field, so I just wanted TP to display it here 
without actually sending the field back in the PUT/POST request.


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] Vijay-1 commented on issue #2407: Edge retrieval from origin - Configuring go_direct from traffic ops. [WIP]

2018-06-18 Thread GitBox
Vijay-1 commented on issue #2407: Edge retrieval from origin - Configuring 
go_direct from traffic ops. [WIP]
URL: https://github.com/apache/trafficcontrol/pull/2407#issuecomment-398082369
 
 
   @rawlinp Eric has pointed out the drive behind this PR. Do you see a problem 
in the way it is implemented?


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 #2401: Implement Origin UI in Traffic Portal

2018-06-18 Thread GitBox
mitchell852 closed pull request #2401: Implement Origin UI in Traffic Portal
URL: https://github.com/apache/trafficcontrol/pull/2401
 
 
   

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/app.js b/traffic_portal/app/src/app.js
index d41d49747..4df60e0d6 100644
--- a/traffic_portal/app/src/app.js
+++ b/traffic_portal/app/src/app.js
@@ -104,6 +104,7 @@ var trafficPortal = angular.module('trafficPortal', [
 require('./modules/private/deliveryServices/jobs').name,
 require('./modules/private/deliveryServices/jobs/list').name,
 require('./modules/private/deliveryServices/jobs/new').name,
+require('./modules/private/deliveryServices/origins').name,
 require('./modules/private/deliveryServices/regexes').name,
 require('./modules/private/deliveryServices/regexes/edit').name,
 require('./modules/private/deliveryServices/regexes/list').name,
@@ -129,6 +130,10 @@ var trafficPortal = angular.module('trafficPortal', [
 require('./modules/private/jobs').name,
 require('./modules/private/jobs/list').name,
 require('./modules/private/jobs/new').name,
+require('./modules/private/origins').name,
+require('./modules/private/origins/edit').name,
+require('./modules/private/origins/list').name,
+require('./modules/private/origins/new').name,
 require('./modules/private/physLocations').name,
 require('./modules/private/physLocations/edit').name,
 require('./modules/private/physLocations/list').name,
@@ -259,6 +264,9 @@ var trafficPortal = angular.module('trafficPortal', [
 require('./common/modules/form/iso').name,
 require('./common/modules/form/job').name,
 require('./common/modules/form/job/new').name,
+require('./common/modules/form/origin').name,
+require('./common/modules/form/origin/edit').name,
+require('./common/modules/form/origin/new').name,
 require('./common/modules/form/physLocation').name,
 require('./common/modules/form/physLocation/edit').name,
 require('./common/modules/form/physLocation/new').name,
@@ -312,6 +320,7 @@ var trafficPortal = angular.module('trafficPortal', [
 require('./common/modules/table/coordinates').name,
 require('./common/modules/table/deliveryServices').name,
 require('./common/modules/table/deliveryServiceJobs').name,
+require('./common/modules/table/deliveryServiceOrigins').name,
 require('./common/modules/table/deliveryServiceRegexes').name,
 require('./common/modules/table/deliveryServiceRequests').name,
 require('./common/modules/table/deliveryServiceRequestComments').name,
@@ -322,6 +331,7 @@ var trafficPortal = angular.module('trafficPortal', [
 require('./common/modules/table/divisions').name,
 require('./common/modules/table/divisionRegions').name,
 require('./common/modules/table/jobs').name,
+require('./common/modules/table/origins').name,
 require('./common/modules/table/physLocations').name,
 require('./common/modules/table/physLocationServers').name,
 require('./common/modules/table/parameters').name,
diff --git a/traffic_portal/app/src/common/api/CoordinateService.js 
b/traffic_portal/app/src/common/api/CoordinateService.js
index 5aa714691..7d5882c87 100644
--- a/traffic_portal/app/src/common/api/CoordinateService.js
+++ b/traffic_portal/app/src/common/api/CoordinateService.js
@@ -23,24 +23,24 @@ var CoordinateService = function($http, $q, Restangular, 
locationUtils, messageM
 return Restangular.all('coordinates').getList(queryParams);
 };
 
-   this.createCoordinate = function(coordinate) {
-   var request = $q.defer();
+this.createCoordinate = function(coordinate) {
+var request = $q.defer();
 
-   $http.post(ENV.api['root'] + "coordinates", coordinate)
-   .then(
-   function(response) {
+$http.post(ENV.api['root'] + "coordinates", coordinate)
+.then(
+function(response) {
 messageModel.setMessages(response.data.alerts, true);
 locationUtils.navigateToPath('/coordinates');
-   request.resolve(result);
-   },
-   function(fault) {
+request.resolve(response);
+},
+function(fault) {
 messageModel.setMessages(fault.data.alerts, false)
-   request.reject(fault);
-   }
-   );
+

[GitHub] asfgit commented on issue #2382: To go dnsseckeys generate

2018-06-18 Thread GitBox
asfgit commented on issue #2382: To go dnsseckeys generate
URL: https://github.com/apache/trafficcontrol/pull/2382#issuecomment-398091725
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/incubator-trafficcontrol-PR/1827/
   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 #2386: Fix TO Go DS POST to 400 on duplicate, not 5xx

2018-06-18 Thread GitBox
mitchell852 closed pull request #2386: Fix TO Go DS POST to 400 on duplicate, 
not 5xx
URL: https://github.com/apache/trafficcontrol/pull/2386
 
 
   

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/deliveryservice/deliveryservicesv13.go 
b/traffic_ops/traffic_ops_golang/deliveryservice/deliveryservicesv13.go
index a4685a0d6..b7e110b51 100644
--- a/traffic_ops/traffic_ops_golang/deliveryservice/deliveryservicesv13.go
+++ b/traffic_ops/traffic_ops_golang/deliveryservice/deliveryservicesv13.go
@@ -201,7 +201,7 @@ func create(db *sql.DB, cfg config.Config, user 
*auth.CurrentUser, ds tc.Deliver
if err != nil {
if pqerr, ok := err.(*pq.Error); ok {
err, _ := dbhelpers.ParsePQUniqueConstraintError(pqerr)
-   return tc.DeliveryServiceNullableV13{}, 
http.StatusInternalServerError, nil, errors.New("a delivery service with " + 
err.Error())
+   return tc.DeliveryServiceNullableV13{}, 
http.StatusBadRequest, errors.New("a delivery service with " + err.Error()), nil
}
return tc.DeliveryServiceNullableV13{}, 
http.StatusInternalServerError, nil, errors.New("inserting ds: " + err.Error())
}


 


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 #2364: Fix Traffic Ops Go to use transactions for deliveryservices, sslkeys, urisigning

2018-06-18 Thread GitBox
asfgit commented on issue #2364: Fix Traffic Ops Go to use transactions for 
deliveryservices, sslkeys, urisigning
URL: https://github.com/apache/trafficcontrol/pull/2364#issuecomment-398105656
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/incubator-trafficcontrol-PR/1828/
   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] dangogh closed pull request #2417: adds db dump link to TP

2018-06-18 Thread GitBox
dangogh closed pull request #2417: adds db dump link to TP
URL: https://github.com/apache/trafficcontrol/pull/2417
 
 
   

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/common/api/TrafficPortalService.js 
b/traffic_portal/app/src/common/api/TrafficPortalService.js
index 857fcbfe5..27c4100ee 100644
--- a/traffic_portal/app/src/common/api/TrafficPortalService.js
+++ b/traffic_portal/app/src/common/api/TrafficPortalService.js
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-var TrafficPortalService = function($http, $q) {
+var TrafficPortalService = function($http, $q, $window, propertiesModel) {
 
 this.getReleaseVersionInfo = function() {
 var deferred = $q.defer();
@@ -34,11 +34,6 @@ var TrafficPortalService = function($http, $q) {
 return deferred.promise;
 };
 
-this.dumpDB = function() {
-// todo: need to fix this so it is not hard-coded
-window.location = 'http://localhost:3000/api/1.2/dbdump';
-};
-
 this.getProperties = function() {
 var deferred = $q.defer();
 $http.get('traffic_portal_properties.json')
@@ -51,7 +46,11 @@ var TrafficPortalService = function($http, $q) {
 return deferred.promise;
 };
 
+this.dbDump = function() {
+$window.open(propertiesModel.properties.api.baseUrl + '1.3/dbdump', 
'_blank');
+};
+
 };
 
-TrafficPortalService.$inject = ['$http', '$q'];
+TrafficPortalService.$inject = ['$http', '$q', '$window', 'propertiesModel'];
 module.exports = TrafficPortalService;
diff --git a/traffic_portal/app/src/common/modules/header/HeaderController.js 
b/traffic_portal/app/src/common/modules/header/HeaderController.js
index 46622ebd7..a4a856526 100644
--- a/traffic_portal/app/src/common/modules/header/HeaderController.js
+++ b/traffic_portal/app/src/common/modules/header/HeaderController.js
@@ -54,9 +54,8 @@ var HeaderController = function($rootScope, $scope, $state, 
$uibModal, $location
 authService.logout();
 };
 
-$scope.dumpDB = function() {
-alert('not working yet');
-// trafficPortalService.dumpDB();
+$scope.dbDump = function() {
+trafficPortalService.dbDump();
 };
 
 $scope.confirmQueueServerUpdates = function() {
diff --git a/traffic_portal/app/src/common/modules/header/header.tpl.html 
b/traffic_portal/app/src/common/modules/header/header.tpl.html
index 7fdd65000..5f9e2a10f 100644
--- a/traffic_portal/app/src/common/modules/header/header.tpl.html
+++ b/traffic_portal/app/src/common/modules/header/header.tpl.html
@@ -62,11 +62,11 @@
 
 
 
-
-
-
-
-
+
+
+
+
+
 
 
 


 


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] dangogh closed issue #1287: Ability to get a TO database dump

2018-06-18 Thread GitBox
dangogh closed issue #1287: Ability to get a TO database dump
URL: https://github.com/apache/trafficcontrol/issues/1287
 
 
   


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] dangogh opened a new pull request #2419: cdn-in-a-box includes traffic_portal

2018-06-18 Thread GitBox
dangogh opened a new pull request #2419: cdn-in-a-box includes traffic_portal
URL: https://github.com/apache/trafficcontrol/pull/2419
 
 
   


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 #2392: Fix Traffic Ops Delivery Service endpoints for anymap

2018-06-18 Thread GitBox
mitchell852 closed pull request #2392: Fix Traffic Ops Delivery Service 
endpoints for anymap
URL: https://github.com/apache/trafficcontrol/pull/2392
 
 
   

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/lib/go-tc/deliveryservices.go b/lib/go-tc/deliveryservices.go
index 7990998b4..e7e8614ae 100644
--- a/lib/go-tc/deliveryservices.go
+++ b/lib/go-tc/deliveryservices.go
@@ -21,6 +21,8 @@ import (
limitations under the License.
 */
 
+const DefaultRoutingName = "cdn"
+
 //
 // GetDeliveryServiceResponse is deprecated use DeliveryServicesResponse...
 type GetDeliveryServiceResponse struct {
@@ -107,7 +109,7 @@ type DeliveryService struct {
RoutingName  string `json:"routingName"`
SigningAlgorithm string `json:"signingAlgorithm" 
db:"signing_algorithm"`
TypeID   int`json:"typeId"`
-   Type string `json:"type"`
+   Type DSType `json:"type"`
TRResponseHeadersstring `json:"trResponseHeaders"`
TenantID int`json:"tenantId,omitempty"`
XMLIDstring `json:"xmlId"`
@@ -184,7 +186,7 @@ type DeliveryServiceNullable struct {
Signed   bool`json:"signed"`
SSLKeyVersion*int`json:"sslKeyVersion" 
db:"ssl_key_version"`
TenantID *int`json:"tenantId" 
db:"tenant_id"`
-   Type *string `json:"type"`
+   Type *DSType `json:"type"`
TypeID   *int`json:"typeId" db:"type"`
XMLID*string `json:"xmlId" db:"xml_id"`
ExampleURLs  []string`json:"exampleURLs"`
@@ -224,9 +226,9 @@ func (d *DeliveryServiceNullable) Scan(src interface{}) 
error {
 
 // DeliveryServiceMatch ...
 type DeliveryServiceMatch struct {
-   Type  string `json:"type"`
-   SetNumber int`json:"setNumber"`
-   Pattern   string `json:"pattern"`
+   Type  DSMatchType `json:"type"`
+   SetNumber int `json:"setNumber"`
+   Pattern   string  `json:"pattern"`
 }
 
 // DeliveryServiceAlert ...
diff --git a/lib/go-tc/enum.go b/lib/go-tc/enum.go
index d7991b727..7d203d589 100644
--- a/lib/go-tc/enum.go
+++ b/lib/go-tc/enum.go
@@ -98,40 +98,40 @@ func CacheTypeFromString(s string) CacheType {
return CacheTypeInvalid
 }
 
-// DSType is the Delivery Service type. HTTP, DNS, etc.
-type DSType string
+// DSTypeCategory is the Delivery Service type category: HTTP or DNS
+type DSTypeCategory string
 
 const (
-   // DSTypeHTTP represents an HTTP delivery service
-   DSTypeHTTP = DSType("http")
-   // DSTypeDNS represents a DNS delivery service
-   DSTypeDNS = DSType("dns")
-   // DSTypeInvalid represents an invalid delivery service type 
enumeration. Note this is the default construction for a DSType.
-   DSTypeInvalid = DSType("")
+   // DSTypeCategoryHTTP represents an HTTP delivery service
+   DSTypeCategoryHTTP = DSTypeCategory("http")
+   // DSTypeCategoryDNS represents a DNS delivery service
+   DSTypeCategoryDNS = DSTypeCategory("dns")
+   // DSTypeCategoryInvalid represents an invalid delivery service type 
enumeration. Note this is the default construction for a DSTypeCategory.
+   DSTypeCategoryInvalid = DSTypeCategory("")
 )
 
 // String returns a string representation of this delivery service type.
-func (t DSType) String() string {
+func (t DSTypeCategory) String() string {
switch t {
-   case DSTypeHTTP:
+   case DSTypeCategoryHTTP:
return "HTTP"
-   case DSTypeDNS:
+   case DSTypeCategoryDNS:
return "DNS"
default:
return "INVALIDDSTYPE"
}
 }
 
-// DSTypeFromString returns a delivery service type object from its string 
representation, or DSTypeInvalid if the string is not a valid type.
-func DSTypeFromString(s string) DSType {
+// DSTypeCategoryFromString returns a delivery service type object from its 
string representation, or DSTypeCategoryInvalid if the string is not a valid 
type.
+func DSTypeCategoryFromString(s string) DSTypeCategory {
s = strings.ToLower(s)
switch s {
case "http":
-   return DSTypeHTTP
+   return DSTypeCategoryHTTP
case "dns":
-   return DSTypeDNS
+   return DSTypeCategoryDNS
default:
-   return DSTypeInvalid
+   return DSTypeCategoryInvalid
   

[GitHub] ashish-timilsina commented on issue #1934: Additional textbox in DS request form

2018-06-18 Thread GitBox
ashish-timilsina commented on issue #1934: Additional textbox in DS request form
URL: https://github.com/apache/trafficcontrol/issues/1934#issuecomment-398115421
 
 
   @mitchell852 yes that should work however, I can't seem to find the comment 
field. Is it "Long Description 2"?


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 #2419: cdn-in-a-box includes traffic_portal

2018-06-18 Thread GitBox
asfgit commented on issue #2419: cdn-in-a-box includes traffic_portal
URL: https://github.com/apache/trafficcontrol/pull/2419#issuecomment-398125776
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/incubator-trafficcontrol-PR/1829/
   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-rat #1099

2018-06-18 Thread Apache Jenkins Server
See 


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

[incubator-trafficcontrol-PR-rat] $ /bin/bash -xe 
/tmp/jenkins1176895394395424199.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/jenkins4279714174886714214.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
++ cut -d / -f 12
++ awk -F '"' '{print $2}'
++ head -n 1
++ sort -r
+ ratver=apache-rat-0.13-20180329.151017-101.jar
++ mktemp -d
+ ratdir=/tmp/tmp.y1RkWyxJ5P
+ ratjar=/tmp/tmp.y1RkWyxJ5P/apache-rat-0.13.SNAPSHOT.jar
+ curl -L -o /tmp/tmp.y1RkWyxJ5P/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  1938k  0 --:--:-- --:--:-- --:--:-- 1938k
+ curl -L -o /tmp/tmp.y1RkWyxJ5P/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  
0400 00 0  0  0 --:--:-- --:--:-- --:--:-- 0100 
   40  100400 0123  0 --:--:-- --:--:-- --:--:--   123
++ sha1sum /tmp/tmp.y1RkWyxJ5P/apache-rat-0.13.SNAPSHOT.jar
++ awk '{print $1}'
++ cat /tmp/tmp.y1RkWyxJ5P/apache-rat-0.13.SNAPSHOT.jar.sha1
+ [[ 635c5eccad31cff1d713c12144eaae7fc9f10cf4 == 
635c5eccad31cff1d713c12144eaae7fc9f10cf4 ]]
++ pwd
++ pwd
+ java -jar /tmp/tmp.y1RkWyxJ5P/apache-rat-0.13.SNAPSHOT.jar -E 

 -d 

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

  
apache-trafficcontrol-2.3.0-incubating/infrastructure/cdn-in-a-box/traffic_portal/run.sh

*
+ exit 1
Build step 'Execute shell' marked build as failure
Archiving artifacts
[Fast

[GitHub] asfgit commented on issue #2419: cdn-in-a-box includes traffic_portal

2018-06-18 Thread GitBox
asfgit commented on issue #2419: cdn-in-a-box includes traffic_portal
URL: https://github.com/apache/trafficcontrol/pull/2419#issuecomment-398127533
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/incubator-trafficcontrol-PR/1830/
   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-rat #1100

2018-06-18 Thread Apache Jenkins Server
See 


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

[incubator-trafficcontrol-PR-rat] $ /bin/bash -xe 
/tmp/jenkins3530917227674880307.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/jenkins2459364977098950449.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}'
++ cut -d / -f 12
++ sort -r
++ head -n 1
+ ratver=apache-rat-0.13-20180329.151017-101.jar
++ mktemp -d
+ ratdir=/tmp/tmp.uG0BglL7jd
+ ratjar=/tmp/tmp.uG0BglL7jd/apache-rat-0.13.SNAPSHOT.jar
+ curl -L -o /tmp/tmp.uG0BglL7jd/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  1762k  0 --:--:-- --:--:-- --:--:-- 1761k
+ curl -L -o /tmp/tmp.uG0BglL7jd/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 79  0 --:--:-- --:--:-- --:--:--79
++ sha1sum /tmp/tmp.uG0BglL7jd/apache-rat-0.13.SNAPSHOT.jar
++ awk '{print $1}'
++ cat /tmp/tmp.uG0BglL7jd/apache-rat-0.13.SNAPSHOT.jar.sha1
+ [[ 635c5eccad31cff1d713c12144eaae7fc9f10cf4 == 
635c5eccad31cff1d713c12144eaae7fc9f10cf4 ]]
++ pwd
++ pwd
+ java -jar /tmp/tmp.uG0BglL7jd/apache-rat-0.13.SNAPSHOT.jar -E 

 -d 

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

  
apache-trafficcontrol-2.3.0-incubating/infrastructure/cdn-in-a-box/traffic_portal/run.sh

*
+ exit 1
Build step 'Execute shell' marked build as failure
Archiving artifacts
[Fast Arch

[GitHub] rob05c opened a new pull request #2420: Fix TO Go logging unauthenticated endpoints

2018-06-18 Thread GitBox
rob05c opened a new pull request #2420: Fix TO Go logging unauthenticated 
endpoints
URL: https://github.com/apache/trafficcontrol/pull/2420
 
 
   Also adds info logging for requests, and adds a quasi-unique request
   ID to the APIInfo object for logging and other uses.


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 #2419: cdn-in-a-box includes traffic_portal

2018-06-18 Thread GitBox
asfgit commented on issue #2419: cdn-in-a-box includes traffic_portal
URL: https://github.com/apache/trafficcontrol/pull/2419#issuecomment-398166252
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/incubator-trafficcontrol-PR/1831/
   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


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

2018-06-18 Thread Apache Jenkins Server
See 




[GitHub] rob05c opened a new pull request #2421: Add TO Go deliveryservices/sslkeys/delete

2018-06-18 Thread GitBox
rob05c opened a new pull request #2421: Add TO Go 
deliveryservices/sslkeys/delete
URL: https://github.com/apache/trafficcontrol/pull/2421
 
 
   


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 edited a comment on issue #2232: Rewrite Traffic Ops CRConfig Table Endpoints in Go

2018-06-18 Thread GitBox
rob05c edited a comment on issue #2232: Rewrite Traffic Ops CRConfig Table 
Endpoints in Go
URL: https://github.com/apache/trafficcontrol/issues/2232#issuecomment-398070296
 
 
   # Table Usage
   
   ```
   get /api/1.1/cdns/:name/configs/routing
   - DB: Server, Profile, Cdn, Parameter, ProfileParameter, CacheGroup, Regex, 
Type, StaticDNSEntry, DeliveryService
   
   get /api/1.1/cdns/domains
   - DB: Profile, CDN
   
   get /api/1.1/servers/:id/configfiles/ats
   get /api/1.1/profiles/:id/configfiles/ats/:filename
   get /api/1.1/servers/:id/configfiles/ats/:filename
   get /api/1.1/cdns/:id/configfiles/ats/:filename
   
   get /api/1.1/dbdump
   - Ext: pg_dump
   
   put /api/1.1/deliveryservices/:id/safe
   - DB: Deliveryservice, DeliveryServiceRegex, Regex, Profile, Type, Tenant
   
   delete /api/1.1/deliveryservice_server/:dsId/:serverId
   - DB: DeliveryService, DeliveryServiceServer, Tenant
   
   get /api/1.1/deliveryservices/:id/health
   - DB: Tenant, DeliveryService
   - Ext: Monitor
   
   get /api/1.1/deliveryservices/:id/capacity
   - DB: Tenant, DeliveryService
   - Ext: Monitor
   
   get /api/1.1/deliveryservices/:id/routing
   - DB: Tenant, DeliveryService, DeliveryServiceRegex, Regex, Cdn, Type
   - Ext: Router
   
   get /api/1.1/deliveryservices/:id/state
   - DB: Tenant, DeliveryService, CDN
   - Ext: Monitor
   
   post /api/1.1/deliveryservices/request
   - Ext: Email
   
   get /api/1.1/steering/:id/targets
   - DB: Tenant, DeliveryService, SteeringTarget, Type
   
   get /api/1.1/steering/:id/targets/:target_id
   - DB: Tenant, DeliveryService, SteeringTarget, Type
   
   post /api/1.1/steering/:id/targets
   - DB: Tenant, DeliveryService, SteeringTarget, Type
   
   put /api/1.1/steering/:id/targets/:target_id
   - DB: Tenant, DeliveryService, SteeringTarget, Type
   
   delete /api/1.1/steering/:id/targets/:target_id
   - DB: Tenant, DeliveryService, SteeringTarget
   
   post /api/1.1/deliveryservices/xmlId/:xmlId/urlkeys/generate
   - DB: DeliveryService, Tenant
   - Ext: Riak
   
   post 
/api/1.1/deliveryservices/xmlId/:xmlId/urlkeys/copyFromXmlId/:copyFromXmlId
   - DB: DeliveryService, Tenant
   - Ext: Riak
   
   get /api/1.1/deliveryservices/xmlId/:xmlId/urlkeys
   - DB: DeliveryService, Tenant
   - Ext: Riak
   
   get /api/1.1/deliveryservices/:id/urlkeys
   - DB: DeliveryService, Tenant
   - Ext: Riak
   
   delete /api/1.1/divisions/name/:name
   - DB: Division, Region
   
   get /api/1.1/federations
   - DB: TmUser, FederationTmUser, FederationDeliveryService, DeliveryService
   
   post /api/1.1/federations
   put /api/1.1/federations
   delete /api/1.1/federations
   get /api/1.1/cdns/:name/federations
   get /api/1.1/cdns/:name/federations/:fedId
   post /api/1.1/cdns/:name/federations
   put /api/1.1/cdns/:name/federations/:fedId
   delete /api/1.1/cdns/:name/federations/:fedId
   get /api/1.1/federations/:fedId/users
   post /api/1.1/federations/:fedId/users
   delete /api/1.1/federations/:fedId/users/:userId
   get /api/1.1/federations/:fedId/deliveryservices
   post /api/1.1/federations/:fedId/deliveryservices
   delete /api/1.1/federations/:fedId/deliveryservices/:dsId
   get /api/1.1/federations/:fedId/federation_resolvers
   post /api/1.1/federations/:fedId/federation_resolvers
   post /api/1.1/federation_resolvers
   delete /api/1.1/federation_resolvers/:id
   - DB: TmUser, FederationTmUser, FederationDeliveryService, DeliveryService, 
FederationResolver, FederationFederationResolver
   
   get /api/1.1/hwinfo/dtdata
   - DB: HwInfo, Server
   
   get /api/1.1/osversions
   - DB: Parameter, Server
   - Ext: file:osversions.cfg
   
   post /api/1.1/isos
   - DB: Parameter
   - Ext: mkisofs
   
   get /api/1.1/jobs
   - DB: DeliveryService, Tenant, Job
   
   get /api/1.1/jobs/:id
   - DB: DeliveryService, Job
   
   get /api/1.1/user/current/jobs
   - DB: Tenant, DeliveryService, Job, TmUser
   
   post /api/1.1/user/current/jobs
   - DB: Tenant, DeliveryService, Job, TmUser
   
   post /api/1.1/parameters/validate
   - DB: Parameter
   
   get /api/1.1/cachegroups/:id/parameters
   - DB: Parameter, CachegroupParameter
   
   get /api/1.1/cachegroups/:id/unassigned_parameters
   - DB: Parameter, CachegroupParameter
   
   get /api/1.1/cachegroup/:parameter_id/parameter
   - DB: Cachegroup, CachegroupParameter
   
   get /api/1.1/cachegroupparameters
   - DB: CachegroupParameter
   
   post /api/1.1/cachegroupparameters
   - DB: Cachegroup, Parameter, ProfileParameter, CachegroupParameter
   
   delete /api/1.1/cachegroupparameters/:cachegroup_id/:parameter_id
   - DB: Cachegroup, Parameter, CachegroupParameter
   
   get /api/1.1/cachegroups/:parameter_id/parameter/available
   - DB: Cachegroup, CachegroupParameter
   
   post /api/1.1/regions/:region_name/phys_locations
   - DB: PhysLocation, Region
   
   post /api/1.1/profiles/name/:profile_name/copy/:profile_copy_from
   - DB: Profile, ProfileParameter
   
   get /api/1.1/profiles/:id/export
   - D

[GitHub] asfgit commented on issue #2420: Fix TO Go logging unauthenticated endpoints

2018-06-18 Thread GitBox
asfgit commented on issue #2420: Fix TO Go logging unauthenticated endpoints
URL: https://github.com/apache/trafficcontrol/pull/2420#issuecomment-398178769
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/incubator-trafficcontrol-PR/1832/
   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 #2421: Add TO Go deliveryservices/sslkeys/delete

2018-06-18 Thread GitBox
asfgit commented on issue #2421: Add TO Go deliveryservices/sslkeys/delete
URL: https://github.com/apache/trafficcontrol/pull/2421#issuecomment-398180182
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/incubator-trafficcontrol-PR/1833/
   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] serDrem opened a new pull request #2422: new certificate chain analyzer test

2018-06-18 Thread GitBox
serDrem opened a new pull request #2422: new certificate chain analyzer test
URL: https://github.com/apache/trafficcontrol/pull/2422
 
 
   


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 opened a new pull request #2423: Fix TO API Test for DS enum change

2018-06-18 Thread GitBox
rob05c opened a new pull request #2423: Fix TO API Test for DS enum change
URL: https://github.com/apache/trafficcontrol/pull/2423
 
 
   


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 #2423: Fix TO API Test for DS enum change

2018-06-18 Thread GitBox
dewrich closed pull request #2423: Fix TO API Test for DS enum change
URL: https://github.com/apache/trafficcontrol/pull/2423
 
 
   

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/testing/api/v13/deliveryservices_test.go 
b/traffic_ops/testing/api/v13/deliveryservices_test.go
index c9432550d..d28da8ee2 100644
--- a/traffic_ops/testing/api/v13/deliveryservices_test.go
+++ b/traffic_ops/testing/api/v13/deliveryservices_test.go
@@ -70,7 +70,7 @@ func CreateTestDeliveryServices(t *testing.T) {
}
ds.CDNID = respCDNs[0].ID
 
-   respTypes, _, err := TOSession.GetTypeByName(ds.Type)
+   respTypes, _, err := TOSession.GetTypeByName(string(ds.Type))
if err != nil {
t.Fatalf("cannot GET Type by name: %v\n", err)
}


 


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 issue #2407: Edge retrieval from origin - Configuring go_direct from traffic ops. [WIP]

2018-06-18 Thread GitBox
rawlinp commented on issue #2407: Edge retrieval from origin - Configuring 
go_direct from traffic ops. [WIP]
URL: https://github.com/apache/trafficcontrol/pull/2407#issuecomment-398192126
 
 
   Ok, that driver makes more sense to me, but it seems like maybe we need a 
new delivery service type that caches to disk but bypasses the mid tier? 
Basically the same type as `HTTP_LIVE` and `DNS_LIVE` except caching it to disk 
rather than RAM? Then you could just change the type from `HTTP` to 
`HTTP_NEW_TYPE` which would bypass the mid tier. That would avoid the whole 
"you can't set go_direct to this value because it conflicts with the type" 
issue.


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 #2422: new certificate chain analyzer test

2018-06-18 Thread GitBox
asfgit commented on issue #2422: new certificate chain analyzer test
URL: https://github.com/apache/trafficcontrol/pull/2422#issuecomment-398196256
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/incubator-trafficcontrol-PR/1834/
   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] dewrich closed pull request #2420: Fix TO Go logging unauthenticated endpoints

2018-06-18 Thread GitBox
dewrich closed pull request #2420: Fix TO Go logging unauthenticated endpoints
URL: https://github.com/apache/trafficcontrol/pull/2420
 
 
   

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/api/api.go 
b/traffic_ops/traffic_ops_golang/api/api.go
index 59b38da7f..b102dfa26 100644
--- a/traffic_ops/traffic_ops_golang/api/api.go
+++ b/traffic_ops/traffic_ops_golang/api/api.go
@@ -41,6 +41,7 @@ import (
 
 const DBContextKey = "db"
 const ConfigContextKey = "context"
+const ReqIDContextKey = "reqid"
 
 // WriteResp takes any object, serializes it as JSON, and writes that to w. 
Any errors are logged and written to w via tc.GetHandleErrorsFunc.
 // This is a helper for the common case; not using this in unusual cases is 
perfectly acceptable.
@@ -216,6 +217,7 @@ type APIInfo struct {
Paramsmap[string]string
IntParams map[string]int
User  *auth.CurrentUser
+   ReqID uint64
Tx*sqlx.Tx
CommitTx  *bool
Config*config.Config
@@ -247,6 +249,11 @@ func NewInfo(r *http.Request, requiredParams []string, 
intParamNames []string) (
if err != nil {
return nil, errors.New("getting config: " + err.Error()), nil, 
http.StatusInternalServerError
}
+   reqID, err := getReqID(r.Context())
+   if err != nil {
+   return nil, errors.New("getting reqID: " + err.Error()), nil, 
http.StatusInternalServerError
+   }
+
user, err := auth.GetCurrentUser(r.Context())
if err != nil {
return nil, errors.New("getting user: " + err.Error()), nil, 
http.StatusInternalServerError
@@ -262,6 +269,7 @@ func NewInfo(r *http.Request, requiredParams []string, 
intParamNames []string) (
falsePtr := false
return &APIInfo{
Config:cfg,
+   ReqID: reqID,
Params:params,
IntParams: intParams,
User:  user,
@@ -302,3 +310,16 @@ func getConfig(ctx context.Context) (*config.Config, 
error) {
}
return nil, errors.New("No config found in Context")
 }
+
+func getReqID(ctx context.Context) (uint64, error) {
+   val := ctx.Value(ReqIDContextKey)
+   if val != nil {
+   switch v := val.(type) {
+   case uint64:
+   return v, nil
+   default:
+   return 0, fmt.Errorf("ReqID found with bad type: %T", v)
+   }
+   }
+   return 0, errors.New("No ReqID found in Context")
+}
diff --git a/traffic_ops/traffic_ops_golang/routing.go 
b/traffic_ops/traffic_ops_golang/routing.go
index bd647e24e..a40f7029f 100644
--- a/traffic_ops/traffic_ops_golang/routing.go
+++ b/traffic_ops/traffic_ops_golang/routing.go
@@ -27,6 +27,8 @@ import (
"sort"
"strconv"
"strings"
+   "sync/atomic"
+   "time"
 
"github.com/apache/incubator-trafficcontrol/lib/go-log"

"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/api"
@@ -64,8 +66,8 @@ type RawRoute struct {
Middlewares   []Middleware
 }
 
-func getDefaultMiddleware() []Middleware {
-   return []Middleware{wrapHeaders}
+func getDefaultMiddleware(secret string) []Middleware {
+   return []Middleware{getWrapAccessLog(secret), wrapHeaders}
 }
 
 // ServerData ...
@@ -129,7 +131,7 @@ func CreateRouteMap(rs []Route, rawRoutes []RawRoute, 
authBase AuthBase) map[str
 
 func getRouteMiddleware(middlewares []Middleware, authBase AuthBase, 
authenticated bool, privLevel int) []Middleware {
if middlewares == nil {
-   middlewares = getDefaultMiddleware()
+   middlewares = getDefaultMiddleware(authBase.secret)
}
if authenticated { // a privLevel of zero is an unauthenticated 
endpoint.
authWrapper := authBase.GetWrapper(privLevel)
@@ -164,9 +166,17 @@ func CompileRoutes(routes map[string][]PathHandler) 
map[string][]CompiledRoute {
 }
 
 // Handler - generic handler func used by the Handlers hooking into the routes
-func Handler(routes map[string][]CompiledRoute, catchall http.Handler, db 
*sqlx.DB, cfg *config.Config, w http.ResponseWriter, r *http.Request) {
-   requested := r.URL.Path[1:]
+func Handler(routes map[string][]CompiledRoute, catchall http.Handler, db 
*sqlx.DB, cfg *config.Config, getReqID func() uint64, w http.ResponseWriter, r 
*http.Request) {
+   reqID := getReqID()
+
+   reqIDStr := strconv.FormatUint(reqID, 10)
+   log.Infoln(r.Method + " " + r.URL.Path + " handling (reqid " + reqIDStr 
+ ")")
+   start := time.Now()
+   defer func() {
+   log.Infoln(r.Method + " " + r.URL.Path + " handled (reqid " + 
re

[GitHub] dewrich closed pull request #2419: cdn-in-a-box includes traffic_portal

2018-06-18 Thread GitBox
dewrich closed pull request #2419: cdn-in-a-box includes traffic_portal
URL: https://github.com/apache/trafficcontrol/pull/2419
 
 
   

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/infrastructure/cdn-in-a-box/.gitignore 
b/infrastructure/cdn-in-a-box/.gitignore
new file mode 100644
index 0..e7a9c1347
--- /dev/null
+++ b/infrastructure/cdn-in-a-box/.gitignore
@@ -0,0 +1 @@
+*.rpm
diff --git a/infrastructure/cdn-in-a-box/README.md 
b/infrastructure/cdn-in-a-box/README.md
index 1f38a9eea..ae25c3b89 100644
--- a/infrastructure/cdn-in-a-box/README.md
+++ b/infrastructure/cdn-in-a-box/README.md
@@ -24,12 +24,21 @@ This is intended to simplify the process of creating a "CDN 
in a box",  easing
 the barrier to entry for newcomers as well as providing a way to spin up a
 minimal CDN for full system testing.
 
-For now,  only `traffic_ops` is implemented.  Other components will follow as 
well
-as details on specific parts of the implementation.. 
-
-To start it, install `docker-ce` and `docker-compose` and simply:
-
+For now,  only `traffic_ops` and `traffic_portal` are implemented.  Other
+components will follow as well as details on specific parts of the
+implementation.. 
+
+To start it, install `docker-ce` and `docker-compose`.  Create an rpm for each
+component and copy into the respective directory with no version number, e.g.
+`traffic_ops/traffic_ops.rpm`, `traffic_portal/traffic_portal.rpm`.
+
 cd infrastructure/cdn-in-a-box/traffic_ops
 docker-compose up --build
 
-
+The process creates containers for each with ports exposed on the host.  The
+following should be available once the system is running:
+   
+Traffic Portal: https://localhost
+Traffic Ops (go): https://localhost:6443
+Traffic Ops (perl): https://localhost:60443
+Postgres: `psql -h localhost -p 5432 -U postgres`
diff --git a/infrastructure/cdn-in-a-box/docker-compose.yml 
b/infrastructure/cdn-in-a-box/docker-compose.yml
index cbe5f92eb..b30967fdb 100644
--- a/infrastructure/cdn-in-a-box/docker-compose.yml
+++ b/infrastructure/cdn-in-a-box/docker-compose.yml
@@ -25,7 +25,7 @@
 #
 #  docker-compose up -d
 #
-# The Traffic Ops Go API will then be available on https://localhost:8443,
+# The Traffic Ops Go API will then be available on https://localhost:6443,
 # the Perl API on https://localhost:60443, and the postgres database on 
localhost 5432.
 #
 # Note that this setup is intended for testing and not for production use.
@@ -57,36 +57,60 @@ services:
   - "5432:5432"
 
   trafficops-perl:
-hostname: trafficops-perl
+build:
+  context: traffic_ops
+  args:
+TRAFFIC_OPS_RPM: traffic_ops.rpm
+depends_on:
+  - db
 domainname: cdn.local
+env_file:
+  - variables.env
+hostname: trafficops-perl
 image: trafficops-perl
 networks:
   - tcnet
-env_file:
-  - variables.env
 # TODO: change to expose: "60443" to limit to containers
 ports: 
   - "60443:60443"
+
+  trafficops:
 build:
   context: traffic_ops
   args:
 TRAFFIC_OPS_RPM: traffic_ops.rpm
 depends_on:
   - db
-
-  trafficops:
-hostname: trafficops
+  - trafficops-perl
 domainname: cdn.local
+env_file:
+  - variables.env
+hostname: trafficops
 image: trafficops-go
 networks:
   - tcnet
-env_file:
-  - variables.env
 ports: 
-  - "8443:443"
+  - "6443:6443"
 build:
   context: traffic_ops
   dockerfile: Dockerfile-go
 depends_on:
   - db
   - trafficops-perl
+
+  trafficportal:
+build:
+  context: traffic_portal
+  args:
+TRAFFIC_PORTAL_RPM: traffic_portal.rpm
+depends_on:
+  - trafficops
+domainname: cdn.local
+env_file:
+  - variables.env
+hostname: trafficportal
+image: trafficportal
+networks:
+  - tcnet
+ports:
+  - "443:443"
diff --git a/infrastructure/cdn-in-a-box/traffic_ops/.gitignore 
b/infrastructure/cdn-in-a-box/traffic_ops/.gitignore
deleted file mode 100644
index aa2697638..0
--- a/infrastructure/cdn-in-a-box/traffic_ops/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-traffic_ops.rpm
diff --git a/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile 
b/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile
index 36b3c063c..50ad18dc4 100644
--- a/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile
+++ b/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile
@@ -62,7 +62,7 @@ RUN export 
PERL5LIB=/opt/traffic_ops/app/local/lib/perl5/:/opt/traffic_ops/insta
 
 RUN echo "{\"user\": \"riakuser\",\"password\": \"$TRAFFIC_VAULT_PASS\"}" > 
/opt/traffic_ops/app/conf/production/riak.conf
 
-EXPOSE 443
+EXPOSE 6443
 WORKDIR /opt/traffic_ops/app
 ENV MOJO_MODE production
 
diff -

[GitHub] limited commented on issue #2407: Edge retrieval from origin - Configuring go_direct from traffic ops. [WIP]

2018-06-18 Thread GitBox
limited commented on issue #2407: Edge retrieval from origin - Configuring 
go_direct from traffic ops. [WIP]
URL: https://github.com/apache/trafficcontrol/pull/2407#issuecomment-398221657
 
 
   It only skips the mid tier if all mids are down. If mids are up, they are 
used as normally 
   
   From: Rawlin Peters [notificati...@github.com]
   Sent: Monday, June 18, 2018 4:53 PM
   To: apache/trafficcontrol
   Cc: Eric Friedrich; Comment
   Subject: Re: [apache/trafficcontrol] Edge retrieval from origin - 
Configuring go_direct from traffic ops. [WIP] (#2407)
   
   Ok, that driver makes more sense to me, but it seems like maybe we need a 
new delivery service type that caches to disk but bypasses the mid tier? 
Basically the same type as HTTP_LIVE and DNS_LIVE except caching it to disk 
rather than RAM? Then you could just change the type from HTTP to HTTP_NEW_TYPE 
which would bypass the mid tier. That would avoid the whole "you can't set 
go_direct to this value because it conflicts with the type" issue.
   
   —
   You are receiving this because you commented.
   Reply to this email directly, view it on 
GitHub,
 or mute the 
thread.
   
   


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 issue #2407: Edge retrieval from origin - Configuring go_direct from traffic ops. [WIP]

2018-06-18 Thread GitBox
rawlinp commented on issue #2407: Edge retrieval from origin - Configuring 
go_direct from traffic ops. [WIP]
URL: https://github.com/apache/trafficcontrol/pull/2407#issuecomment-398225128
 
 
   So it should be dynamic? This PR would make it static per DS. What do you 
mean by the mids being all down? They're all not set to `ONLINE`?


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