rawlinp commented on a change in pull request #3980: Add atscfg logic for 
Server Capabilities
URL: https://github.com/apache/trafficcontrol/pull/3980#discussion_r342250406
 
 

 ##########
 File path: traffic_ops/ort/atstccfg/toreq.go
 ##########
 @@ -406,3 +407,74 @@ func GetJobs(cfg TCCfg) ([]tc.Job, error) {
        }
        return jobs, nil
 }
+func GetServerCapabilitiesByID(cfg TCCfg, serverIDs []int) 
(map[int]map[atscfg.ServerCapability]struct{}, error) {
+       serverIDsStr := ""
+       if len(serverIDs) > 0 {
+               sortIDsInHash := true
+               serverIDsStr = 
base64.RawURLEncoding.EncodeToString((util.HashInts(serverIDs, sortIDsInHash)))
+       }
+
+       serverCaps := map[int]map[atscfg.ServerCapability]struct{}{}
+       err := GetCachedJSON(cfg, 
"server_capabilities_s_"+serverIDsStr+".json", &serverCaps, func(obj 
interface{}) error {
+               // TOO add list of IDs to API+Client
 
 Review comment:
   `TOO` -> `TODO`

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

Reply via email to