[GitHub] [trafficcontrol] mattjackson220 commented on a change in pull request #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and…

2019-10-22 Thread GitBox
mattjackson220 commented on a change in pull request #3534: TP Delivery Service 
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r337556776
 
 

 ##
 File path: docs/source/api/deliveryservices_sslkeys_generate_letsencrypt.rst
 ##
 @@ -0,0 +1,64 @@
+..
+..
+.. Licensed 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.
+..
+
+.. _to-api-deliveryservices-sslkeys-generate-letsencrypt:
+
+*
+``deliveryservices/sslkeys/generate/letsencrypt``
+*
+
+.. versionadded:: 1.4
+
+``POST``
+
+Generates an SSL certificate and private key using Let's Encrypt for a 
:term:`Delivery Service`
+
+:Auth. Required: Yes
+:Roles Required: "admin" or "operations"
+:Response Type:  Object (string)
+
+Request Structure
+-
+:key: The :ref:`ds-xmlid` of the :term:`Delivery Service` for 
which keys will be generated
+:version: An integer that defines the "version" of the key - which may 
be thought of as the sequential generation; that is, the higher the number the 
more recent the key
+:hostname:The desired hostname of the :term:`Delivery Service`
+
+   .. note:: In most cases, this must be the same as the 
:ref:`ds-example-urls`
 
 Review comment:
   done


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mattjackson220 commented on a change in pull request #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and…

2019-10-22 Thread GitBox
mattjackson220 commented on a change in pull request #3534: TP Delivery Service 
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r337553485
 
 

 ##
 File path: docs/source/api/deliveryservices_xmlid_xmlid_sslkeys.rst
 ##
 @@ -71,7 +71,11 @@ Response Structure
 :hostname:The hostname generated by Traffic Ops that is used as the 
common name when generating the certificate - this will be a FQDN for DNS 
:term:`Delivery Service`\ s and a wildcard URL for HTTP :term:`Delivery 
Service`\ s
 :organization:An optional field which, if present, contains the 
organization entered by the user when generating certificate\ [1]_
 :state:   An optional field which, if present, contains the state 
entered by the user when generating certificate\ [1]_
-:version: The version of the certificate record in Riak
+:version: The version of the certificate record in Traffic Vault
+
+   .. versionadded:: 1.4
 
 Review comment:
   done


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mattjackson220 commented on a change in pull request #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and…

2019-10-22 Thread GitBox
mattjackson220 commented on a change in pull request #3534: TP Delivery Service 
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r337553629
 
 

 ##
 File path: docs/source/api/letsencrypt_autorenew.rst
 ##
 @@ -0,0 +1,76 @@
+..
+..
+.. Licensed 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.
+..
+
+.. _to-letsencrypt-autorenew:
+
+*
+``letsencrypt/autorenew``
+*
+
+.. versionadded:: 1.4
+
+``POST``
+
+Generates an SSL certificate and private key using Let's Encrypt for a 
:term:`Delivery Service`
+
+:Auth. Required: Yes
+:Roles Required: "admin" or "operations"
+:Response Type:  Object
+
+Request Structure
+-
+No parameters available
+
+
+Response Structure
+--
+:LetsEncryptExpirations: A list of objects with information regarding 
certificate expiration for all Let's Encrypt certificates
+
+   :XmlId:   The :term:`Delivery Service`'s uniquely identifying 
'xml_id'
 
 Review comment:
   done


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mattjackson220 commented on a change in pull request #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and…

2019-10-22 Thread GitBox
mattjackson220 commented on a change in pull request #3534: TP Delivery Service 
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r337553576
 
 

 ##
 File path: docs/source/api/deliveryservices_xmlid_xmlid_sslkeys.rst
 ##
 @@ -71,7 +71,11 @@ Response Structure
 :hostname:The hostname generated by Traffic Ops that is used as the 
common name when generating the certificate - this will be a FQDN for DNS 
:term:`Delivery Service`\ s and a wildcard URL for HTTP :term:`Delivery 
Service`\ s
 :organization:An optional field which, if present, contains the 
organization entered by the user when generating certificate\ [1]_
 :state:   An optional field which, if present, contains the state 
entered by the user when generating certificate\ [1]_
-:version: The version of the certificate record in Riak
+:version: The version of the certificate record in Traffic Vault
 
 Review comment:
   done


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mattjackson220 commented on a change in pull request #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and…

2019-10-22 Thread GitBox
mattjackson220 commented on a change in pull request #3534: TP Delivery Service 
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r337553415
 
 

 ##
 File path: docs/source/api/deliveryservices_hostname_name_sslkeys.rst
 ##
 @@ -72,6 +72,10 @@ Response Structure
 :state:   An optional field which, if present, contains the state 
entered by the user when generating certificate\ [#optional]_
 :version: The version of the certificate record in Traffic Vault
 
+   .. versionadded:: 1.4
+
+:expiration:  The expiration date of the certificate for the 
:term:`Delivery Service`
 
 Review comment:
   done


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mitchell852 commented on issue #643: Initial commit for Simple Session Tracking Lua script (used with tslu…

2019-10-22 Thread GitBox
mitchell852 commented on issue #643: Initial commit for Simple Session Tracking 
Lua script (used with tslu…
URL: https://github.com/apache/trafficcontrol/pull/643#issuecomment-544970126
 
 
   @sandmanahoy - let me know if this was tested and if this is something you 
still want merged.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mattjackson220 commented on a change in pull request #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and…

2019-10-22 Thread GitBox
mattjackson220 commented on a change in pull request #3534: TP Delivery Service 
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r337549414
 
 

 ##
 File path: docs/source/admin/traffic_router.rst
 ##
 @@ -681,8 +681,67 @@ The ordering of certificates within the certificate 
bundle matters. It must be:
 
 To see the ordering of certificates you may have to manually split up your 
certificate chain and use :manpage:`openssl(1ssl)` on each individual 
certificate
 
-Suggested Way of Setting up an HTTPS Delivery Service
--
+Let's Encrypt
+-
+Let’s Encrypt is a free, automated :abbr:`CA (Certificate Authority)` using 
:abbr:`ACME (Automated Certificate Management Environment)` protocol. Let's 
Encrypt performs a domain validation before issuing or renewing a certificate. 
There are several options for domain validation but for this application the 
DNS challenge is used in order to receive wildcard certificates. Let's Encrypt 
sends a token to be used as a TXT record at 
``_acme-challenge.domain.example.com`` and after verifying that the token is 
accessible there, will return the newly generated and signed certificate and 
key. The basic workflow implemented is:
+
+#. ``POST`` to Let's Encrypt and receive the DNS challenge token.
+#. Traffic Ops stores the DNS challenge in the Traffic Ops database using the 
fqdn of the certificate request as the key.
 
 Review comment:
   done


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mattjackson220 commented on a change in pull request #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and…

2019-10-22 Thread GitBox
mattjackson220 commented on a change in pull request #3534: TP Delivery Service 
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r337555050
 
 

 ##
 File path: docs/source/api/letsencrypt_dnsrecord.rst
 ##
 @@ -0,0 +1,66 @@
+..
+..
+.. Licensed 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.
+..
+
+.. _to-letsencrypt-dnsrecord:
+
+*
+``letsencrypt/dnsrecord``
+*
+
+.. versionadded:: 1.4
+
+``GET``
+
+Gets DNS challenge records for Let's Encrypt DNS challenge for a specified 
fqdn.
 
 Review comment:
   done


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mattjackson220 commented on a change in pull request #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and…

2019-10-22 Thread GitBox
mattjackson220 commented on a change in pull request #3534: TP Delivery Service 
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r337556352
 
 

 ##
 File path: docs/source/api/letsencrypt_dnsrecords.rst
 ##
 @@ -0,0 +1,53 @@
+..
+..
+.. Licensed 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.
+..
+
+.. _to-letsencrypt-dnsrecords:
+
+**
+``letsencrypt/dnsrecords``
+**
+
+.. versionadded:: 1.4
+
+``GET``
+
+Gets all DNS challenge records for Let's Encrypt DNS challenges.
+
+:Auth. Required: Yes
+:Roles Required: "admin" or "operations"
+:Response Type:  Array
+
+Request Structure
+-
+No parameters available
+
+
+Response Structure
+--
+:fqdn:  The Fully Qualified Domain Name (FQDN) for the TXT record location 
to complete the DNS challenge
 
 Review comment:
   done


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mattjackson220 commented on a change in pull request #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and…

2019-10-22 Thread GitBox
mattjackson220 commented on a change in pull request #3534: TP Delivery Service 
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r337556250
 
 

 ##
 File path: docs/source/api/letsencrypt_dnsrecord.rst
 ##
 @@ -0,0 +1,66 @@
+..
+..
+.. Licensed 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.
+..
+
+.. _to-letsencrypt-dnsrecord:
+
+*
+``letsencrypt/dnsrecord``
+*
+
+.. versionadded:: 1.4
+
+``GET``
+
+Gets DNS challenge records for Let's Encrypt DNS challenge for a specified 
fqdn.
+
+:Auth. Required: Yes
+:Roles Required: "admin" or "operations"
+:Response Type:  Object
+
+Request Structure
+-
+.. table:: Request Query Parameters
+
+   
+--+--++
+   | Name | Required | Description 
   |
+   
+==+==++
+   | fqdn | yes  | Return only DNS challenge records for the specified 
fqdn   |
+   
+--+--++
+
+.. code-block:: http
+   :caption: Request Example
+
+   GET 
/api/1.4/letsencrypt/dnsrecord?fqdn=_acme-challenge.demo1.example.com. HTTP/1.1
+   Host: trafficops.infra.ciab.test
+   User-Agent: curl/7.47.0
+   Accept: */*
+   Cookie: mojolicious=...
+
+
+Response Structure
+--
+:fqdn:  The Fully Qualified Domain Name (FQDN) for the TXT record location 
to complete the DNS challenge
 
 Review comment:
   done


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mattjackson220 commented on a change in pull request #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and…

2019-10-22 Thread GitBox
mattjackson220 commented on a change in pull request #3534: TP Delivery Service 
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r337555816
 
 

 ##
 File path: docs/source/api/letsencrypt_dnsrecord.rst
 ##
 @@ -0,0 +1,66 @@
+..
+..
+.. Licensed 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.
+..
+
+.. _to-letsencrypt-dnsrecord:
+
+*
+``letsencrypt/dnsrecord``
+*
+
+.. versionadded:: 1.4
+
+``GET``
+
+Gets DNS challenge records for Let's Encrypt DNS challenge for a specified 
fqdn.
+
+:Auth. Required: Yes
+:Roles Required: "admin" or "operations"
+:Response Type:  Object
+
+Request Structure
+-
+.. table:: Request Query Parameters
+
+   
+--+--++
+   | Name | Required | Description 
   |
+   
+==+==++
+   | fqdn | yes  | Return only DNS challenge records for the specified 
fqdn   |
 
 Review comment:
   done


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: trafficcontrol-PR #4610

2019-10-22 Thread Apache Jenkins Server
See 


Changes:

[rawlin_peters] Implement GET /api/1.1/roles handler

[rawlin_peters] Add changelog entry

[rawlin_peters] Remove unnecessary API version checks


--
[...truncated 2.61 MB...]
traffic_portal_build_1   | | | `-- strip-json-comments@0.1.3 
traffic_portal_build_1   | | +-- utile@0.3.0 
traffic_portal_build_1   | | | +-- async@0.9.2 
traffic_portal_build_1   | | | +-- deep-equal@0.2.2 
traffic_portal_build_1   | | | +-- i@0.3.6 
traffic_portal_build_1   | | | +-- ncp@1.0.1 
traffic_portal_build_1   | | | `-- rimraf@2.7.1 
traffic_portal_build_1   | | |   `-- glob@7.1.5 
traffic_portal_build_1   | | | +-- fs.realpath@1.0.0 
traffic_portal_build_1   | | | +-- inflight@1.0.6 
traffic_portal_build_1   | | | | `-- wrappy@1.0.2 
traffic_portal_build_1   | | | `-- once@1.4.0 
traffic_portal_build_1   | | `-- winston@0.8.3 
traffic_portal_build_1   | |   +-- cycle@1.0.3 
traffic_portal_build_1   | |   +-- isstream@0.1.2 
traffic_portal_build_1   | |   +-- pkginfo@0.3.1 
traffic_portal_build_1   | |   `-- stack-trace@0.0.10 
traffic_portal_build_1   | +-- morgan@1.9.1 
traffic_portal_build_1   | | `-- basic-auth@2.0.1 
traffic_portal_build_1   | +-- requirejs@2.1.22 
traffic_portal_build_1   | `-- ssl-root-cas@1.1.10 
traffic_portal_build_1   |   +-- es6-promise@2.3.0 
traffic_portal_build_1   |   `-- request@2.88.0 
traffic_portal_build_1   | +-- aws-sign2@0.7.0 
traffic_portal_build_1   | +-- aws4@1.8.0 
traffic_portal_build_1   | +-- caseless@0.12.0 
traffic_portal_build_1   | +-- combined-stream@1.0.8 
traffic_portal_build_1   | | `-- delayed-stream@1.0.0 
traffic_portal_build_1   | +-- extend@3.0.2 
traffic_portal_build_1   | +-- forever-agent@0.6.1 
traffic_portal_build_1   | +-- form-data@2.3.3 
traffic_portal_build_1   | | `-- asynckit@0.4.0 
traffic_portal_build_1   | +-- har-validator@5.1.3 
traffic_portal_build_1   | | +-- ajv@6.10.2 
traffic_portal_build_1   | | | +-- fast-deep-equal@2.0.1 
traffic_portal_build_1   | | | +-- 
fast-json-stable-stringify@2.0.0 
traffic_portal_build_1   | | | +-- json-schema-traverse@0.4.1 
traffic_portal_build_1   | | | `-- uri-js@4.2.2 
traffic_portal_build_1   | | |   `-- punycode@2.1.1 
traffic_portal_build_1   | | `-- har-schema@2.0.0 
traffic_portal_build_1   | +-- http-signature@1.2.0 
traffic_portal_build_1   | | +-- assert-plus@1.0.0 
traffic_portal_build_1   | | +-- jsprim@1.4.1 
traffic_portal_build_1   | | | +-- extsprintf@1.3.0 
traffic_portal_build_1   | | | +-- json-schema@0.2.3 
traffic_portal_build_1   | | | `-- verror@1.10.0 
traffic_portal_build_1   | | `-- sshpk@1.16.1 
traffic_portal_build_1   | |   +-- asn1@0.2.4 
traffic_portal_build_1   | |   +-- bcrypt-pbkdf@1.0.2 
traffic_portal_build_1   | |   +-- dashdash@1.14.1 
traffic_portal_build_1   | |   +-- ecc-jsbn@0.1.2 
traffic_portal_build_1   | |   +-- getpass@0.1.7 
traffic_portal_build_1   | |   +-- jsbn@0.1.1 
traffic_portal_build_1   | |   `-- tweetnacl@0.14.5 
traffic_portal_build_1   | +-- is-typedarray@1.0.0 
traffic_portal_build_1   | +-- json-stringify-safe@5.0.1 
traffic_portal_build_1   | +-- oauth-sign@0.9.0 
traffic_portal_build_1   | +-- performance-now@2.1.0 
traffic_portal_build_1   | +-- qs@6.5.2 
traffic_portal_build_1   | +-- tough-cookie@2.4.3 
traffic_portal_build_1   | | +-- psl@1.4.0 
traffic_portal_build_1   | | `-- punycode@1.4.1 
traffic_portal_build_1   | +-- tunnel-agent@0.6.0 
traffic_portal_build_1   | `-- uuid@3.3.3 
traffic_portal_build_1   | 
traffic_portal_build_1   | npm WARN optional SKIPPING OPTIONAL 
DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
traffic_portal_build_1   | npm WARN notsup SKIPPING OPTIONAL 
DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted 
{"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
traffic_portal_build_1   | npm WARN traffic_portal@ No description
traffic_portal_build_1   | npm WARN traffic_portal@ No repository 
field.

[GitHub] [trafficcontrol] asf-ci commented on issue #4011: Implement GET /api/1.1/roles handler

2019-10-22 Thread GitBox
asf-ci commented on issue #4011: Implement GET /api/1.1/roles handler
URL: https://github.com/apache/trafficcontrol/pull/4011#issuecomment-545134574
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4610/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] jheitz200 commented on a change in pull request #4006: implement deliveryservice_server_capabilities api endpoint

2019-10-22 Thread GitBox
jheitz200 commented on a change in pull request #4006: implement 
deliveryservice_server_capabilities api endpoint
URL: https://github.com/apache/trafficcontrol/pull/4006#discussion_r337743518
 
 

 ##
 File path: traffic_ops/testing/api/v14/todb.go
 ##
 @@ -275,6 +281,20 @@ INSERT INTO to_extension (name, version, info_url, 
isactive, script_file, server
return nil
 }
 
+// SetupServerCapabilities sets up seed server capabilities
 
 Review comment:
   I think this was a merge issue, they must have been removed from master 
after I submitted my PR


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] asf-ci commented on issue #4012: WIP - Added IPv6 checking to Traffic Monitor

2019-10-22 Thread GitBox
asf-ci commented on issue #4012: WIP - Added IPv6 checking to Traffic Monitor
URL: https://github.com/apache/trafficcontrol/pull/4012#issuecomment-545155560
 
 
   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 to 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: trafficcontrol-PR #4611

2019-10-22 Thread Apache Jenkins Server
See 


Changes:

[mitchell852] adds server capbility management to a server

[mitchell852] adds the ability to view the servers that are utilizing a server

[mitchell852] removes unecessary click handler

[mitchell852] sends query params correctly

[mitchell852] fixes styling on table row and changes hover verbiage

[mitchell852] adds context menu item to the servers table for managing a 
server's

[mitchell852] adds the ability to click on a server capability of a server (in 
the

[mitchell852] adds UI tests for server to server capability assignment

[mitchell852] changes per PR review

[mitchell852] adds a simplified context menu to the server capability servers 
table

[mitchell852] adds the ability to quickly remove the server from the capability

[mitchell852] adds docs for assigning a server capability to a server


--
[...truncated 2.53 MB...]
traffic_router_build_1   | [INFO] + cd 
/tmp/trafficcontrol/traffic_router/build/target/rpm/traffic_router/BUILD
traffic_router_build_1   | [INFO] + /usr/bin/rm -rf 
/tmp/trafficcontrol/traffic_router/build/target/rpm/traffic_router/buildroot
traffic_router_build_1   | [INFO] + exit 0
traffic_router_build_1   | [INFO] 

traffic_router_build_1   | [INFO] Reactor Summary for traffic_router 
3.0.0:
traffic_router_build_1   | [INFO] 
traffic_router_build_1   | [INFO] traffic_router 
. SUCCESS [  1.866 s]
traffic_router_build_1   | [INFO] traffic_router_shared 
.. SUCCESS [ 31.281 s]
traffic_router_build_1   | [INFO] traffic_router_connector 
... SUCCESS [ 10.608 s]
traffic_router_build_1   | [INFO] traffic_router_config 
.. SUCCESS [  0.058 s]
traffic_router_build_1   | [INFO] traffic_router_geolocation 
. SUCCESS [  0.117 s]
traffic_router_build_1   | [INFO] ROOT 
... SUCCESS [ 32.284 s]
traffic_router_build_1   | [INFO] traffic_router_rpm 
. SUCCESS [ 15.590 s]
traffic_router_build_1   | [INFO] 

traffic_router_build_1   | [INFO] BUILD SUCCESS
traffic_router_build_1   | [INFO] 

traffic_router_build_1   | [INFO] Total time:  01:32 min
traffic_router_build_1   | [INFO] Finished at: 2019-10-22T20:19:12Z
traffic_router_build_1   | [INFO] 

traffic_router_build_1   | 

traffic_router_build_1   | RPM BUILD SUCCEEDED, See 
/tmp/trafficcontrol/dist/traffic_router-3.0.0-10279.f7017814.x86_64.rpm for the 
newly built rpm.
traffic_router_build_1   | 

traffic_router_build_1   | 
traffic_router_build_1   | Building the rpm for Tomcat.
traffic_router_build_1   | Verifying the build configuration 
environment.
traffic_router_build_1   | 
==
traffic_router_build_1   | WORKSPACE: /tmp/trafficcontrol
traffic_router_build_1   | TOMCAT_RELEASE: 32
traffic_router_build_1   | TOMCAT_VERSION: 8.5
traffic_router_build_1   | BUILD_NUMBER: 10279.f7017814
traffic_router_build_1   | BUILD_LOCK: 10279.f7017814.el7
traffic_router_build_1   | RPM: 
tomcat-8.5.32-10279.f7017814.el7.x86_64.rpm
traffic_router_build_1   | 
--
traffic_router_build_1   | Initializing the build area.
traffic_router_build_1   | Downloading Tomcat 8.5.32...
traffic_router_build_1   |   % Total% Received % Xferd  Average 
Speed   TimeTime Time  Current
traffic_router_build_1   |  Dload  
Upload   Total   SpentLeft  Speed
traffic_portal_build_1   | + 
/usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
traffic_portal_build_1   | + 
/usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
traffic_portal_build_1   | + /usr/lib/rpm/brp-python-bytecompile 
/usr/bin/python 1
traffic_portal_build_1   | + /usr/lib/rpm/redhat/brp-python-hardlink
traffic_portal_build_1   | + /usr/lib/rpm/redhat/brp-java-repack-jars
traffic_portal_build_1   | Processing files: 

[GitHub] [trafficcontrol] asf-ci commented on issue #3998: TP: Ability to manager capabilities of servers

2019-10-22 Thread GitBox
asf-ci commented on issue #3998: TP: Ability to manager capabilities of servers
URL: https://github.com/apache/trafficcontrol/pull/3998#issuecomment-545136360
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4611/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] ocket8888 commented on a change in pull request #4006: implement deliveryservice_server_capabilities api endpoint

2019-10-22 Thread GitBox
ocket commented on a change in pull request #4006: implement 
deliveryservice_server_capabilities api endpoint
URL: https://github.com/apache/trafficcontrol/pull/4006#discussion_r337750113
 
 

 ##
 File path: 
traffic_ops/traffic_ops_golang/deliveryservice/deliveryservice_server_capabilities_test.go
 ##
 @@ -0,0 +1,188 @@
+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 (
+   "fmt"
+   "net/http"
+   "testing"
+   "time"
+
+   "github.com/apache/trafficcontrol/lib/go-tc"
+   "github.com/apache/trafficcontrol/lib/go-util"
+
+   "github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/api"
+   "github.com/jmoiron/sqlx"
+   sqlmock "gopkg.in/DATA-DOG/go-sqlmock.v1"
+)
+
+func TestDeliveryServiceServerCapabilityInterfaces(t *testing.T) {
+   var i interface{}
+   i = {}
+
+   if _, ok := i.(api.Creator); !ok {
+   t.Errorf("DeliveryServiceServerCapability must be Creator")
+   }
+   if _, ok := i.(api.Reader); !ok {
+   t.Errorf("DeliveryServiceServerCapability must be Reader")
+   }
+   if _, ok := i.(api.Deleter); !ok {
+   t.Errorf("DeliveryServiceServerCapability must be Deleter")
+   }
+   if _, ok := i.(api.Identifier); !ok {
+   t.Errorf("DeliveryServiceServerCapability must be Identifier")
+   }
+}
+
+func TestCreateDeliveryServiceServerCapability(t *testing.T) {
+   mockDB, mock, err := sqlmock.New()
+   if err != nil {
+   t.Fatalf(err.Error())
+   }
+   defer mockDB.Close()
+
+   db := sqlx.NewDb(mockDB, "sqlmock")
+   defer db.Close()
+
+   mock.ExpectBegin()
+   sc := ServerCapability{
+   api.APIInfoImpl{
+   ReqInfo: {Tx: db.MustBegin()},
+   },
+   tc.DeliveryServiceServerCapability{},
+   }
+
+   rows := sqlmock.NewRows([]string{"server_capability", 
"deliveryservice_id", "last_updated"}).AddRow(
+   util.StrPtr("mem"),
+   util.IntPtr(1),
+   time.Now(),
+   )
+   mock.ExpectQuery("INSERT*").WillReturnRows(rows)
 
 Review comment:
   FWIW a bunch of our `INSERT` queries will return rows via the `RETURNING` 
clause. Dunno if that's what's supposed to happen here or not. Those typically 
use [`database/sql.Tx.QueryRow`](https://godoc.org/database/sql#Tx.QueryRow).


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mattjackson220 opened a new pull request #4012: WIP - Added IPv6 checking to Traffic Monitor

2019-10-22 Thread GitBox
mattjackson220 opened a new pull request #4012: WIP - Added IPv6 checking to 
Traffic Monitor
URL: https://github.com/apache/trafficcontrol/pull/4012
 
 
   
   ## What does this PR (Pull Request) do?
   
   
   - [ ] This PR fixes #REPLACE_ME OR is not related to any Issue 
   
   
   ## Which Traffic Control components are affected by this PR?
   
   
   - CDN in a Box
   - Documentation
   - Grove
   - Traffic Control Client 
   - Traffic Monitor
   - Traffic Ops
   - Traffic Ops ORT
   - Traffic Portal
   - Traffic Router
   - Traffic Stats
   - Traffic Vault
   
   ## What is the best way to verify this PR?
   
   
   ## If this is a bug fix, what versions of Traffic Control are affected?
   
   
   
   ## The following criteria are ALL met by this PR
   
   
   - [ ] This PR includes tests OR I have explained why tests are unnecessary
   - [ ] This PR includes documentation OR I have explained why documentation 
is unnecessary
   - [ ] This PR includes an update to CHANGELOG.md OR such an update is not 
necessary
   - [ ] This PR includes any and all required license headers
   - [ ] This PR ensures that database migration sequence is correct OR this PR 
does not include a database migration
   - [ ] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY** (see [the 
Apache Software Foundation's security 
guidelines](https://www.apache.org/security/) for details)
   
   
   ## Additional Information
   
   
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mitchell852 commented on issue #4007: Server Capability get by name - returns blank response array when the requested item doesn't exist

2019-10-22 Thread GitBox
mitchell852 commented on issue #4007: Server Capability get by name - returns 
blank response array when the requested item doesn't exist
URL: https://github.com/apache/trafficcontrol/issues/4007#issuecomment-545169954
 
 
   For what it's worth, to me this makes sense:
   
   `GET /foos/{id-does-not-exist}` returns a 404 as the URI does NOT exist
   
   and 
   
   `GET /foos?id=id-does-not-exist` returns an empty array as i see the query 
parameter as a filter of a perfectly valid URI as @ocket mentioned.
   
   
   
   
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] rawlinp opened a new pull request #4013: Add TO-Go /api/1.1/servers/status GET handler

2019-10-22 Thread GitBox
rawlinp opened a new pull request #4013: Add TO-Go /api/1.1/servers/status GET 
handler
URL: https://github.com/apache/trafficcontrol/pull/4013
 
 
   ## What does this PR (Pull Request) do?
   Rewrite the /api/1.1/servers/status GET handler to Go.
   
   - [x] This PR fixes #3826 
   
   
   ## Which Traffic Control components are affected by this PR?
   - Traffic Ops
   
   
   ## What is the best way to verify this PR?
   1. Run to the TO API tests, make sure they pass.
   
   ## The following criteria are ALL met by this PR
   
   - [ ] This PR includes tests OR I have explained why tests are unnecessary
   - [ ] This PR includes documentation OR I have explained why documentation 
is unnecessary
   - [ ] This PR includes an update to CHANGELOG.md OR such an update is not 
necessary
   - [ ] This PR includes any and all required license headers
   - [ ] This PR ensures that database migration sequence is correct OR this PR 
does not include a database migration
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY** (see [the 
Apache Software Foundation's security 
guidelines](https://www.apache.org/security/) for details)
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] asf-ci commented on issue #4013: Add TO-Go /api/1.1/servers/status GET handler

2019-10-22 Thread GitBox
asf-ci commented on issue #4013: Add TO-Go /api/1.1/servers/status GET handler
URL: https://github.com/apache/trafficcontrol/pull/4013#issuecomment-545177921
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4613/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: trafficcontrol-PR #4613

2019-10-22 Thread Apache Jenkins Server
See 


Changes:

[rawlin_peters] Add TO-Go /api/1.1/servers/status GET handler


--
GitHub pull request #4013 of commit 4fe24f2c70cd97a08a997213e9b540514e905801, 
no merge conflicts.
Running as SYSTEM
Setting status of 4fe24f2c70cd97a08a997213e9b540514e905801 to PENDING with url 
https://builds.apache.org/job/trafficcontrol-PR/4613/ and message: 'Build 
started for merge commit.'
Using context: default
[EnvInject] - Loading node environment variables.
Building remotely on H41 (ubuntu xenial) in workspace 

[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
using credential b205a645-1ea7-4dfd-973d-c14ac43cab07
Cloning the remote Git repository
Cloning repository git://github.com/apache/trafficcontrol.git
 > git init  # timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url git://github.com/apache/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/trafficcontrol.git # 
 > timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/pull/*:refs/remotes/origin/pr/*
 > git rev-parse 4fe24f2c70cd97a08a997213e9b540514e905801^{commit} # timeout=10
Checking out Revision 4fe24f2c70cd97a08a997213e9b540514e905801 (detached)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 4fe24f2c70cd97a08a997213e9b540514e905801
Commit message: "Add TO-Go /api/1.1/servers/status GET handler"
 > git rev-list --no-walk 93f5fe4daf894db687d015306541fd2829e32f93 # timeout=10
[trafficcontrol-PR] $ /bin/bash /tmp/jenkins2607978721186654368.sh
++ echo jenkins-trafficcontrol-PR-4613
++ sed s/-//g
++ sed s/jenkins//
+ proj=trafficcontrolPR4613
+ yml=infrastructure/docker/build/docker-compose.yml
++ mktemp /tmp/docker-compose-
+ dc=/tmp/docker-compose-R37Y
++ mktemp /tmp/tc-status-
+ st=/tmp/tc-status-GDjh
+ trap finish EXIT
++ uname -s
++ uname -m
+ curl -o /tmp/docker-compose-R37Y -L 
https://github.com/docker/compose/releases/download/1.13.0/docker-compose-Linux-x86_64
  % 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 
  6170   6170 0   1091  0 --:--:-- --:--:-- --:--:--  1090
 30 8079k   30 2466k0 0  1644k  0  0:00:04  0:00:01  0:00:03 
1644k100 8079k  100 8079k0 0  4732k  0  0:00:01  0:00:01 --:--:-- 
26.4M
+ chmod +x /tmp/docker-compose-R37Y
+ rm -rf dist
+ /tmp/docker-compose-R37Y -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4613 up
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ exit 1
+ finish
+ /tmp/docker-compose-R37Y -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4613 down -v
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ /tmp/docker-compose-R37Y -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4613 rm -v -f
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ rm -f /tmp/docker-compose-R37Y
Build step 'Execute shell' marked build as failure
Skipped archiving because build is not successful


[GitHub] [trafficcontrol] mitchell852 commented on a change in pull request #3998: TP: Ability to manager capabilities of servers

2019-10-22 Thread GitBox
mitchell852 commented on a change in pull request #3998: TP: Ability to manager 
capabilities of servers
URL: https://github.com/apache/trafficcontrol/pull/3998#discussion_r337740844
 
 

 ##
 File path: 
traffic_portal/app/src/common/modules/table/serverServerCapabilities/TableServerServerCapabilitiesController.js
 ##
 @@ -0,0 +1,123 @@
+/*
+ * 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.
+ */
+
+var TableServerServerCapabilitiesController = function(server, 
serverCapabilities, $scope, $state, $uibModal, locationUtils, serverService, 
messageModel) {
+
+   $scope.server = server;
+
+   $scope.serverCapabilities = serverCapabilities;
+
+   $scope.contextMenuItems = [
+   {
+   text: 'Remove Server Capability',
+   click: function ($itemScope) {
+   
$scope.confirmRemoveCapability($itemScope.sc.serverCapability);
+   }
+   }
+   ];
+
+   $scope.addServerCapability = function() {
+   var params = {
+   title: 'Add Server Capability',
+   message: "Please select a capability to add to this 
server",
+   key: "name"
+   };
+   var modalInstance = $uibModal.open({
+   templateUrl: 
'common/modules/dialog/select/dialog.select.tpl.html',
+   controller: 'DialogSelectController',
+   size: 'md',
+   resolve: {
+   params: function () {
+   return params;
+   },
+   collection: function(serverCapabilityService) {
+   return 
serverCapabilityService.getServerCapabilities();
+   }
+   }
+   });
+   modalInstance.result.then(function(serverCapability) {
+   serverService.addServerCapability(server.id, 
serverCapability.name)
+   .then(
+   function(result) {
+   
messageModel.setMessages(result.data.alerts, false);
+   $scope.refresh(); // refresh 
the profile parameters table
+   }
+   );
+   }, function () {
+   // do nothing
 
 Review comment:
   /shrug. i just do what the docs told me to do. here's how it works - 
https://stackoverflow.com/questions/34652998/how-does-angular-uibmodalinstance-closedata-works
 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] ocket8888 commented on a change in pull request #3998: TP: Ability to manager capabilities of servers

2019-10-22 Thread GitBox
ocket commented on a change in pull request #3998: TP: Ability to manager 
capabilities of servers
URL: https://github.com/apache/trafficcontrol/pull/3998#discussion_r337744648
 
 

 ##
 File path: 
traffic_portal/app/src/common/modules/table/serverServerCapabilities/TableServerServerCapabilitiesController.js
 ##
 @@ -0,0 +1,123 @@
+/*
+ * 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.
+ */
+
+var TableServerServerCapabilitiesController = function(server, 
serverCapabilities, $scope, $state, $uibModal, locationUtils, serverService, 
messageModel) {
+
+   $scope.server = server;
+
+   $scope.serverCapabilities = serverCapabilities;
+
+   $scope.contextMenuItems = [
+   {
+   text: 'Remove Server Capability',
+   click: function ($itemScope) {
+   
$scope.confirmRemoveCapability($itemScope.sc.serverCapability);
+   }
+   }
+   ];
+
+   $scope.addServerCapability = function() {
+   var params = {
+   title: 'Add Server Capability',
+   message: "Please select a capability to add to this 
server",
+   key: "name"
+   };
+   var modalInstance = $uibModal.open({
+   templateUrl: 
'common/modules/dialog/select/dialog.select.tpl.html',
+   controller: 'DialogSelectController',
+   size: 'md',
+   resolve: {
+   params: function () {
+   return params;
+   },
+   collection: function(serverCapabilityService) {
+   return 
serverCapabilityService.getServerCapabilities();
+   }
+   }
+   });
+   modalInstance.result.then(function(serverCapability) {
+   serverService.addServerCapability(server.id, 
serverCapability.name)
+   .then(
+   function(result) {
+   
messageModel.setMessages(result.data.alerts, false);
+   $scope.refresh(); // refresh 
the profile parameters table
+   }
+   );
+   }, function () {
+   // do nothing
 
 Review comment:
   Hm. I don't think that's a proper DOM dialog close event. Regardless, 
promise handling is clearly correct.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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 : trafficcontrol-PR #4612

2019-10-22 Thread Apache Jenkins Server
See 



[GitHub] [trafficcontrol] asf-ci commented on issue #3998: TP: Ability to manager capabilities of servers

2019-10-22 Thread GitBox
asf-ci commented on issue #3998: TP: Ability to manager capabilities of servers
URL: https://github.com/apache/trafficcontrol/pull/3998#issuecomment-545150439
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4612/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mitchell852 commented on a change in pull request #3998: TP: Ability to manager capabilities of servers

2019-10-22 Thread GitBox
mitchell852 commented on a change in pull request #3998: TP: Ability to manager 
capabilities of servers
URL: https://github.com/apache/trafficcontrol/pull/3998#discussion_r337740844
 
 

 ##
 File path: 
traffic_portal/app/src/common/modules/table/serverServerCapabilities/TableServerServerCapabilitiesController.js
 ##
 @@ -0,0 +1,123 @@
+/*
+ * 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.
+ */
+
+var TableServerServerCapabilitiesController = function(server, 
serverCapabilities, $scope, $state, $uibModal, locationUtils, serverService, 
messageModel) {
+
+   $scope.server = server;
+
+   $scope.serverCapabilities = serverCapabilities;
+
+   $scope.contextMenuItems = [
+   {
+   text: 'Remove Server Capability',
+   click: function ($itemScope) {
+   
$scope.confirmRemoveCapability($itemScope.sc.serverCapability);
+   }
+   }
+   ];
+
+   $scope.addServerCapability = function() {
+   var params = {
+   title: 'Add Server Capability',
+   message: "Please select a capability to add to this 
server",
+   key: "name"
+   };
+   var modalInstance = $uibModal.open({
+   templateUrl: 
'common/modules/dialog/select/dialog.select.tpl.html',
+   controller: 'DialogSelectController',
+   size: 'md',
+   resolve: {
+   params: function () {
+   return params;
+   },
+   collection: function(serverCapabilityService) {
+   return 
serverCapabilityService.getServerCapabilities();
+   }
+   }
+   });
+   modalInstance.result.then(function(serverCapability) {
+   serverService.addServerCapability(server.id, 
serverCapability.name)
+   .then(
+   function(result) {
+   
messageModel.setMessages(result.data.alerts, false);
+   $scope.refresh(); // refresh 
the profile parameters table
+   }
+   );
+   }, function () {
+   // do nothing
 
 Review comment:
   /shrug. i just do what the docs told me to do. here's how it works - 
https://stackoverflow.com/a/36732944


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mitchell852 edited a comment on issue #4000: Put server_capability status code is incorrect

2019-10-22 Thread GitBox
mitchell852 edited a comment on issue #4000: Put server_capability status code 
is incorrect
URL: https://github.com/apache/trafficcontrol/issues/4000#issuecomment-545166335
 
 
   > I just labeled it as it was reported, shall I change it?
   
   yeah, maybe @ZugNZwang can change his description to an `improvement 
request` as this is more of an API improvement rather than a bug and then we 
can change the label...


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] asf-ci commented on issue #3998: TP: Ability to manager capabilities of servers

2019-10-22 Thread GitBox
asf-ci commented on issue #3998: TP: Ability to manager capabilities of servers
URL: https://github.com/apache/trafficcontrol/pull/3998#issuecomment-545086787
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4605/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] ocket8888 commented on issue #3999: Traffic Ops API POST with no body returns an EOF error, should return a more informative error

2019-10-22 Thread GitBox
ocket commented on issue #3999: Traffic Ops API POST with no body returns 
an EOF error, should return a more informative error
URL: https://github.com/apache/trafficcontrol/issues/3999#issuecomment-545091857
 
 
   I don't think it's dispatch/routing, that to me looks like the kind of error 
`encoding/json.Decoder.Decode` would return if the first character in its input 
buffer is `EOF`. I think requests are probably getting to the right place, and 
we're just returning exactly the error we got.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] guzzijason opened a new pull request #4010: Port legacy perl TO extension checks from perl to go

2019-10-22 Thread GitBox
guzzijason opened a new pull request #4010: Port legacy perl TO extension 
checks from perl to go
URL: https://github.com/apache/trafficcontrol/pull/4010
 
 
   
   ## What does this PR (Pull Request) do?
   
   
   - Traffic Ops Extensions (server checks) 
   
   ## What is the best way to verify this PR?
   
   
   ## If this is a bug fix, what versions of Traffic Control are affected?
   
   
   
   ## The following criteria are ALL met by this PR
   
   
   - [x] This PR includes tests OR I have explained why tests are unnecessary
   - [x] This PR includes documentation OR I have explained why documentation 
is unnecessary
   - [x] This PR includes an update to CHANGELOG.md OR such an update is not 
necessary
   - [x] This PR includes any and all required license headers
   - [x] This PR ensures that database migration sequence is correct OR this PR 
does not include a database migration
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY** (see [the 
Apache Software Foundation's security 
guidelines](https://www.apache.org/security/) for details)
   
   
   ## Additional Information
   
   
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] ocket8888 commented on issue #4010: Port legacy perl TO extension checks from perl to go

2019-10-22 Thread GitBox
ocket commented on issue #4010: Port legacy perl TO extension checks from 
perl to go
URL: https://github.com/apache/trafficcontrol/pull/4010#issuecomment-545108518
 
 
   ok to test


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] rawlinp opened a new pull request #4011: Implement GET /api/1.1/roles handler

2019-10-22 Thread GitBox
rawlinp opened a new pull request #4011: Implement GET /api/1.1/roles handler
URL: https://github.com/apache/trafficcontrol/pull/4011
 
 
   
   
   ## What does this PR (Pull Request) do?
   Modify the 1.3 GET handler to also handle requests at 1.1 (the only
   difference is the addition of the "capabilities" field in 1.3).
   
   - [x] This PR fixes #3820
   
   ## Which Traffic Control components are affected by this PR?
   
   - Traffic Ops
   
   ## What is the best way to verify this PR?
   1. Run the TO API tests
   2. `GET /api/1.1/roles` and `GET /api/1.2/roles`, verify that the 
`capabilities` field **does not exist** in the result.
   3. `GET /api/1.3/roles` and `GET /api/1.4/roles`, verify that the 
`capabilities` field **does exist** in the result.
   
   ## The following criteria are ALL met by this PR
   
   - [x] This PR includes tests
   - [x] Documentation already exists for /api/1.1/roles
   - [x] This PR includes an update to CHANGELOG.md
   - [x] This PR includes any and all required license headers
   - [x] This PR does not include a database migration
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY** (see [the 
Apache Software Foundation's security 
guidelines](https://www.apache.org/security/) for details)
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mattjackson220 commented on a change in pull request #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and…

2019-10-22 Thread GitBox
mattjackson220 commented on a change in pull request #3534: TP Delivery Service 
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r337558120
 
 

 ##
 File path: docs/source/api/deliveryservices_hostname_name_sslkeys.rst
 ##
 @@ -72,6 +72,10 @@ Response Structure
 :state:   An optional field which, if present, contains the state 
entered by the user when generating certificate\ [#optional]_
 :version: The version of the certificate record in Traffic Vault
 
+   .. versionadded:: 1.4
+
+:expiration:  The expiration date of the certificate for the 
:term:`Delivery Service`
+
 .. code- block:: http
 
 Review comment:
   done


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mhoppa commented on a change in pull request #3929: Rewrote /user/reset_password to Go

2019-10-22 Thread GitBox
mhoppa commented on a change in pull request #3929: Rewrote 
/user/reset_password to Go
URL: https://github.com/apache/trafficcontrol/pull/3929#discussion_r337643607
 
 

 ##
 File path: infrastructure/cdn-in-a-box/traffic_ops/config.sh
 ##
 @@ -111,7 +111,7 @@ cat <<-EOF >/opt/traffic_ops/app/conf/cdn.conf
 "no_account_found_msg" : "A Traffic Ops user account is required for 
access. Please contact your Traffic Ops user administrator."
 },
 "portal" : {
-"base_url" : "https://$TP_FQDN/!#/;,
+"base_url" : "https://$TP_HOST.$INFRA_SUBDOMAIN.$TLD_DOMAIN/!#/;,
 
 Review comment:
   this needs to be changed to #! 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] ocket8888 commented on a change in pull request #3929: Rewrote /user/reset_password to Go

2019-10-22 Thread GitBox
ocket commented on a change in pull request #3929: Rewrote 
/user/reset_password to Go
URL: https://github.com/apache/trafficcontrol/pull/3929#discussion_r337580415
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/login/login_test.go
 ##
 @@ -121,4 +121,5 @@ func TestTemplateRender(t *testing.T) {
if tmpl.Len() <= 0 {
t.Fatalf("Template buffer empty after execution")
}
+   t.Logf("%s", tmpl.String())
 
 Review comment:
   I don't think it hurts, you only see it with `-v` and it's nice to have that 
option. I can remove  it if you think that's clutter.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mitchell852 commented on a change in pull request #3998: TP: Ability to manager capabilities of servers

2019-10-22 Thread GitBox
mitchell852 commented on a change in pull request #3998: TP: Ability to manager 
capabilities of servers
URL: https://github.com/apache/trafficcontrol/pull/3998#discussion_r337652192
 
 

 ##
 File path: 
traffic_portal/app/src/common/modules/table/serverCapabilityServers/table.serverCapabilityServers.tpl.html
 ##
 @@ -0,0 +1,47 @@
+
+
+
+
+
+Server 
Capabilities
+{{::serverCapability.name}}
+Servers
+
+
+
+
+
+
+
+
+
+
+
 
 Review comment:
   yep, sorry this stuff just propogates


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mitchell852 commented on a change in pull request #3998: TP: Ability to manager capabilities of servers

2019-10-22 Thread GitBox
mitchell852 commented on a change in pull request #3998: TP: Ability to manager 
capabilities of servers
URL: https://github.com/apache/trafficcontrol/pull/3998#discussion_r337652192
 
 

 ##
 File path: 
traffic_portal/app/src/common/modules/table/serverCapabilityServers/table.serverCapabilityServers.tpl.html
 ##
 @@ -0,0 +1,47 @@
+
+
+
+
+
+Server 
Capabilities
+{{::serverCapability.name}}
+Servers
+
+
+
+
+
+
+
+
+
+
+
 
 Review comment:
   yep, sorry this stuff just propagates


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mitchell852 opened a new pull request #4008: TP: fixes bug that surfaces when trying to compare profiles without params

2019-10-22 Thread GitBox
mitchell852 opened a new pull request #4008: TP: fixes bug that surfaces when 
trying to compare profiles without params
URL: https://github.com/apache/trafficcontrol/pull/4008
 
 
   ## What does this PR (Pull Request) do?
   This PR fixes a bug highlighted by a failing UI test. When comparing 2 
profiles, if one or both of the profiles has no params, then the comparison 
state fails to load.
   
   - [x] This PR is not related to any Issue
   
   - No tests as this is a bug fix highlighted by a current UI test
   - No documentation as this is simply a bug fix
   - No changelog.md entry as this bug was not released with any TC release
   
   ## Which Traffic Control components are affected by this PR?
   
   - Traffic Portal
   
   ## What is the best way to verify this PR?
   - In TP, navigate to the profiles view - tp.domain.com/#!/profiles
   - Select 2 profiles to compare. Ensure that at least one of those profiles 
has ZERO params associated with it
   - Ensure that the profile diff page is displayed correctly.
   
   ## If this is a bug fix, what versions of Traffic Control are affected?
   - master (0974c74)
   
   ## The following criteria are ALL met by this PR
   
   - [x] This PR includes tests OR I have explained why tests are unnecessary
   - [x] This PR includes documentation OR I have explained why documentation 
is unnecessary
   - [x] This PR includes an update to CHANGELOG.md OR such an update is not 
necessary
   - [x] This PR includes any and all required license headers
   - [x] This PR ensures that database migration sequence is correct OR this PR 
does not include a database migration
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY** (see [the 
Apache Software Foundation's security 
guidelines](https://www.apache.org/security/) for details)
   
   
   ## Additional Information
   
   
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mhoppa commented on a change in pull request #3929: Rewrote /user/reset_password to Go

2019-10-22 Thread GitBox
mhoppa commented on a change in pull request #3929: Rewrote 
/user/reset_password to Go
URL: https://github.com/apache/trafficcontrol/pull/3929#discussion_r337581097
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/login/login_test.go
 ##
 @@ -121,4 +121,5 @@ func TestTemplateRender(t *testing.T) {
if tmpl.Len() <= 0 {
t.Fatalf("Template buffer empty after execution")
}
+   t.Logf("%s", tmpl.String())
 
 Review comment:
   nope! fine leaving it


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] rawlinp opened a new pull request #4009: Add top-level vendor dir to TO-Go and TM unit test containers

2019-10-22 Thread GitBox
rawlinp opened a new pull request #4009: Add top-level vendor dir to TO-Go and 
TM unit test containers
URL: https://github.com/apache/trafficcontrol/pull/4009
 
 
   ## What does this PR (Pull Request) do?
   The TO-Go and TM unit test containers are failing to find the vendored
   influxdb library after moving it to the top-level vendor dir. Fix the
   containers to include the top-level vendor dir in the build.
   
   - [x] This PR fixes is not related to any issue
   
   ## Which Traffic Control components are affected by this PR?
   
   - Traffic Monitor (tests only)
   - Traffic Ops (tests only)
   
   
   ## What is the best way to verify this PR?
   Make sure both of these containers build successfully and the tests pass.
   ```
   docker-compose -f traffic_monitor/tests/docker-compose.yml up --build
   docker-compose -f traffic_ops/app/bin/tests/docker-compose.yml up --build 
unit_golang
   ```
   
   ## The following criteria are ALL met by this PR
   
   - [x] This PR includes tests OR I have explained why tests are unnecessary
   - [x] This PR fixes test container builds, no docs necessary
   - [x] This PR includes an update to CHANGELOG.md OR such an update is not 
necessary
   - [x] This PR includes any and all required license headers
   - [x] This PR ensures that database migration sequence is correct OR this PR 
does not include a database migration
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY** (see [the 
Apache Software Foundation's security 
guidelines](https://www.apache.org/security/) for details)
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] ChrisHines commented on a change in pull request #4006: implement deliveryservice_server_capabilities api endpoint

2019-10-22 Thread GitBox
ChrisHines commented on a change in pull request #4006: implement 
deliveryservice_server_capabilities api endpoint
URL: https://github.com/apache/trafficcontrol/pull/4006#discussion_r337565187
 
 

 ##
 File path: lib/go-tc/deliveryservice_server_capabilities.go
 ##
 @@ -0,0 +1,28 @@
+package tc
+
+/*
+ * 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.
+ */
+
+// DeliveryServiceServerCapability represents an association between a server 
capability and a delivery service
 
 Review comment:
   Missing period at end of documentation sentence here (and several other 
places in this PR).


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] ChrisHines commented on a change in pull request #4006: implement deliveryservice_server_capabilities api endpoint

2019-10-22 Thread GitBox
ChrisHines commented on a change in pull request #4006: implement 
deliveryservice_server_capabilities api endpoint
URL: https://github.com/apache/trafficcontrol/pull/4006#discussion_r337610384
 
 

 ##
 File path: 
traffic_ops/traffic_ops_golang/deliveryservice/deliveryservice_server_capabilities_test.go
 ##
 @@ -0,0 +1,188 @@
+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 (
+   "fmt"
+   "net/http"
+   "testing"
+   "time"
+
+   "github.com/apache/trafficcontrol/lib/go-tc"
+   "github.com/apache/trafficcontrol/lib/go-util"
+
 
 Review comment:
   Extra blank line.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] ChrisHines commented on a change in pull request #4006: implement deliveryservice_server_capabilities api endpoint

2019-10-22 Thread GitBox
ChrisHines commented on a change in pull request #4006: implement 
deliveryservice_server_capabilities api endpoint
URL: https://github.com/apache/trafficcontrol/pull/4006#discussion_r337600378
 
 

 ##
 File path: 
traffic_ops/testing/api/v14/deliveryservice_server_capabilities_test.go
 ##
 @@ -0,0 +1,211 @@
+package v14
+
+/*
+
+   Licensed 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 (
+   "fmt"
+   "strings"
+   "testing"
+
+   "github.com/apache/trafficcontrol/lib/go-tc"
+   "github.com/apache/trafficcontrol/lib/go-util"
+)
+
+func TestGetDeliveryServiceServerCapabilities(t *testing.T) {
+   WithObjs(t, []TCObj{CDNs, Types, Tenants, Users, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, 
ServerCapabilities, DeliveryServices, DeliveryServiceServerCapabilities}, 
func() {
+   testCases := []struct {
+   description string
+   capability  tc.DeliveryServiceServerCapability
+   expectedint
+   err string
+   }{
+   {
+   description: "get all deliveryservice server 
capabilities",
+   expected:
len(testData.DeliveryServiceServerCapabilities),
+   },
+   {
+   description: fmt.Sprintf("get all 
deliveryservice server capabilities by delivery service id"),
+   capability: tc.DeliveryServiceServerCapability{
+   DeliveryServiceID: getDSID(t, 
testData.DeliveryServiceServerCapabilities[0]),
+   },
+   expected: 1,
+   },
+   {
+   description: fmt.Sprintf("get all 
deliveryservice server capabilities by xml id"),
+   capability: tc.DeliveryServiceServerCapability{
+   XMLID: 
testData.DeliveryServiceServerCapabilities[0].XMLID,
+   },
+   expected: 1,
+   },
+   {
+   description: fmt.Sprintf("get all 
deliveryservice server capabilities by server capability"),
+   capability: tc.DeliveryServiceServerCapability{
+   ServerCapability: 
testData.DeliveryServiceServerCapabilities[0].ServerCapability,
+   },
+   expected: 1,
+   },
+   }
+
+   for i, tc := range testCases {
+   t.Run(fmt.Sprintf("case %d: %s", i, tc.description), 
func(t *testing.T) {
+   capabilities, _, err := 
TOSession.GetDeliveryServiceServerCapabilities(tc.capability.DeliveryServiceID, 
tc.capability.XMLID, tc.capability.ServerCapability)
+   if err != nil {
+   if !strings.Contains(err.Error(), 
tc.err) {
+   t.Fatalf("case %d: %s; got err= 
%v; expected err = %v", i, tc.description, err, tc.err)
+   }
+   }
+   if len(capabilities) != tc.expected {
+   t.Errorf("got %d; expected %d server 
capabilities assigned to deliveryservices", len(capabilities), tc.expected)
+   }
+   })
+   }
+   })
+}
+
+func CreateTestDeliveryServiceServerCapabilities(t *testing.T) {
+   testCases := []struct {
+   description string
+   capability  tc.DeliveryServiceServerCapability
+   err string
+   }{
+   {
+   description: "re-assign a deliveryservice server 
capability",
+   capability: tc.DeliveryServiceServerCapability{
+   DeliveryServiceID: getDSID(t, 
testData.DeliveryServiceServerCapabilities[0]),
+   ServerCapability:  
testData.DeliveryServiceServerCapabilities[0].ServerCapability,
+   },
+   err: 

[GitHub] [trafficcontrol] ChrisHines commented on a change in pull request #4006: implement deliveryservice_server_capabilities api endpoint

2019-10-22 Thread GitBox
ChrisHines commented on a change in pull request #4006: implement 
deliveryservice_server_capabilities api endpoint
URL: https://github.com/apache/trafficcontrol/pull/4006#discussion_r337607687
 
 

 ##
 File path: 
traffic_ops/traffic_ops_golang/deliveryservice/deliveryservice_server_capabilities.go
 ##
 @@ -0,0 +1,196 @@
+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 (
+   "errors"
+   "net/http"
+
+   "github.com/apache/trafficcontrol/lib/go-tc"
+   "github.com/apache/trafficcontrol/lib/go-tc/tovalidate"
+   "github.com/apache/trafficcontrol/lib/go-util"
+   "github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/api"
+   
"github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/dbhelpers"
+   validation "github.com/go-ozzo/ozzo-validation"
+)
+
+const (
+   deliveryServiceQueryParam  = "deliveryServiceID"
+   serverCapabilityQueryParam = "serverCapability"
+   xmlIDQueryParam= "xmlID"
+)
+
+// ServerCapability is a type alias to define functions on
+type ServerCapability struct {
+   api.APIInfoImpl `json:"-"`
+   tc.DeliveryServiceServerCapability
+}
 
 Review comment:
   What does "type alias" mean in this context? Go has a specific meaning for a 
type alias in the spec (https://golang.org/ref/spec#Type_declarations), but 
this code is not declaring that kind of type alias. Consider different language 
in the comment here to avoid confusion.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] ChrisHines commented on a change in pull request #4006: implement deliveryservice_server_capabilities api endpoint

2019-10-22 Thread GitBox
ChrisHines commented on a change in pull request #4006: implement 
deliveryservice_server_capabilities api endpoint
URL: https://github.com/apache/trafficcontrol/pull/4006#discussion_r337572627
 
 

 ##
 File path: traffic_ops/client/deliveryservice_server_capabilities.go
 ##
 @@ -0,0 +1,79 @@
+/*
+
+   Licensed 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.
+*/
+
+package client
+
+import (
+   "encoding/json"
+   "fmt"
+   "net"
+   "net/url"
+   "strconv"
+
+   "github.com/apache/trafficcontrol/lib/go-tc"
+)
+
+const (
+   v14DeliveryServiceServerCapabilities = apiBase + 
"/deliveryservice_server_capabilities"
+)
+
+// CreateDeliveryServiceServerCapability assigns a Server Capability to a 
Delivery Service
+func (to *Session) CreateDeliveryServiceServerCapability(capability 
tc.DeliveryServiceServerCapability) (tc.Alerts, ReqInf, error) {
+   var alerts tc.Alerts
+   var remoteAddr net.Addr
+   reqInf := ReqInf{CacheHitStatus: CacheHitStatusMiss, RemoteAddr: 
remoteAddr}
+   reqBody, err := json.Marshal(capability)
+   if err != nil {
+   return tc.Alerts{}, reqInf, err
+   }
+   reqInf, err = post(to, v14DeliveryServiceServerCapabilities, reqBody, 
)
+   return alerts, reqInf, err
+}
+
+// DeleteDeliveryServiceServerCapability unassigns a Server Capability from a 
Delivery Service
+func (to *Session) DeleteDeliveryServiceServerCapability(deliveryserviceID 
int, serverCapability string) (tc.Alerts, ReqInf, error) {
+   var alerts tc.Alerts
+   endpoint := fmt.Sprintf("%v?deliveryServiceID=%v=%v", 
v14DeliveryServiceServerCapabilities, deliveryserviceID, serverCapability)
+   reqInf, err := del(to, endpoint, )
+   return alerts, reqInf, err
+}
+
+// GetDeliveryServiceServerCapabilities retrieves a list of Server 
Capabilities that are assigned to a Delivery Service
+// Callers can filter the results by delivery service id, xml id and/or server 
capability via the optional parameters
+func (to *Session) GetDeliveryServiceServerCapabilities(deliveryServiceID 
*int, xmlID, serverCapability *string) ([]tc.DeliveryServiceServerCapability, 
ReqInf, error) {
+   v := url.Values{}
+   if deliveryServiceID != nil {
+   v.Add("deliveryServiceID", strconv.Itoa(*deliveryServiceID))
+   }
+   if xmlID != nil {
+   v.Add("xmlID", *xmlID)
+   }
+   if serverCapability != nil {
+   v.Add("serverCapability", *serverCapability)
+   }
+   queryURL := v14DeliveryServiceServerCapabilities
+   if qStr := v.Encode(); len(qStr) > 0 {
 
 Review comment:
   `url.Values` is a map type, consider `if len(v) != 0` as an alternative here.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] ChrisHines commented on a change in pull request #4006: implement deliveryservice_server_capabilities api endpoint

2019-10-22 Thread GitBox
ChrisHines commented on a change in pull request #4006: implement 
deliveryservice_server_capabilities api endpoint
URL: https://github.com/apache/trafficcontrol/pull/4006#discussion_r337595138
 
 

 ##
 File path: 
traffic_ops/testing/api/v14/deliveryservice_server_capabilities_test.go
 ##
 @@ -0,0 +1,211 @@
+package v14
+
+/*
+
+   Licensed 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 (
+   "fmt"
+   "strings"
+   "testing"
+
+   "github.com/apache/trafficcontrol/lib/go-tc"
+   "github.com/apache/trafficcontrol/lib/go-util"
+)
+
+func TestGetDeliveryServiceServerCapabilities(t *testing.T) {
+   WithObjs(t, []TCObj{CDNs, Types, Tenants, Users, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, 
ServerCapabilities, DeliveryServices, DeliveryServiceServerCapabilities}, 
func() {
+   testCases := []struct {
+   description string
+   capability  tc.DeliveryServiceServerCapability
+   expectedint
+   err string
+   }{
+   {
+   description: "get all deliveryservice server 
capabilities",
+   expected:
len(testData.DeliveryServiceServerCapabilities),
+   },
+   {
+   description: fmt.Sprintf("get all 
deliveryservice server capabilities by delivery service id"),
+   capability: tc.DeliveryServiceServerCapability{
+   DeliveryServiceID: getDSID(t, 
testData.DeliveryServiceServerCapabilities[0]),
+   },
+   expected: 1,
+   },
+   {
+   description: fmt.Sprintf("get all 
deliveryservice server capabilities by xml id"),
+   capability: tc.DeliveryServiceServerCapability{
+   XMLID: 
testData.DeliveryServiceServerCapabilities[0].XMLID,
+   },
+   expected: 1,
+   },
+   {
+   description: fmt.Sprintf("get all 
deliveryservice server capabilities by server capability"),
+   capability: tc.DeliveryServiceServerCapability{
+   ServerCapability: 
testData.DeliveryServiceServerCapabilities[0].ServerCapability,
+   },
+   expected: 1,
+   },
+   }
+
+   for i, tc := range testCases {
+   t.Run(fmt.Sprintf("case %d: %s", i, tc.description), 
func(t *testing.T) {
+   capabilities, _, err := 
TOSession.GetDeliveryServiceServerCapabilities(tc.capability.DeliveryServiceID, 
tc.capability.XMLID, tc.capability.ServerCapability)
+   if err != nil {
+   if !strings.Contains(err.Error(), 
tc.err) {
+   t.Fatalf("case %d: %s; got err= 
%v; expected err = %v", i, tc.description, err, tc.err)
+   }
+   }
+   if len(capabilities) != tc.expected {
+   t.Errorf("got %d; expected %d server 
capabilities assigned to deliveryservices", len(capabilities), tc.expected)
+   }
+   })
+   }
+   })
+}
+
+func CreateTestDeliveryServiceServerCapabilities(t *testing.T) {
+   testCases := []struct {
+   description string
+   capability  tc.DeliveryServiceServerCapability
+   err string
+   }{
+   {
+   description: "re-assign a deliveryservice server 
capability",
+   capability: tc.DeliveryServiceServerCapability{
+   DeliveryServiceID: getDSID(t, 
testData.DeliveryServiceServerCapabilities[0]),
+   ServerCapability:  
testData.DeliveryServiceServerCapabilities[0].ServerCapability,
+   },
+   err: 

[GitHub] [trafficcontrol] ChrisHines commented on a change in pull request #4006: implement deliveryservice_server_capabilities api endpoint

2019-10-22 Thread GitBox
ChrisHines commented on a change in pull request #4006: implement 
deliveryservice_server_capabilities api endpoint
URL: https://github.com/apache/trafficcontrol/pull/4006#discussion_r337623669
 
 

 ##
 File path: traffic_ops/testing/api/v14/todb.go
 ##
 @@ -103,6 +103,12 @@ func SetupTestData(*sql.DB) error {
os.Exit(1)
}
 
+   err = SetupServerCapabilities(db)
+   if err != nil {
+   fmt.Printf("\nError setting up server capabilities %s - %s, 
%v\n", Config.TrafficOps.URL, Config.TrafficOps.Users.Admin, err)
+   os.Exit(1)
 
 Review comment:
   I know this PR is just following the established pattern here, but this 
function can never return a non-nil error since it calls os.Exit whenever it 
gets an error from the functions it calls. Perhaps something to note with a 
TODO comment to follow up on later.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] ChrisHines commented on a change in pull request #4006: implement deliveryservice_server_capabilities api endpoint

2019-10-22 Thread GitBox
ChrisHines commented on a change in pull request #4006: implement 
deliveryservice_server_capabilities api endpoint
URL: https://github.com/apache/trafficcontrol/pull/4006#discussion_r337592200
 
 

 ##
 File path: 
traffic_ops/testing/api/v14/deliveryservice_server_capabilities_test.go
 ##
 @@ -0,0 +1,211 @@
+package v14
+
+/*
+
+   Licensed 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 (
+   "fmt"
+   "strings"
+   "testing"
+
+   "github.com/apache/trafficcontrol/lib/go-tc"
+   "github.com/apache/trafficcontrol/lib/go-util"
+)
+
+func TestGetDeliveryServiceServerCapabilities(t *testing.T) {
+   WithObjs(t, []TCObj{CDNs, Types, Tenants, Users, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, 
ServerCapabilities, DeliveryServices, DeliveryServiceServerCapabilities}, 
func() {
+   testCases := []struct {
+   description string
+   capability  tc.DeliveryServiceServerCapability
+   expectedint
+   err string
+   }{
+   {
+   description: "get all deliveryservice server 
capabilities",
+   expected:
len(testData.DeliveryServiceServerCapabilities),
+   },
+   {
+   description: fmt.Sprintf("get all 
deliveryservice server capabilities by delivery service id"),
+   capability: tc.DeliveryServiceServerCapability{
+   DeliveryServiceID: getDSID(t, 
testData.DeliveryServiceServerCapabilities[0]),
+   },
+   expected: 1,
+   },
+   {
+   description: fmt.Sprintf("get all 
deliveryservice server capabilities by xml id"),
+   capability: tc.DeliveryServiceServerCapability{
+   XMLID: 
testData.DeliveryServiceServerCapabilities[0].XMLID,
+   },
+   expected: 1,
+   },
+   {
+   description: fmt.Sprintf("get all 
deliveryservice server capabilities by server capability"),
+   capability: tc.DeliveryServiceServerCapability{
+   ServerCapability: 
testData.DeliveryServiceServerCapabilities[0].ServerCapability,
+   },
+   expected: 1,
+   },
+   }
+
+   for i, tc := range testCases {
+   t.Run(fmt.Sprintf("case %d: %s", i, tc.description), 
func(t *testing.T) {
+   capabilities, _, err := 
TOSession.GetDeliveryServiceServerCapabilities(tc.capability.DeliveryServiceID, 
tc.capability.XMLID, tc.capability.ServerCapability)
+   if err != nil {
+   if !strings.Contains(err.Error(), 
tc.err) {
+   t.Fatalf("case %d: %s; got err= 
%v; expected err = %v", i, tc.description, err, tc.err)
+   }
+   }
+   if len(capabilities) != tc.expected {
+   t.Errorf("got %d; expected %d server 
capabilities assigned to deliveryservices", len(capabilities), tc.expected)
+   }
+   })
+   }
+   })
+}
+
+func CreateTestDeliveryServiceServerCapabilities(t *testing.T) {
+   testCases := []struct {
+   description string
+   capability  tc.DeliveryServiceServerCapability
+   err string
+   }{
+   {
+   description: "re-assign a deliveryservice server 
capability",
+   capability: tc.DeliveryServiceServerCapability{
+   DeliveryServiceID: getDSID(t, 
testData.DeliveryServiceServerCapabilities[0]),
+   ServerCapability:  
testData.DeliveryServiceServerCapabilities[0].ServerCapability,
+   },
+   err: 

[GitHub] [trafficcontrol] ChrisHines commented on a change in pull request #4006: implement deliveryservice_server_capabilities api endpoint

2019-10-22 Thread GitBox
ChrisHines commented on a change in pull request #4006: implement 
deliveryservice_server_capabilities api endpoint
URL: https://github.com/apache/trafficcontrol/pull/4006#discussion_r337619314
 
 

 ##
 File path: 
traffic_ops/traffic_ops_golang/deliveryservice/deliveryservice_server_capabilities_test.go
 ##
 @@ -0,0 +1,188 @@
+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 (
+   "fmt"
+   "net/http"
+   "testing"
+   "time"
+
+   "github.com/apache/trafficcontrol/lib/go-tc"
+   "github.com/apache/trafficcontrol/lib/go-util"
+
+   "github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/api"
+   "github.com/jmoiron/sqlx"
+   sqlmock "gopkg.in/DATA-DOG/go-sqlmock.v1"
+)
+
+func TestDeliveryServiceServerCapabilityInterfaces(t *testing.T) {
+   var i interface{}
+   i = {}
+
+   if _, ok := i.(api.Creator); !ok {
+   t.Errorf("DeliveryServiceServerCapability must be Creator")
+   }
+   if _, ok := i.(api.Reader); !ok {
+   t.Errorf("DeliveryServiceServerCapability must be Reader")
+   }
+   if _, ok := i.(api.Deleter); !ok {
+   t.Errorf("DeliveryServiceServerCapability must be Deleter")
+   }
+   if _, ok := i.(api.Identifier); !ok {
+   t.Errorf("DeliveryServiceServerCapability must be Identifier")
+   }
+}
+
+func TestCreateDeliveryServiceServerCapability(t *testing.T) {
+   mockDB, mock, err := sqlmock.New()
+   if err != nil {
+   t.Fatalf(err.Error())
+   }
+   defer mockDB.Close()
+
+   db := sqlx.NewDb(mockDB, "sqlmock")
+   defer db.Close()
+
+   mock.ExpectBegin()
+   sc := ServerCapability{
+   api.APIInfoImpl{
+   ReqInfo: {Tx: db.MustBegin()},
+   },
+   tc.DeliveryServiceServerCapability{},
+   }
+
+   rows := sqlmock.NewRows([]string{"server_capability", 
"deliveryservice_id", "last_updated"}).AddRow(
+   util.StrPtr("mem"),
+   util.IntPtr(1),
+   time.Now(),
+   )
+   mock.ExpectQuery("INSERT*").WillReturnRows(rows)
 
 Review comment:
   Is `ExpectQuery` the right choice for an INSERT? In my experience an INSERT 
should be run with a `DB.Exec` not `DB.Query` and would not return any rows. I 
expected to see something like 
`mock.ExpectExec(regex).WillReturnResult(result)`. See this sqlmock example: 
https://godoc.org/github.com/DATA-DOG/go-sqlmock#example-ExpectedExec
   
   Consider passing a more specific regex here. (BTW, the current regex will 
accept both "INSER" and "INSERTT" anywhere in the query string.) I suggest 
requiring "INSERT" to be at the beginning of the query and checking that the 
insert will go to the right table with a regex similar to "^INSERT INTO 
"+tableName+".*".


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] asf-ci commented on issue #4009: Add top-level vendor dir to TO-Go and TM unit test containers

2019-10-22 Thread GitBox
asf-ci commented on issue #4009: Add top-level vendor dir to TO-Go and TM unit 
test containers
URL: https://github.com/apache/trafficcontrol/pull/4009#issuecomment-545061245
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4602/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: trafficcontrol-PR #4603

2019-10-22 Thread Apache Jenkins Server
See 


Changes:

[ocket] rewrote /user/reset_password to Go

[ocket] Fixed redundant rollbacks

[ocket] Removed UUID dependency, doing it manually now

[ocket] Go fmt

[ocket] Fixed UUID encoding issues

[ocket] go fmt

[ocket] Fix missing Content-Type header in email template

[ocket] Fix struct values in rendered template

[ocket] Fix my template "fix"

[ocket] fixed reciever problem in template execution

[ocket] Added template test

[ocket] go fmt

[ocket] Fix improperly inserted URL

[ocket] added path to url so it should point to the right place now

[ocket] fix incorrect configuration parameter in CDN-in-a-Box

[ocket] Fix bad default cdn.conf

[ocket] Fix incorrectly formatted email addresses in template headers

[ocket] Fix improper URL formatting in template


--
[...truncated 3.23 MB...]
traffic_portal_build_1   | `-- ssl-root-cas@1.1.10 
traffic_portal_build_1   |   +-- es6-promise@2.3.0 
traffic_portal_build_1   |   `-- request@2.88.0 
traffic_portal_build_1   | +-- aws-sign2@0.7.0 
traffic_portal_build_1   | +-- aws4@1.8.0 
traffic_portal_build_1   | +-- caseless@0.12.0 
traffic_portal_build_1   | +-- combined-stream@1.0.8 
traffic_portal_build_1   | | `-- delayed-stream@1.0.0 
traffic_portal_build_1   | +-- extend@3.0.2 
traffic_portal_build_1   | +-- forever-agent@0.6.1 
traffic_portal_build_1   | +-- form-data@2.3.3 
traffic_portal_build_1   | | `-- asynckit@0.4.0 
traffic_portal_build_1   | +-- har-validator@5.1.3 
traffic_portal_build_1   | | +-- ajv@6.10.2 
traffic_portal_build_1   | | | +-- fast-deep-equal@2.0.1 
traffic_portal_build_1   | | | +-- 
fast-json-stable-stringify@2.0.0 
traffic_portal_build_1   | | | +-- json-schema-traverse@0.4.1 
traffic_portal_build_1   | | | `-- uri-js@4.2.2 
traffic_portal_build_1   | | |   `-- punycode@2.1.1 
traffic_portal_build_1   | | `-- har-schema@2.0.0 
traffic_portal_build_1   | +-- http-signature@1.2.0 
traffic_portal_build_1   | | +-- assert-plus@1.0.0 
traffic_portal_build_1   | | +-- jsprim@1.4.1 
traffic_portal_build_1   | | | +-- extsprintf@1.3.0 
traffic_portal_build_1   | | | +-- json-schema@0.2.3 
traffic_portal_build_1   | | | `-- verror@1.10.0 
traffic_portal_build_1   | | `-- sshpk@1.16.1 
traffic_portal_build_1   | |   +-- asn1@0.2.4 
traffic_portal_build_1   | |   +-- bcrypt-pbkdf@1.0.2 
traffic_portal_build_1   | |   +-- dashdash@1.14.1 
traffic_portal_build_1   | |   +-- ecc-jsbn@0.1.2 
traffic_portal_build_1   | |   +-- getpass@0.1.7 
traffic_portal_build_1   | |   +-- jsbn@0.1.1 
traffic_portal_build_1   | |   `-- tweetnacl@0.14.5 
traffic_portal_build_1   | +-- is-typedarray@1.0.0 
traffic_portal_build_1   | +-- json-stringify-safe@5.0.1 
traffic_portal_build_1   | +-- oauth-sign@0.9.0 
traffic_portal_build_1   | +-- performance-now@2.1.0 
traffic_portal_build_1   | +-- qs@6.5.2 
traffic_portal_build_1   | +-- tough-cookie@2.4.3 
traffic_portal_build_1   | | +-- psl@1.4.0 
traffic_portal_build_1   | | `-- punycode@1.4.1 
traffic_portal_build_1   | +-- tunnel-agent@0.6.0 
traffic_portal_build_1   | `-- uuid@3.3.3 
traffic_portal_build_1   | 
traffic_portal_build_1   | npm WARN optional SKIPPING OPTIONAL 
DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
traffic_portal_build_1   | npm WARN notsup SKIPPING OPTIONAL 
DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted 
{"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
traffic_portal_build_1   | npm WARN traffic_portal@ No description
traffic_portal_build_1   | npm WARN traffic_portal@ No repository 
field.
traffic_portal_build_1   | npm WARN traffic_portal@ No license field.
traffic_portal_build_1   | 
traffic_portal_build_1   | Done.
traffic_portal_build_1   | 
traffic_portal_build_1   | 
traffic_portal_build_1   | Execution Time (2019-10-22 17:10:56 UTC)
traffic_portal_build_1   | loading tasks  1.1s  ▇ 
3%
traffic_portal_build_1   | compass:prod  11.1s  
▇▇▇▇▇▇▇▇▇ 26%
traffic_portal_build_1   | 

[GitHub] [trafficcontrol] rob05c commented on issue #4000: Put server_capability status code is incorrect

2019-10-22 Thread GitBox
rob05c commented on issue #4000: Put server_capability status code is incorrect
URL: https://github.com/apache/trafficcontrol/issues/4000#issuecomment-545074002
 
 
   It's not "incorrect," it's just less precise than it could be. The HTTP spec 
(RFC 7231) doesn't require a 405, you can always use a less precise code, and 
404 is correct, the resource does not exist there.
   
   It wouldn't be a bad thing to change TO to return 405's, but I wouldn't call 
it a bug.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: trafficcontrol-traffic_ops-test #1596

2019-10-22 Thread Apache Jenkins Server
See 


Changes:

[ocket] Add top-level vendor dir to TO-Go and TM unit test containers 
(#4009)


--
Started by an SCM change
Running as SYSTEM
[EnvInject] - Loading node environment variables.
Building remotely on H38 (ubuntu xenial) in workspace 

using credential b205a645-1ea7-4dfd-973d-c14ac43cab07
 > 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/trafficcontrol.git # 
 > timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 52b5f2c6d70e2030577b259a31f04c3dfe428209 
(refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 52b5f2c6d70e2030577b259a31f04c3dfe428209
Commit message: "Add top-level vendor dir to TO-Go and TM unit test containers 
(#4009)"
 > git rev-list --no-walk 0974c748399ef70c0efb7f1bc1f1de0eccd207cb # timeout=10
[trafficcontrol-traffic_ops-test] $ /bin/bash /tmp/jenkins2175472243330175631.sh
docker-compose version 1.24.1, build 4667896
docker-py version: 3.7.2
CPython version: 2.7.12
OpenSSL version: OpenSSL 1.0.2g  1 Mar 2016
+ trap finish EXIT
+ proj=jenkins-trafficcontrol-traffic_ops-test-1596
++ pwd
+ 
compose=
+ cfile=traffic_ops/app/bin/tests/docker-compose.yml
+ [[ -z 

 ]]
+ [[ ! -x 

 ]]
+ 

 -p jenkins-trafficcontrol-traffic_ops-test-1596 -f 
traffic_ops/app/bin/tests/docker-compose.yml up --build --exit-code-from 
unit_golang unit_golang
using --exit-code-from implies --abort-on-container-exit
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ exit 1
+ finish
+ local st=1
+ [[ 1 -ne 0 ]]
+ echo 'Exiting with status 1'
Exiting with status 1
+ 

 -p jenkins-trafficcontrol-traffic_ops-test-1596 -f 
traffic_ops/app/bin/tests/docker-compose.yml down -v
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
Build step 'Execute shell' marked build as failure


Build failed in Jenkins: trafficcontrol-master-build #1553

2019-10-22 Thread Apache Jenkins Server
See 


Changes:

[ocket] Add top-level vendor dir to TO-Go and TM unit test containers 
(#4009)


--
Started by an SCM change
Running as SYSTEM
[EnvInject] - Loading node environment variables.
Building remotely on H42 (ubuntu xenial) in workspace 

[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
[WS-CLEANUP] Done
using credential b205a645-1ea7-4dfd-973d-c14ac43cab07
Cloning the remote Git repository
Cloning repository git://github.com/apache/trafficcontrol.git
 > git init  # 
 > timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url git://github.com/apache/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/trafficcontrol.git # 
 > timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 52b5f2c6d70e2030577b259a31f04c3dfe428209 
(refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 52b5f2c6d70e2030577b259a31f04c3dfe428209
Commit message: "Add top-level vendor dir to TO-Go and TM unit test containers 
(#4009)"
 > git rev-list --no-walk 0974c748399ef70c0efb7f1bc1f1de0eccd207cb # timeout=10
[trafficcontrol-master-build] $ /bin/bash /tmp/jenkins3374647050077142905.sh
++ echo jenkins-trafficcontrol-master-build-1553
++ sed s/jenkins//
++ sed s/-//g
+ proj=trafficcontrolmasterbuild1553
+ yml=infrastructure/docker/build/docker-compose.yml
++ mktemp /tmp/docker-compose-
+ dc=/tmp/docker-compose-aaRg
++ mktemp /tmp/tc-status-
+ st=/tmp/tc-status-feMX
++ uname -s
++ uname -m
+ curl -o /tmp/docker-compose-aaRg -L 
https://github.com/docker/compose/releases/download/1.13.0/docker-compose-Linux-x86_64
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 
0100   6170   6170 0978  0 --:--:-- --:--:-- --:--:--   979
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 
0100 8079k  100 8079k0 0  4410k  0  0:00:01  0:00:01 --:--:-- 8495k
+ chmod +x /tmp/docker-compose-aaRg
+ rm -rf dist
+ /tmp/docker-compose-aaRg -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolmasterbuild1553 up
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ exit 1
Build step 'Execute shell' marked build as failure
Archiving artifacts


[GitHub] [trafficcontrol] ocket8888 commented on a change in pull request #4011: Implement GET /api/1.1/roles handler

2019-10-22 Thread GitBox
ocket commented on a change in pull request #4011: Implement GET 
/api/1.1/roles handler
URL: https://github.com/apache/trafficcontrol/pull/4011#discussion_r337709162
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/role/roles.go
 ##
 @@ -159,16 +159,32 @@ func (role *TORole) deleteRoleCapabilityAssociations(tx 
*sqlx.Tx) (error, error,
 }
 
 func (role *TORole) Read() ([]interface{}, error, error, int) {
+   version := role.APIInfo().Version
+   if version == nil {
+   return nil, nil, errors.New("TORole.Read called with nil API 
version"), http.StatusInternalServerError
+   }
+   if version.Major != 1 || version.Minor < 1 {
+   return nil, nil, fmt.Errorf("TORole.Read called with invalid 
API version: %d.%d", version.Major, version.Minor), 
http.StatusInternalServerError
+   }
 
 Review comment:
   I don't think you need to do this, because that check ought to be caught by 
[some 
middleware](https://github.com/apache/trafficcontrol/blob/master/traffic_ops/traffic_ops_golang/routing/wrappers.go#L281-L287).


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] asf-ci commented on issue #3998: TP: Ability to manager capabilities of servers

2019-10-22 Thread GitBox
asf-ci commented on issue #3998: TP: Ability to manager capabilities of servers
URL: https://github.com/apache/trafficcontrol/pull/3998#issuecomment-545126553
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4609/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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 : trafficcontrol-PR #4609

2019-10-22 Thread Apache Jenkins Server
See 




[GitHub] [trafficcontrol] mattjackson220 commented on a change in pull request #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and…

2019-10-22 Thread GitBox
mattjackson220 commented on a change in pull request #3534: TP Delivery Service 
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r337560858
 
 

 ##
 File path: docs/source/api/letsencrypt_autorenew.rst
 ##
 @@ -0,0 +1,76 @@
+..
+..
+.. Licensed 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.
+..
+
+.. _to-letsencrypt-autorenew:
+
+*
+``letsencrypt/autorenew``
+*
+
+.. versionadded:: 1.4
+
+``POST``
+
+Generates an SSL certificate and private key using Let's Encrypt for a 
:term:`Delivery Service`
+
+:Auth. Required: Yes
+:Roles Required: "admin" or "operations"
+:Response Type:  Object
+
+Request Structure
+-
+No parameters available
+
+
+Response Structure
+--
+:LetsEncryptExpirations: A list of objects with information regarding 
certificate expiration for all Let's Encrypt certificates
+
+   :XmlId:   The :term:`Delivery Service`'s uniquely identifying 
'xml_id'
+   :Version: The version of the certificate record in Traffic Vault
+   :Expiration:  The expiration date of the certificate for the 
:term:`Delivery Service`
+   :AuthType:The authority type of the certificate for the 
:term:`Delivery Service`
+   :Error:   Any errors received in the renewal process
+
+:SelfSignedExpirations:  A list of objects with information regarding 
certificate expiration for all self signed certificates
+:OtherExpirations:   A list of objects with information regarding 
certificate expiration for all other certificates
 
 Review comment:
   it is just separating them by AuthType but they are all treated differently 
/ presented separately so i would like to keep them separated.  I can add the 
format explanations for each if that is the right way to do it


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mhoppa commented on a change in pull request #3929: Rewrote /user/reset_password to Go

2019-10-22 Thread GitBox
mhoppa commented on a change in pull request #3929: Rewrote 
/user/reset_password to Go
URL: https://github.com/apache/trafficcontrol/pull/3929#discussion_r337560837
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/login/login_test.go
 ##
 @@ -121,4 +121,5 @@ func TestTemplateRender(t *testing.T) {
if tmpl.Len() <= 0 {
t.Fatalf("Template buffer empty after execution")
}
+   t.Logf("%s", tmpl.String())
 
 Review comment:
   need the log statement? 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] asf-ci commented on issue #4008: TP: fixes bug that surfaces when trying to compare profiles without params

2019-10-22 Thread GitBox
asf-ci commented on issue #4008: TP: fixes bug that surfaces when trying to 
compare profiles without params
URL: https://github.com/apache/trafficcontrol/pull/4008#issuecomment-545023272
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4600/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] asf-ci commented on issue #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and…

2019-10-22 Thread GitBox
asf-ci commented on issue #3534: TP Delivery Service Generate SSL update, new 
letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#issuecomment-545025630
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4601/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] asf-ci commented on issue #3929: Rewrote /user/reset_password to Go

2019-10-22 Thread GitBox
asf-ci commented on issue #3929: Rewrote /user/reset_password to Go
URL: https://github.com/apache/trafficcontrol/pull/3929#issuecomment-545062721
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4603/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] rob05c commented on issue #3999: Create server_capability response message is incorrect - this is also a issue that needs to be fixed globally for responses

2019-10-22 Thread GitBox
rob05c commented on issue #3999: Create server_capability response message is 
incorrect - this is also a issue that needs to be fixed globally for responses
URL: https://github.com/apache/trafficcontrol/issues/3999#issuecomment-545075883
 
 
   I don't think this is a bug, it's a fundamental change to the API.
   
   For a 404 vs an empty array for objects that don't exist, I don't think 
either is the "right" solution. A 404 is probably more expected. But to say 
"the API returns an array of objects, and if your filter didn't have any, you 
get a successful empty array" is not a violation of HTTP.
   
   Moreover, the TO API has returned 200 [] for ages. It isn't documented 
behavior, but it's most certainly a specific behavior, that clients almost 
certainly rely on in places. Even if it doesn't violate the SemVer API Promise, 
we can't reasonably change this without breaking tons of people.
   
   Likewise, IMO we should continue to make new endpoints follow the same 
pattern as everything else.
   
   It wouldn't be a bad idea to do this in the next major version of the API 
(2.0), but we simply can't safely do it to 1.x.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] rob05c removed a comment on issue #3999: Create server_capability response message is incorrect - this is also a issue that needs to be fixed globally for responses

2019-10-22 Thread GitBox
rob05c removed a comment on issue #3999: Create server_capability response 
message is incorrect - this is also a issue that needs to be fixed globally for 
responses
URL: https://github.com/apache/trafficcontrol/issues/3999#issuecomment-545075883
 
 
   I don't think this is a bug, it's a fundamental change to the API.
   
   For a 404 vs an empty array for objects that don't exist, I don't think 
either is the "right" solution. A 404 is probably more expected. But to say 
"the API returns an array of objects, and if your filter didn't have any, you 
get a successful empty array" is not a violation of HTTP.
   
   Moreover, the TO API has returned 200 [] for ages. It isn't documented 
behavior, but it's most certainly a specific behavior, that clients almost 
certainly rely on in places. Even if it doesn't violate the SemVer API Promise, 
we can't reasonably change this without breaking tons of people.
   
   Likewise, IMO we should continue to make new endpoints follow the same 
pattern as everything else.
   
   It wouldn't be a bad idea to do this in the next major version of the API 
(2.0), but we simply can't safely do it to 1.x.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] ocket8888 merged pull request #4009: Add top-level vendor dir to TO-Go and TM unit test containers

2019-10-22 Thread GitBox
ocket merged pull request #4009: Add top-level vendor dir to TO-Go and TM 
unit test containers
URL: https://github.com/apache/trafficcontrol/pull/4009
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] asf-ci commented on issue #3929: Rewrote /user/reset_password to Go

2019-10-22 Thread GitBox
asf-ci commented on issue #3929: Rewrote /user/reset_password to Go
URL: https://github.com/apache/trafficcontrol/pull/3929#issuecomment-545092582
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4606/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] ocket8888 commented on a change in pull request #3998: TP: Ability to manager capabilities of servers

2019-10-22 Thread GitBox
ocket commented on a change in pull request #3998: TP: Ability to manager 
capabilities of servers
URL: https://github.com/apache/trafficcontrol/pull/3998#discussion_r337679635
 
 

 ##
 File path: 
traffic_portal/app/src/common/modules/table/serverServerCapabilities/TableServerServerCapabilitiesController.js
 ##
 @@ -0,0 +1,123 @@
+/*
+ * 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.
+ */
+
+var TableServerServerCapabilitiesController = function(server, 
serverCapabilities, $scope, $state, $uibModal, locationUtils, serverService, 
messageModel) {
+
+   $scope.server = server;
+
+   $scope.serverCapabilities = serverCapabilities;
+
+   $scope.contextMenuItems = [
+   {
+   text: 'Remove Server Capability',
+   click: function ($itemScope) {
+   
$scope.confirmRemoveCapability($itemScope.sc.serverCapability);
+   }
+   }
+   ];
+
+   $scope.addServerCapability = function() {
+   var params = {
+   title: 'Add Server Capability',
+   message: "Please select a capability to add to this 
server",
+   key: "name"
+   };
+   var modalInstance = $uibModal.open({
+   templateUrl: 
'common/modules/dialog/select/dialog.select.tpl.html',
+   controller: 'DialogSelectController',
+   size: 'md',
+   resolve: {
+   params: function () {
+   return params;
+   },
+   collection: function(serverCapabilityService) {
+   return 
serverCapabilityService.getServerCapabilities();
+   }
+   }
+   });
+   modalInstance.result.then(function(serverCapability) {
+   serverService.addServerCapability(server.id, 
serverCapability.name)
+   .then(
+   function(result) {
+   
messageModel.setMessages(result.data.alerts, false);
+   $scope.refresh(); // refresh 
the profile parameters table
+   }
+   );
+   }, function () {
+   // do nothing
 
 Review comment:
   It's a [dialog close 
event](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/close_event)?
 Then it should be an event handler not a promise handler, right?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] asf-ci commented on issue #4010: Port legacy perl TO extension checks from perl to go

2019-10-22 Thread GitBox
asf-ci commented on issue #4010: Port legacy perl TO extension checks from perl 
to go
URL: https://github.com/apache/trafficcontrol/pull/4010#issuecomment-545110446
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4607/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] asf-ci commented on issue #3998: TP: Ability to manager capabilities of servers

2019-10-22 Thread GitBox
asf-ci commented on issue #3998: TP: Ability to manager capabilities of servers
URL: https://github.com/apache/trafficcontrol/pull/3998#issuecomment-545072973
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4604/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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 : trafficcontrol-PR #4604

2019-10-22 Thread Apache Jenkins Server
See 




[GitHub] [trafficcontrol] rob05c commented on issue #4007: Server Capability get by name - returns blank response array when the requested item doesn't exist

2019-10-22 Thread GitBox
rob05c commented on issue #4007: Server Capability get by name - returns blank 
response array when the requested item doesn't exist
URL: https://github.com/apache/trafficcontrol/issues/4007#issuecomment-545077220
 
 
   I don't think this is a bug, it's a fundamental change to the API.
   
   For a 404 vs an empty array for objects that don't exist, I don't think 
either is the "right" solution. A 404 is probably more expected. But to say 
"the API returns an array of objects, and if your filter didn't have any, you 
get a successful empty array" is not a violation of HTTP.
   
   Moreover, the TO API has returned 200 [] for ages. It isn't documented 
behavior, but it's most certainly a specific behavior, that clients almost 
certainly rely on in places. Even if it doesn't violate the SemVer API Promise, 
we can't reasonably change this without breaking tons of people.
   
   Likewise, IMO we should continue to make new endpoints follow the same 
pattern as everything else.
   
   It wouldn't be a bad idea to do this in the next major version of the API 
(2.0), but we simply can't safely do it to 1.x.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] rob05c commented on issue #3999: Create server_capability response message is incorrect - this is also a issue that needs to be fixed globally for responses

2019-10-22 Thread GitBox
rob05c commented on issue #3999: Create server_capability response message is 
incorrect - this is also a issue that needs to be fixed globally for responses
URL: https://github.com/apache/trafficcontrol/issues/3999#issuecomment-545080006
 
 
   >does this happen on any other POSTs in our api?
   
   Yes, I just tested, looks like it's all endpoints, not just this one. 
Probably a bug in the TO HTTP dispatch/routing.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] ocket8888 commented on issue #4000: Put server_capability status code is incorrect

2019-10-22 Thread GitBox
ocket commented on issue #4000: Put server_capability status code is 
incorrect
URL: https://github.com/apache/trafficcontrol/issues/4000#issuecomment-545090676
 
 
   I just labeled it as it was reported, shall I change it?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] ocket8888 merged pull request #4008: TP: fixes bug that surfaces when trying to compare profiles without params

2019-10-22 Thread GitBox
ocket merged pull request #4008: TP: fixes bug that surfaces when trying to 
compare profiles without params
URL: https://github.com/apache/trafficcontrol/pull/4008
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] asf-ci commented on issue #4010: Port legacy perl TO extension checks from perl to go

2019-10-22 Thread GitBox
asf-ci commented on issue #4010: Port legacy perl TO extension checks from perl 
to go
URL: https://github.com/apache/trafficcontrol/pull/4010#issuecomment-545106638
 
 
   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 to 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 : trafficcontrol-traffic_ops-test #1597

2019-10-22 Thread Apache Jenkins Server
See 




[GitHub] [trafficcontrol] ocket8888 commented on issue #4010: Port legacy perl TO extension checks from perl to go

2019-10-22 Thread GitBox
ocket commented on issue #4010: Port legacy perl TO extension checks from 
perl to go
URL: https://github.com/apache/trafficcontrol/pull/4010#issuecomment-545107969
 
 
   What's the motivation for this? Check extensions just run as scripts with no 
actual dependency on the Perl TO codebase, right?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] guzzijason commented on issue #4010: Port legacy perl TO extension checks from perl to go

2019-10-22 Thread GitBox
guzzijason commented on issue #4010: Port legacy perl TO extension checks from 
perl to go
URL: https://github.com/apache/trafficcontrol/pull/4010#issuecomment-545110217
 
 
   @ocket I just emailed the dev/users lists with some more info regarding 
motivation.
   
   The only dependency was an update to the go client library 
(https://github.com/apache/trafficcontrol/pull/3470) which has already been 
merged.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] asf-ci commented on issue #4011: Implement GET /api/1.1/roles handler

2019-10-22 Thread GitBox
asf-ci commented on issue #4011: Implement GET /api/1.1/roles handler
URL: https://github.com/apache/trafficcontrol/pull/4011#issuecomment-545112558
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4608/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: trafficcontrol-PR #4608

2019-10-22 Thread Apache Jenkins Server
See 


Changes:

[rawlin_peters] Implement GET /api/1.1/roles handler

[rawlin_peters] Add changelog entry


--
GitHub pull request #4011 of commit 26e1c148cb99657e41bcccbc540259eca9bfddce, 
no merge conflicts.
Running as SYSTEM
Setting status of 26e1c148cb99657e41bcccbc540259eca9bfddce to PENDING with url 
https://builds.apache.org/job/trafficcontrol-PR/4608/ and message: 'Build 
started for merge commit.'
Using context: default
[EnvInject] - Loading node environment variables.
Building remotely on H37 (ubuntu xenial) in workspace 

[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
using credential b205a645-1ea7-4dfd-973d-c14ac43cab07
Cloning the remote Git repository
Cloning repository git://github.com/apache/trafficcontrol.git
 > git init  # timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url git://github.com/apache/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/trafficcontrol.git # 
 > timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/pull/*:refs/remotes/origin/pr/*
 > git rev-parse 26e1c148cb99657e41bcccbc540259eca9bfddce^{commit} # timeout=10
Checking out Revision 26e1c148cb99657e41bcccbc540259eca9bfddce (detached)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 26e1c148cb99657e41bcccbc540259eca9bfddce
Commit message: "Add changelog entry"
 > git rev-list --no-walk 08de52533ef2f69ef0b5f1dcaadac2cf982e2f0c # timeout=10
[trafficcontrol-PR] $ /bin/bash /tmp/jenkins9029257598919996512.sh
++ echo jenkins-trafficcontrol-PR-4608
++ sed s/-//g
++ sed s/jenkins//
+ proj=trafficcontrolPR4608
+ yml=infrastructure/docker/build/docker-compose.yml
++ mktemp /tmp/docker-compose-
+ dc=/tmp/docker-compose-UTIo
++ mktemp /tmp/tc-status-
+ st=/tmp/tc-status-oUtG
+ trap finish EXIT
++ uname -s
++ uname -m
+ curl -o /tmp/docker-compose-UTIo -L 
https://github.com/docker/compose/releases/download/1.13.0/docker-compose-Linux-x86_64
  % 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 
  6170   6170 0   1036  0 --:--:-- --:--:-- --:--:--  1035
  1 8079k1  118k0 0  94295  0  0:01:27  0:00:01  0:01:26 
94295100 8079k  100 8079k0 0  4723k  0  0:00:01  0:00:01 --:--:-- 
18.4M
+ chmod +x /tmp/docker-compose-UTIo
+ rm -rf dist
+ /tmp/docker-compose-UTIo -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4608 up
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ exit 1
+ finish
+ /tmp/docker-compose-UTIo -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4608 down -v
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ /tmp/docker-compose-UTIo -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4608 rm -v -f
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ rm -f /tmp/docker-compose-UTIo
Build step 'Execute shell' marked build as failure
Skipped archiving because build is not successful


Build failed in Jenkins: trafficcontrol-master-build #1554

2019-10-22 Thread Apache Jenkins Server
See 


Changes:

[ocket] accounts for null arrays (#4008)


--
[...truncated 647.40 KB...]
Installing ri documentation for sass-3.4.25
Parsing documentation for multi_json-1.14.1
Installing ri documentation for multi_json-1.14.1
Parsing documentation for compass-core-1.0.3
Installing ri documentation for compass-core-1.0.3
Parsing documentation for compass-import-once-1.0.5
Installing ri documentation for compass-import-once-1.0.5
Parsing documentation for chunky_png-1.3.11
Installing ri documentation for chunky_png-1.3.11
Parsing documentation for rb-fsevent-0.10.3
Installing ri documentation for rb-fsevent-0.10.3
Parsing documentation for compass-1.0.3
Installing ri documentation for compass-1.0.3
7 gems installed
npm WARN deprecated bower@1.8.8: We don't recommend 
using Bower for new projects. Please consider Yarn and Webpack or Parcel. You 
can read how to migrate legacy project here: 
https://bower.io/blog/2017/how-to-migrate-away-from-bower/
/usr/bin/bower -> /usr/lib/node_modules/bower/bin/bower
/usr/bin/grunt -> /usr/lib/node_modules/grunt-cli/bin/grunt
/usr/lib
+-- bower@1.8.8 
`-- grunt-cli@1.3.2 
  +-- grunt-known-options@1.1.1 
  +-- interpret@1.1.0 
  +-- liftoff@2.5.0 
  | +-- extend@3.0.2 
  | +-- findup-sync@2.0.0 
  | | +-- detect-file@1.0.0 
  | | +-- is-glob@3.1.0 
  | | | `-- is-extglob@2.1.1 
  | | +-- micromatch@3.1.10 
  | | | +-- arr-diff@4.0.0 
  | | | +-- array-unique@0.3.2 
  | | | +-- braces@2.3.2 
  | | | | +-- arr-flatten@1.1.0 
  | | | | +-- extend-shallow@2.0.1 
  | | | | | `-- is-extendable@0.1.1 
  | | | | +-- fill-range@4.0.0 
  | | | | | +-- extend-shallow@2.0.1 
  | | | | | +-- is-number@3.0.0 
  | | | | | | `-- kind-of@3.2.2 
  | | | | | |   `-- is-buffer@1.1.6 
  | | | | | +-- repeat-string@1.6.1 
  | | | | | `-- to-regex-range@2.1.1 
  | | | | +-- repeat-element@1.1.3 
  | | | | +-- snapdragon-node@2.1.1 
  | | | | | +-- define-property@1.0.0 
  | | | | | | `-- is-descriptor@1.0.2 
  | | | | | |   +-- is-accessor-descriptor@1.0.0 
  | | | | | |   `-- is-data-descriptor@1.0.0 
  | | | | | `-- snapdragon-util@3.0.1 
  | | | | |   `-- kind-of@3.2.2 
  | | | | `-- split-string@3.1.0 
  | | | +-- define-property@2.0.2 
  | | | | `-- is-descriptor@1.0.2 
  | | | |   +-- is-accessor-descriptor@1.0.0 
  | | | |   `-- is-data-descriptor@1.0.0 
  | | | +-- extend-shallow@3.0.2 
  | | | | +-- assign-symbols@1.0.0 
  | | | | `-- is-extendable@1.0.1 
  | | | +-- extglob@2.0.4 
  | | | | +-- define-property@1.0.0 
  | | | | | `-- is-descriptor@1.0.2 
  | | | | |   +-- is-accessor-descriptor@1.0.0 
  | | | | |   `-- is-data-descriptor@1.0.0 
  | | | | +-- expand-brackets@2.1.4 
  | | | | | +-- define-property@0.2.5 
  | | | | | +-- extend-shallow@2.0.1 
  | | | | | `-- posix-character-classes@0.1.1 
  | | | | `-- extend-shallow@2.0.1 
  | | | +-- fragment-cache@0.2.1 
  | | | +-- kind-of@6.0.2 
  | | | +-- nanomatch@1.2.13 
  | | | | `-- is-windows@1.0.2 
  | | | +-- regex-not@1.0.2 
  | | | | `-- safe-regex@1.1.0 
  | | | |   `-- ret@0.1.15 
  | | | +-- snapdragon@0.8.2 
  | | | | +-- base@0.11.2 
  | | | | | +-- cache-base@1.0.1 
  | | | | | | +-- collection-visit@1.0.0 
  | | | | | | | +-- map-visit@1.0.0 
  | | | | | | | `-- object-visit@1.0.1 
  | | | | | | +-- get-value@2.0.6 
  | | | | | | +-- has-value@1.0.0 
  | | | | | | | `-- has-values@1.0.0 
  | | | | | | |   `-- kind-of@4.0.0 
  | | | | | | +-- set-value@2.0.1 
  | | | | | | | `-- extend-shallow@2.0.1 
  | | | | | | +-- to-object-path@0.3.0 
  | | | | | | | `-- kind-of@3.2.2 
  | | | | | | +-- union-value@1.0.1 
  | | | | | | `-- unset-value@1.0.0 
  | | | | | |   `-- has-value@0.3.1 
  | | | | | | +-- has-values@0.1.4 
  | | | | | | `-- isobject@2.1.0 
  | | | | | |   `-- isarray@1.0.0 
  | | | | | +-- class-utils@0.3.6 
  | | | | | | +-- arr-union@3.1.0 
  | | | | | | +-- define-property@0.2.5 
  | | | | | | `-- static-extend@0.1.2 
  | | | | | |   +-- define-property@0.2.5 
  | | | | | |   `-- object-copy@0.1.0 
  | | | | | | +-- copy-descriptor@0.1.1 
  | | | | | | +-- define-property@0.2.5 
  | | | | | | `-- kind-of@3.2.2 
  | | | | | +-- component-emitter@1.3.0 
  | | | | | +-- define-property@1.0.0 
  | | | | | | `-- is-descriptor@1.0.2 
  | | | | | |   +-- is-accessor-descriptor@1.0.0 
  | | | | | |   `-- is-data-descriptor@1.0.0 
  | | | | | +-- mixin-deep@1.3.2 
  | | | | | | `-- is-extendable@1.0.1 
  | | | | | `-- pascalcase@0.1.1 
  | | | | +-- debug@2.6.9 
  | | | | | `-- ms@2.0.0 
  | | | | +-- define-property@0.2.5 
  | | | | | `-- is-descriptor@0.1.6 
  | | | | |   +-- is-accessor-descriptor@0.1.6 
  | | | | |   | `-- kind-of@3.2.2 
  | | | | |   +-- is-data-descriptor@0.1.4 
  | | | | |   | `-- kind-of@3.2.2 
  | | | | |   `-- kind-of@5.1.0 
  | | | | +-- extend-shallow@2.0.1 
  | | | | +-- source-map@0.5.7 
  | 

[GitHub] [trafficcontrol] rawlinp commented on a change in pull request #4011: Implement GET /api/1.1/roles handler

2019-10-22 Thread GitBox
rawlinp commented on a change in pull request #4011: Implement GET 
/api/1.1/roles handler
URL: https://github.com/apache/trafficcontrol/pull/4011#discussion_r337721593
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/role/roles.go
 ##
 @@ -159,16 +159,32 @@ func (role *TORole) deleteRoleCapabilityAssociations(tx 
*sqlx.Tx) (error, error,
 }
 
 func (role *TORole) Read() ([]interface{}, error, error, int) {
+   version := role.APIInfo().Version
+   if version == nil {
+   return nil, nil, errors.New("TORole.Read called with nil API 
version"), http.StatusInternalServerError
+   }
+   if version.Major != 1 || version.Minor < 1 {
+   return nil, nil, fmt.Errorf("TORole.Read called with invalid 
API version: %d.%d", version.Major, version.Minor), 
http.StatusInternalServerError
+   }
 
 Review comment:
   Yeah, I was on the fence about whether or not to include this check. This 
condition would only be true if there was a bug introduced into the routing 
middleware, so really it's just an extra safety check in case that ever 
happens. I can remove it.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] rawlinp commented on issue #4011: Implement GET /api/1.1/roles handler

2019-10-22 Thread GitBox
rawlinp commented on issue #4011: Implement GET /api/1.1/roles handler
URL: https://github.com/apache/trafficcontrol/pull/4011#issuecomment-545185758
 
 
   Fixed. Those are interesting unit test failures. I assumed anonymously 
embedding a new `RoleV11` struct into `Role` would be non-breaking, but I guess 
that actually breaks any previous usage of struct literals for `Role`. That's 
unfortunate :(.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mhoppa opened a new pull request #4014: Rewrite federation user GET/POST/DELETE

2019-10-22 Thread GitBox
mhoppa opened a new pull request #4014: Rewrite federation user GET/POST/DELETE
URL: https://github.com/apache/trafficcontrol/pull/4014
 
 
   
   ## What does this PR (Pull Request) do?
   
   
   - [x] This PR fixes #3791 AND #3792
   
   
   ## Which Traffic Control components are affected by this PR?
   
   
   - Documentation
   - Traffic Control GO Client 
   - Traffic Ops
   
   ## What is the best way to verify this PR?
   
   Pull down build traffic ops and run API tests. 
   
   ## If this is a bug fix, what versions of Traffic Control are affected?
   
   
   
   ## The following criteria are ALL met by this PR
   
   
   - [x] This PR includes tests
   - [x] This PR includes documentation
   - [x] This PR includes an update to CHANGELOG.md
   - [x] This PR includes any and all required license headers
   - [x] This PR ensures that database migration sequence is correct OR this PR 
does not include a database migration
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY** (see [the 
Apache Software Foundation's security 
guidelines](https://www.apache.org/security/) for details)
   
   
   ## Additional Information
   
   
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] rob05c commented on issue #4011: Implement GET /api/1.1/roles handler

2019-10-22 Thread GitBox
rob05c commented on issue #4011: Implement GET /api/1.1/roles handler
URL: https://github.com/apache/trafficcontrol/pull/4011#issuecomment-545187363
 
 
   >Fixed. Those are interesting unit test failures. I assumed anonymously 
embedding a new RoleV11 struct into Role would be non-breaking, but I guess 
that actually breaks any previous usage of struct literals for Role. That's 
unfortunate :(.
   
   Yeah, it's an unfortunate quirk that Go doesn't allow direct access in 
embedded literals.
   
   I try to encourage
   ```
   foo := Foo{}
   foo.Bar = 42
   ```
   
   Instead of  `foo := Foo{Bar: 42}` For that reason.
   
   In fact, we could prevent the latter by making our versions have the latest 
always be empty. For example, if the latest version is 1.5, we currently
   ```
   type DeliveryService {
 DeliveryServiceV14
 New15Field int
   }
   ```
   
   I've wondered if instead we should:
   
   ```
   type DeliveryService struct {
 DeliveryServiceV15
   }
   
   type DeliveryServiceV15 {
 DeliveryServiceV14
 New15Field int
   }
   ```
   
   That would force people to either use the assignment syntax above, which 
keeps working with future versions, or else use the incredibly-awkward 
deeply-nested literals (which hopefully nobody would do).


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: trafficcontrol-PR #4616

2019-10-22 Thread Apache Jenkins Server
See 


Changes:

[Michael_Hoppal] Rewrite federation user GET/POST/DELETE


--
GitHub pull request #4014 of commit ab32a65c08ea86a2a1dcf1d67a546626bd6ede95, 
no merge conflicts.
Running as SYSTEM
Setting status of ab32a65c08ea86a2a1dcf1d67a546626bd6ede95 to PENDING with url 
https://builds.apache.org/job/trafficcontrol-PR/4616/ and message: 'Build 
started for merge commit.'
Using context: default
[EnvInject] - Loading node environment variables.
Building remotely on H41 (ubuntu xenial) in workspace 

[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
using credential b205a645-1ea7-4dfd-973d-c14ac43cab07
Cloning the remote Git repository
Cloning repository git://github.com/apache/trafficcontrol.git
 > git init  # timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url git://github.com/apache/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/trafficcontrol.git # 
 > timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/pull/*:refs/remotes/origin/pr/*
 > git rev-parse ab32a65c08ea86a2a1dcf1d67a546626bd6ede95^{commit} # timeout=10
Checking out Revision ab32a65c08ea86a2a1dcf1d67a546626bd6ede95 (detached)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f ab32a65c08ea86a2a1dcf1d67a546626bd6ede95
Commit message: "Rewrite federation user GET/POST/DELETE"
 > git rev-list --no-walk 9d6ed0aebd085cc1866138616367fd73ce78f95e # timeout=10
[trafficcontrol-PR] $ /bin/bash /tmp/jenkins4388317391805039388.sh
++ echo jenkins-trafficcontrol-PR-4616
++ sed s/-//g
++ sed s/jenkins//
+ proj=trafficcontrolPR4616
+ yml=infrastructure/docker/build/docker-compose.yml
++ mktemp /tmp/docker-compose-
+ dc=/tmp/docker-compose-PYpb
++ mktemp /tmp/tc-status-
+ st=/tmp/tc-status-8uyY
+ trap finish EXIT
++ uname -s
++ uname -m
+ curl -o /tmp/docker-compose-PYpb -L 
https://github.com/docker/compose/releases/download/1.13.0/docker-compose-Linux-x86_64
  % 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 
  6170   6170 0   1072  0 --:--:-- --:--:-- --:--:--  1071
  0 8079k0 507300 0  42782  0  0:03:13  0:00:01  0:03:12 
42782100 8079k  100 8079k0 0  4788k  0  0:00:01  0:00:01 --:--:-- 
15.6M
+ chmod +x /tmp/docker-compose-PYpb
+ rm -rf dist
+ /tmp/docker-compose-PYpb -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4616 up
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ exit 1
+ finish
+ /tmp/docker-compose-PYpb -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4616 down -v
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ /tmp/docker-compose-PYpb -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4616 rm -v -f
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ rm -f /tmp/docker-compose-PYpb
Build step 'Execute shell' marked build as failure
Skipped archiving because build is not successful


Jenkins build is back to normal : trafficcontrol-PR #4614

2019-10-22 Thread Apache Jenkins Server
See 



Build failed in Jenkins: trafficcontrol-PR #4615

2019-10-22 Thread Apache Jenkins Server
See 


Changes:

[rawlin_peters] Add TO-Go /api/1.1/servers/status GET handler


--
GitHub pull request #4013 of commit 9d6ed0aebd085cc1866138616367fd73ce78f95e, 
no merge conflicts.
Running as SYSTEM
Setting status of 9d6ed0aebd085cc1866138616367fd73ce78f95e to PENDING with url 
https://builds.apache.org/job/trafficcontrol-PR/4615/ and message: 'Build 
started for merge commit.'
Using context: default
[EnvInject] - Loading node environment variables.
Building remotely on H38 (ubuntu xenial) in workspace 

[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
using credential b205a645-1ea7-4dfd-973d-c14ac43cab07
Cloning the remote Git repository
Cloning repository git://github.com/apache/trafficcontrol.git
 > git init  # timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url git://github.com/apache/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/trafficcontrol.git # 
 > timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/pull/*:refs/remotes/origin/pr/*
 > git rev-parse 9d6ed0aebd085cc1866138616367fd73ce78f95e^{commit} # timeout=10
Checking out Revision 9d6ed0aebd085cc1866138616367fd73ce78f95e (detached)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 9d6ed0aebd085cc1866138616367fd73ce78f95e
Commit message: "Add TO-Go /api/1.1/servers/status GET handler"
 > git rev-list --no-walk 5a5bfa5668e1c2fcbd65e719cf863e51c8907d53 # timeout=10
[trafficcontrol-PR] $ /bin/bash /tmp/jenkins6235482559968335584.sh
++ echo jenkins-trafficcontrol-PR-4615
++ sed s/-//g
++ sed s/jenkins//
+ proj=trafficcontrolPR4615
+ yml=infrastructure/docker/build/docker-compose.yml
++ mktemp /tmp/docker-compose-
+ dc=/tmp/docker-compose-cmEf
++ mktemp /tmp/tc-status-
+ st=/tmp/tc-status-ZUyV
+ trap finish EXIT
++ uname -s
++ uname -m
+ curl -o /tmp/docker-compose-cmEf -L 
https://github.com/docker/compose/releases/download/1.13.0/docker-compose-Linux-x86_64
  % 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 
  6170   6170 0   1018  0 --:--:-- --:--:-- --:--:--  1018
 22 8079k   22 1817k0 0  1126k  0  0:00:07  0:00:01  0:00:06 
1126k100 8079k  100 8079k0 0  4012k  0  0:00:02  0:00:02 --:--:-- 
15.2M
+ chmod +x /tmp/docker-compose-cmEf
+ rm -rf dist
+ /tmp/docker-compose-cmEf -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4615 up
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ exit 1
+ finish
+ /tmp/docker-compose-cmEf -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4615 down -v
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ /tmp/docker-compose-cmEf -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4615 rm -v -f
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ rm -f /tmp/docker-compose-cmEf
Build step 'Execute shell' marked build as failure
Skipped archiving because build is not successful


[GitHub] [trafficcontrol] asf-ci commented on issue #4013: Add TO-Go /api/1.1/servers/status GET handler

2019-10-22 Thread GitBox
asf-ci commented on issue #4013: Add TO-Go /api/1.1/servers/status GET handler
URL: https://github.com/apache/trafficcontrol/pull/4013#issuecomment-545202466
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4615/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] asf-ci commented on issue #4014: Rewrite federation user GET/POST/DELETE

2019-10-22 Thread GitBox
asf-ci commented on issue #4014: Rewrite federation user GET/POST/DELETE
URL: https://github.com/apache/trafficcontrol/pull/4014#issuecomment-545202597
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4616/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] rob05c commented on issue #916: [TC-197] File descriptor leak caused by NIO protocol connector

2019-10-22 Thread GitBox
rob05c commented on issue #916: [TC-197] File descriptor leak caused by NIO 
protocol connector
URL: https://github.com/apache/trafficcontrol/issues/916#issuecomment-545201667
 
 
   TC default Tomcat version is now 8.5, this bug was observed in an older 
Tomcat version, we haven't seen it in 8.5. Feel free to reopen with details if 
anyone sees this bug again


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] rob05c closed issue #916: [TC-197] File descriptor leak caused by NIO protocol connector

2019-10-22 Thread GitBox
rob05c closed issue #916: [TC-197] File descriptor leak caused by NIO protocol 
connector
URL: https://github.com/apache/trafficcontrol/issues/916
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] ocket8888 opened a new pull request #4015: Rewrite /federations to Go - POST/PUT/DELETE

2019-10-22 Thread GitBox
ocket opened a new pull request #4015: Rewrite /federations to Go - 
POST/PUT/DELETE
URL: https://github.com/apache/trafficcontrol/pull/4015
 
 
   ## What does this PR (Pull Request) do?
   - [x] This PR fixes #3790 
   
   Rewrites `/federations` to Go. This also adds API version 1.4 specific logic 
that
   - Adds the messages normally returned as the "response" object as alerts 
(doesn't replace `response`, much as I'd like to)
   - Allows POST request bodies that don't use the redundant top-level 
"federations" key (still backward-compatible; just gives clients the choice)
   
   ## Which Traffic Control components are affected by this PR?
   - Documentation
   - Traffic Control Client 
   - Traffic Ops
   - Traffic Portal (?)
   
   ## What is the best way to verify this PR?
   Run the unit and/or API tests I'm sure I'll write
   
   ## The following criteria are ALL met by this PR
   - [ ] This PR includes tests OR I have explained why tests are unnecessary
   - [ ] This PR includes documentation OR I have explained why documentation 
is unnecessary
   - [x] An update to CHANGELOG.md is not necessary
   - [ ] This PR includes any and all required license headers
   - [x] This PR does not include a database migration
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY**


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: trafficcontrol-PR #4617

2019-10-22 Thread Apache Jenkins Server
See 

Changes:


--
GitHub pull request #4015 of commit 44f96cd43035468429f408ecda9ecda9b4a1, 
no merge conflicts.
Running as SYSTEM
Setting status of 44f96cd43035468429f408ecda9ecda9b4a1 to PENDING with url 
https://builds.apache.org/job/trafficcontrol-PR/4617/ and message: 'Build 
started for merge commit.'
Using context: default
[EnvInject] - Loading node environment variables.
Building remotely on H36 (ubuntu) in workspace 

[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
using credential b205a645-1ea7-4dfd-973d-c14ac43cab07
Cloning the remote Git repository
Cloning repository git://github.com/apache/trafficcontrol.git
 > git init  # timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress -- git://github.com/apache/trafficcontrol.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url git://github.com/apache/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/trafficcontrol.git # 
 > timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
using GIT_SSH to set credentials 
 > git fetch --tags --progress -- git://github.com/apache/trafficcontrol.git 
 > +refs/pull/*:refs/remotes/origin/pr/*
 > git rev-parse 44f96cd43035468429f408ecda9ecda9b4a1^{commit} # timeout=10
 > git rev-parse origin/44f96cd43035468429f408ecda9ecda9b4a1^{commit} # 
 > timeout=10
 > git rev-parse 44f96cd43035468429f408ecda9ecda9b4a1^{commit} # timeout=10
ERROR: Couldn't find any revision to build. Verify the repository and branch 
configuration for this job.
Retrying after 10 seconds
using credential b205a645-1ea7-4dfd-973d-c14ac43cab07
 > 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/trafficcontrol.git # 
 > timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress -- git://github.com/apache/trafficcontrol.git 
 > +refs/pull/*:refs/remotes/origin/pr/*
 > git rev-parse 44f96cd43035468429f408ecda9ecda9b4a1^{commit} # timeout=10
 > git rev-parse origin/44f96cd43035468429f408ecda9ecda9b4a1^{commit} # 
 > timeout=10
 > git rev-parse 44f96cd43035468429f408ecda9ecda9b4a1^{commit} # timeout=10
ERROR: Couldn't find any revision to build. Verify the repository and branch 
configuration for this job.
Retrying after 10 seconds
using credential b205a645-1ea7-4dfd-973d-c14ac43cab07
 > 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/trafficcontrol.git # 
 > timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress -- git://github.com/apache/trafficcontrol.git 
 > +refs/pull/*:refs/remotes/origin/pr/*
 > git rev-parse 44f96cd43035468429f408ecda9ecda9b4a1^{commit} # timeout=10
 > git rev-parse origin/44f96cd43035468429f408ecda9ecda9b4a1^{commit} # 
 > timeout=10
 > git rev-parse 44f96cd43035468429f408ecda9ecda9b4a1^{commit} # timeout=10
ERROR: Couldn't find any revision to build. Verify the repository and branch 
configuration for this job.
Skipped archiving because build is not successful


[GitHub] [trafficcontrol] asf-ci commented on issue #4015: Rewrite /federations to Go - POST/PUT/DELETE

2019-10-22 Thread GitBox
asf-ci commented on issue #4015: Rewrite /federations to Go - POST/PUT/DELETE
URL: https://github.com/apache/trafficcontrol/pull/4015#issuecomment-545269481
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4617/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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 : trafficcontrol-PR #4618

2019-10-22 Thread Apache Jenkins Server
See 




[GitHub] [trafficcontrol] asf-ci commented on issue #4015: Rewrite /federations to Go - POST/PUT/DELETE

2019-10-22 Thread GitBox
asf-ci commented on issue #4015: Rewrite /federations to Go - POST/PUT/DELETE
URL: https://github.com/apache/trafficcontrol/pull/4015#issuecomment-545274994
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4618/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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