You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2019/11/26 23:21:00 UTC

[GitHub] [trafficcontrol] rob05c commented on a change in pull request #4143: Deprecate /hwinfo

rob05c commented on a change in pull request #4143: Deprecate /hwinfo
URL: https://github.com/apache/trafficcontrol/pull/4143#discussion_r351028904
 
 

 ##########
 File path: traffic_ops/traffic_ops_golang/hwinfo/hwinfo.go
 ##########
 @@ -20,74 +20,116 @@ package hwinfo
  */
 
 import (
-	"errors"
+	"encoding/json"
+	"fmt"
 	"net/http"
+	"strconv"
 
 	"github.com/apache/trafficcontrol/lib/go-log"
 	"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/apache/trafficcontrol/traffic_ops/traffic_ops_golang/dbhelpers"
+
 	"github.com/jmoiron/sqlx"
 )
 
+const selectHWInfoQuery = `
+SELECT
+	s.host_name as serverhostname,
+	h.id,
+	h.serverid,
+	h.description,
+	h.val,
+	h.last_updated
+FROM hwInfo h
 
 Review comment:
   They are in queries, unless quoted. But better to use the real name anyway, safer and less confusing.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services