[GitHub] [trafficcontrol] asf-ci commented on issue #3931: Gives admins the ability to mark delivery service requests as complete

2019-10-07 Thread GitBox
asf-ci commented on issue #3931: Gives admins the ability to mark delivery 
service requests as complete
URL: https://github.com/apache/trafficcontrol/pull/3931#issuecomment-539291763
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4414/
   


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 #4414

2019-10-07 Thread Apache Jenkins Server
See 




[GitHub] [trafficcontrol] asf-ci commented on issue #3963: TP: by default only show parameter diff when comparing 2 profiles

2019-10-07 Thread GitBox
asf-ci commented on issue #3963: TP: by default only show parameter diff when 
comparing 2 profiles
URL: https://github.com/apache/trafficcontrol/pull/3963#issuecomment-539269875
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4413/
   


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 #4412

2019-10-07 Thread Apache Jenkins Server
See 


Changes:

[rob] Add atscfg remap.config tests


--
[...truncated 3.10 MB...]
traffic_portal_build_1   | + echo -e 
'{\n"Version":"3.0.0-10222.7a0ad0bf.el7",\n"Build' 'Date":"2019-10-08' 
'00:02"\n}'
traffic_portal_build_1   | + /usr/lib/rpm/check-buildroot
traffic_portal_build_1   | + /usr/lib/rpm/redhat/brp-compress
traffic_portal_build_1   | + /usr/lib/rpm/redhat/brp-strip 
/usr/bin/strip
traffic_router_build_1   | [INFO] Wrote: 
/tmp/trafficcontrol/traffic_router/build/target/rpm/traffic_router/RPMS/x86_64/traffic_router-3.0.0-10222.7a0ad0bf.el7.x86_64.rpm
traffic_router_build_1   | [INFO] Executing(%clean): /bin/sh -e 
/var/tmp/rpm-tmp.6VZw9h
traffic_router_build_1   | [INFO] + umask 022
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.452 s]
traffic_router_build_1   | [INFO] traffic_router_shared 
.. SUCCESS [ 32.371 s]
traffic_router_build_1   | [INFO] traffic_router_connector 
... SUCCESS [ 11.198 s]
traffic_router_build_1   | [INFO] traffic_router_config 
.. SUCCESS [  0.050 s]
traffic_router_build_1   | [INFO] traffic_router_geolocation 
. SUCCESS [  0.117 s]
traffic_router_build_1   | [INFO] ROOT 
... SUCCESS [ 28.308 s]
traffic_router_build_1   | [INFO] traffic_router_rpm 
. SUCCESS [ 16.876 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:31 min
traffic_router_build_1   | [INFO] Finished at: 2019-10-08T00:02:40Z
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-10222.7a0ad0bf.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: 10222.7a0ad0bf
traffic_router_build_1   | BUILD_LOCK: 10222.7a0ad0bf.el7
traffic_router_build_1   | RPM: 
tomcat-8.5.32-10222.7a0ad0bf.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 #3962: Add atscfg remap.config tests

2019-10-07 Thread GitBox
asf-ci commented on issue #3962: Add atscfg remap.config tests
URL: https://github.com/apache/trafficcontrol/pull/3962#issuecomment-539255352
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4412/
   


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 #3962: Add atscfg remap.config tests

2019-10-07 Thread GitBox
asf-ci commented on issue #3962: Add atscfg remap.config tests
URL: https://github.com/apache/trafficcontrol/pull/3962#issuecomment-539250816
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4411/
   


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 #4411

2019-10-07 Thread Apache Jenkins Server
See 

Changes:


--
GitHub pull request #3962 of commit c8ee43100c03fed94d2a0e408a12ae546d418321, 
no merge conflicts.
Running as SYSTEM
Setting status of c8ee43100c03fed94d2a0e408a12ae546d418321 to PENDING with url 
https://builds.apache.org/job/trafficcontrol-PR/4411/ 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 c8ee43100c03fed94d2a0e408a12ae546d418321^{commit} # timeout=10
 > git rev-parse origin/c8ee43100c03fed94d2a0e408a12ae546d418321^{commit} # 
 > timeout=10
 > git rev-parse c8ee43100c03fed94d2a0e408a12ae546d418321^{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 c8ee43100c03fed94d2a0e408a12ae546d418321^{commit} # timeout=10
 > git rev-parse origin/c8ee43100c03fed94d2a0e408a12ae546d418321^{commit} # 
 > timeout=10
 > git rev-parse c8ee43100c03fed94d2a0e408a12ae546d418321^{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 c8ee43100c03fed94d2a0e408a12ae546d418321^{commit} # timeout=10
 > git rev-parse origin/c8ee43100c03fed94d2a0e408a12ae546d418321^{commit} # 
 > timeout=10
 > git rev-parse c8ee43100c03fed94d2a0e408a12ae546d418321^{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] rawlinp commented on a change in pull request #3964: Add GET/POST/DELETE for server_server_capabilities

2019-10-07 Thread GitBox
rawlinp commented on a change in pull request #3964: Add GET/POST/DELETE for 
server_server_capabilities
URL: https://github.com/apache/trafficcontrol/pull/3964#discussion_r332279105
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/routing/routes.go
 ##
 @@ -266,6 +266,11 @@ func Routes(d ServerData) ([]Route, []RawRoute, 
http.Handler, error) {
{1.1, http.MethodPost, `servers/?$`, 
api.CreateHandler({}), auth.PrivLevelOperations, Authenticated, 
nil},
{1.1, http.MethodDelete, `servers/{id}$`, 
api.DeleteHandler({}), auth.PrivLevelOperations, Authenticated, 
nil},
 
+   //Server: CRUD
+   {1.1, http.MethodGet, `server_server_capabilities/?$`, 
api.ReadHandler({}), auth.PrivLevelReadOnly, 
Authenticated, nil},
 
 Review comment:
   just skimmed this draft PR, but these should be `1.4` since they're new 
endpoints


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 #3925: Added SMTP configuration and APIInfo Email method

2019-10-07 Thread GitBox
asf-ci commented on issue #3925: Added SMTP configuration and APIInfo Email 
method
URL: https://github.com/apache/trafficcontrol/pull/3925#issuecomment-539242644
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4410/
   


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 #3964: Add GET/POST/DELETE for server_server_capabilities

2019-10-07 Thread GitBox
asf-ci commented on issue #3964: Add GET/POST/DELETE for 
server_server_capabilities
URL: https://github.com/apache/trafficcontrol/pull/3964#issuecomment-539240304
 
 
   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


[GitHub] [trafficcontrol] mhoppa opened a new pull request #3964: Add GET/POST/DELETE for server_server_capabilities

2019-10-07 Thread GitBox
mhoppa opened a new pull request #3964: Add GET/POST/DELETE for 
server_server_capabilities
URL: https://github.com/apache/trafficcontrol/pull/3964
 
 
   
   ## What does this PR (Pull Request) do?
   
   
   - [x] This PR is not related to any Issue 
   Add server server_capabilities support to the API.
   
   Adds the ability to
   
   * GET
   * POST
   * DELETE
   
   server_capabilities associations with servers.
   
   Includes tests, API handlers, migrations
   
   
   ## Which Traffic Control components are affected by this PR?
   
   
   - Documentation
   - Traffic Control Golang Client 
   - Traffic Ops
   
   ## What is the best way to verify this PR?
   
   Apply migrations to db and seed server_capabilities in new table 
server_capability.
   
   Build new traffic ops API and then associate/get/disassociates those newly 
seeded server_capability to servers via the new api path 
/server_server_capabilities
   
   ## 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 does not include 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
   - [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] ocket8888 merged pull request #3931: Gives admins the ability to mark delivery service requests as complete

2019-10-07 Thread GitBox
ocket merged pull request #3931: Gives admins the ability to mark delivery 
service requests as complete
URL: https://github.com/apache/trafficcontrol/pull/3931
 
 
   


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 closed issue #3871: Allow admins to 'complete' any delivery service request

2019-10-07 Thread GitBox
ocket closed issue #3871: Allow admins to 'complete' any delivery service 
request
URL: https://github.com/apache/trafficcontrol/issues/3871
 
 
   


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-07 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-539225902
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4409/
   


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 #3963: TP: by default only show parameter diff when comparing 2 profiles

2019-10-07 Thread GitBox
mitchell852 opened a new pull request #3963: TP: by default only show parameter 
diff when comparing 2 profiles
URL: https://github.com/apache/trafficcontrol/pull/3963
 
 
   
   ## 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)
   
   
   


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 opened a new pull request #3962: Add atscfg remap.config tests

2019-10-07 Thread GitBox
rob05c opened a new pull request #3962: Add atscfg remap.config tests
URL: https://github.com/apache/trafficcontrol/pull/3962
 
 
   ## What does this PR (Pull Request) do?
   
   Adds atscfg remap.config tests. With this, `go test -cover` reports 100% for 
`lib/go-atscfg/remadotconfig.go`.
   
   Also removes some unused logic in remapdotconfig.go. Easily verifiable the 
function is unused, and the nil check is duplicated by the previous line.
   
   No documentation, no interface change.
   No changelog, no interface change.
   Is tests.
   
   - [x] This PR is not related to any other Issue
   
   ## Which Traffic Control components are affected by this PR?
   
   - Traffic Ops ORT
   
   ## What is the best way to verify this PR?
   
   Manually verify unused code in remapdotconfig.go is unused. Run unit tests 
on `lib/go-atscfg`.
   
   ## If this is a bug fix, what versions of Traffic Control are affected?
   
   Not a bug fix.
   
   ## 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)
   
   


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 #3758: Rewrote deliveryservice_stats to Go

2019-10-07 Thread GitBox
asf-ci commented on issue #3758: Rewrote deliveryservice_stats to Go
URL: https://github.com/apache/trafficcontrol/pull/3758#issuecomment-539193313
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4408/
   


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 #3961: added ability to select TLS version in TR

2019-10-07 Thread GitBox
asf-ci commented on issue #3961: added ability to select TLS version in TR
URL: https://github.com/apache/trafficcontrol/pull/3961#issuecomment-539170083
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4407/
   


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 #3925: Added SMTP configuration and APIInfo Email method

2019-10-07 Thread GitBox
ocket commented on a change in pull request #3925: Added SMTP configuration 
and APIInfo Email method
URL: https://github.com/apache/trafficcontrol/pull/3925#discussion_r332192285
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/api/api.go
 ##
 @@ -369,6 +371,33 @@ func (inf *APIInfo) Close() {
}
 }
 
+// SendMail is a convenience method used to call SendMail using an APIInfo 
structure's configuration.
+func (inf *APIInfo) SendMail(to rfc.EmailAddress, msg []byte) (int, error, 
error) {
+   return SendMail(to, msg, inf.Config)
+}
+
+// SendMail sends an email msg to the address identified by to. The msg 
parameter should be an
+// RFC822-style email with headers first, a blank line, and then the message 
body. The lines of msg
+// should be CRLF terminated. The msg headers should usually include fields 
such as "From", "To",
+// "Subject", and "Cc". Sending "Bcc" messages is accomplished by including an 
email address in the
+// to parameter but not including it in the msg headers.
+// The cfg parameter is used to set things like the "From" field, as well as 
for connection
+// and authentication with an external SMTP server.
+// SendMail returns (in order) an HTTP status code, a user-friendly error, and 
an error fit for
+// logging to system error logs. If either the user or system error is 
non-nil, the operation failed,
+// and the HTTP status code indicates the type of failure.
+func SendMail(to rfc.EmailAddress, msg []byte, cfg *config.Config) (int, 
error, error) {
+   if !cfg.SMTP.Enabled {
+   return http.StatusServiceUnavailable, errors.New("SMTP is not 
enabled!"), nil
+   }
+   auth := smtp.PlainAuth("", cfg.SMTP.User, cfg.SMTP.Password, 
strings.Split(cfg.SMTP.Address, ":")[0])
 
 Review comment:
   So I fixed this by making ConfigTO and its children required parts of the 
config, which ought to be fine because Perl always required it anyway. 


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 #3925: Added SMTP configuration and APIInfo Email method

2019-10-07 Thread GitBox
asf-ci commented on issue #3925: Added SMTP configuration and APIInfo Email 
method
URL: https://github.com/apache/trafficcontrol/pull/3925#issuecomment-539147176
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4406/
   


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 #3925: Added SMTP configuration and APIInfo Email method

2019-10-07 Thread GitBox
ocket commented on a change in pull request #3925: Added SMTP configuration 
and APIInfo Email method
URL: https://github.com/apache/trafficcontrol/pull/3925#discussion_r332132954
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/api/api.go
 ##
 @@ -369,6 +371,33 @@ func (inf *APIInfo) Close() {
}
 }
 
+// SendMail is a convenience method used to call SendMail using an APIInfo 
structure's configuration.
+func (inf *APIInfo) SendMail(to rfc.EmailAddress, msg []byte) (int, error, 
error) {
+   return SendMail(to, msg, inf.Config)
+}
+
+// SendMail sends an email msg to the address identified by to. The msg 
parameter should be an
+// RFC822-style email with headers first, a blank line, and then the message 
body. The lines of msg
+// should be CRLF terminated. The msg headers should usually include fields 
such as "From", "To",
+// "Subject", and "Cc". Sending "Bcc" messages is accomplished by including an 
email address in the
+// to parameter but not including it in the msg headers.
+// The cfg parameter is used to set things like the "From" field, as well as 
for connection
+// and authentication with an external SMTP server.
+// SendMail returns (in order) an HTTP status code, a user-friendly error, and 
an error fit for
+// logging to system error logs. If either the user or system error is 
non-nil, the operation failed,
+// and the HTTP status code indicates the type of failure.
+func SendMail(to rfc.EmailAddress, msg []byte, cfg *config.Config) (int, 
error, error) {
+   if !cfg.SMTP.Enabled {
+   return http.StatusServiceUnavailable, errors.New("SMTP is not 
enabled!"), nil
+   }
+   auth := smtp.PlainAuth("", cfg.SMTP.User, cfg.SMTP.Password, 
strings.Split(cfg.SMTP.Address, ":")[0])
 
 Review comment:
   I think it's probably most clearly illustrated on [Line #175 in 
`traffic_ops/traffic_ops_golang/config/config.go`](https://github.com/apache/trafficcontrol/blob/master/traffic_ops/traffic_ops_golang/config/config.go#L175).
 If the config fails to load startup is blocked. ConfigTO and its sub-fields 
are mandatory, so their absence would cause a failure to load.


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 #3925: Added SMTP configuration and APIInfo Email method

2019-10-07 Thread GitBox
mhoppa commented on a change in pull request #3925: Added SMTP configuration 
and APIInfo Email method
URL: https://github.com/apache/trafficcontrol/pull/3925#discussion_r332115534
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/api/api.go
 ##
 @@ -369,6 +371,33 @@ func (inf *APIInfo) Close() {
}
 }
 
+// SendMail is a convenience method used to call SendMail using an APIInfo 
structure's configuration.
+func (inf *APIInfo) SendMail(to rfc.EmailAddress, msg []byte) (int, error, 
error) {
+   return SendMail(to, msg, inf.Config)
+}
+
+// SendMail sends an email msg to the address identified by to. The msg 
parameter should be an
+// RFC822-style email with headers first, a blank line, and then the message 
body. The lines of msg
+// should be CRLF terminated. The msg headers should usually include fields 
such as "From", "To",
+// "Subject", and "Cc". Sending "Bcc" messages is accomplished by including an 
email address in the
+// to parameter but not including it in the msg headers.
+// The cfg parameter is used to set things like the "From" field, as well as 
for connection
+// and authentication with an external SMTP server.
+// SendMail returns (in order) an HTTP status code, a user-friendly error, and 
an error fit for
+// logging to system error logs. If either the user or system error is 
non-nil, the operation failed,
+// and the HTTP status code indicates the type of failure.
+func SendMail(to rfc.EmailAddress, msg []byte, cfg *config.Config) (int, 
error, error) {
+   if !cfg.SMTP.Enabled {
+   return http.StatusServiceUnavailable, errors.New("SMTP is not 
enabled!"), nil
+   }
+   auth := smtp.PlainAuth("", cfg.SMTP.User, cfg.SMTP.Password, 
strings.Split(cfg.SMTP.Address, ":")[0])
 
 Review comment:
   can you point me to where it is marked as required and forces Traffic Ops 
not to start?


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 #3961: added ability to select TLS version in TR

2019-10-07 Thread GitBox
asf-ci commented on issue #3961: added ability to select TLS version in TR
URL: https://github.com/apache/trafficcontrol/pull/3961#issuecomment-539092580
 
 
   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


[GitHub] [trafficcontrol] ocket8888 commented on a change in pull request #3925: Added SMTP configuration and APIInfo Email method

2019-10-07 Thread GitBox
ocket commented on a change in pull request #3925: Added SMTP configuration 
and APIInfo Email method
URL: https://github.com/apache/trafficcontrol/pull/3925#discussion_r332109184
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/api/api.go
 ##
 @@ -369,6 +371,33 @@ func (inf *APIInfo) Close() {
}
 }
 
+// SendMail is a convenience method used to call SendMail using an APIInfo 
structure's configuration.
+func (inf *APIInfo) SendMail(to rfc.EmailAddress, msg []byte) (int, error, 
error) {
+   return SendMail(to, msg, inf.Config)
+}
+
+// SendMail sends an email msg to the address identified by to. The msg 
parameter should be an
+// RFC822-style email with headers first, a blank line, and then the message 
body. The lines of msg
+// should be CRLF terminated. The msg headers should usually include fields 
such as "From", "To",
+// "Subject", and "Cc". Sending "Bcc" messages is accomplished by including an 
email address in the
+// to parameter but not including it in the msg headers.
+// The cfg parameter is used to set things like the "From" field, as well as 
for connection
+// and authentication with an external SMTP server.
+// SendMail returns (in order) an HTTP status code, a user-friendly error, and 
an error fit for
+// logging to system error logs. If either the user or system error is 
non-nil, the operation failed,
+// and the HTTP status code indicates the type of failure.
+func SendMail(to rfc.EmailAddress, msg []byte, cfg *config.Config) (int, 
error, error) {
+   if !cfg.SMTP.Enabled {
+   return http.StatusServiceUnavailable, errors.New("SMTP is not 
enabled!"), nil
+   }
+   auth := smtp.PlainAuth("", cfg.SMTP.User, cfg.SMTP.Password, 
strings.Split(cfg.SMTP.Address, ":")[0])
 
 Review comment:
   No, that field is mandatory in the configuration. If it doesn't exist, 
Traffic Ops won't start.


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