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

mitchell852 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new 32d4d36  updated the changelog format for TC issue: #2099
32d4d36 is described below

commit 32d4d3695e9fca8aeee2c3c9b971b99c63c2a83b
Author: Dewayne Richardson <dewr...@apache.org>
AuthorDate: Wed Apr 11 10:41:33 2018 -0600

    updated the changelog format for TC issue: #2099
---
 traffic_ops/traffic_ops_golang/server/servers.go | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/traffic_ops/traffic_ops_golang/server/servers.go 
b/traffic_ops/traffic_ops_golang/server/servers.go
index bd25b20..484994b 100644
--- a/traffic_ops/traffic_ops_golang/server/servers.go
+++ b/traffic_ops/traffic_ops_golang/server/servers.go
@@ -144,11 +144,21 @@ func (server *TOServer) Validate(db *sqlx.DB) []error {
        }
        log.Infof("got cdn id: %d from profile and cdn id: %d from server", 
cdnID, *server.CDNID)
        if cdnID != *server.CDNID {
-               errs = append(errs, errors.New("CDN of profile does not match 
Server CDN"))
+               errs = append(errs, errors.New(fmt.Sprintf("CDN id '%d' for 
profile '%d' does not match Server CDN '%d'", cdnID, *server.ProfileID, 
*server.CDNID)))
        }
        return errs
 }
 
+// ChangeLogMessage implements the api.ChangeLogger interface for a custom log 
message
+func (server TOServer) ChangeLogMessage(action string) (string, error) {
+       status := *server.Status
+       hostName := *server.HostName
+
+       message := action + ` ` + status + `server: { "hostName":"` + hostName 
+ `", id:` + strconv.Itoa(*server.ID) + ` }`
+
+       return message, nil
+}
+
 func (server *TOServer) Read(db *sqlx.DB, params map[string]string, user 
auth.CurrentUser) ([]interface{}, []error, tc.ApiErrorType) {
        returnable := []interface{}{}
 

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

Reply via email to