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 2022/10/11 19:23:55 UTC

[GitHub] [trafficcontrol] ocket8888 commented on a diff in pull request #7068: Renamed rascal to tm/traffic_monitor

ocket8888 commented on code in PR #7068:
URL: https://github.com/apache/trafficcontrol/pull/7068#discussion_r992700325


##########
traffic_ops/traffic_ops_golang/server/servers.go:
##########
@@ -856,6 +856,12 @@ func getServers(h http.Header, params map[string]string, tx *sqlx.Tx, user *auth
 `
 	}
 
+	if version.Major >= 5 {
+		if params["type"] == "RASCAL" {
+			params["type"] = "TRAFFIC_MONITOR"
+		}
+	}
+

Review Comment:
   That's a hard question, but the other thing is that t3c doesn't use APIv5, it uses v4 and v3. So old versions of t3c wouldn't be kept compatible with this. In a version of t3c that _does_ use APIv5, we could make it just query for `TRAFFIC_MONITOR` instead, but that doesn't help backwards compatibility.
   
   Maybe the best thing to do would be to make it return *both* `TRAFFIC_MONITOR` *and* `RASCAL`? That makes things a bit more annoying for operators and clients, potentially, but it makes it so there's no type you can't filter for, at least as long as you use your types responsibly.



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

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org