You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by "kdamichie (via GitHub)" <gi...@apache.org> on 2023/08/28 17:39:06 UTC
[GitHub] [trafficcontrol] kdamichie commented on a diff in pull request #7744: Use RFC 3339 for lastUpdated timestamp in /server_server_capabilities
kdamichie commented on code in PR #7744:
URL: https://github.com/apache/trafficcontrol/pull/7744#discussion_r1307607183
##########
CHANGELOG.md:
##########
@@ -102,6 +102,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- [#7441](https://github.com/apache/trafficcontrol/pull/7441) *Traffic Ops* Fixed the invalidation jobs endpoint to respect CDN locks.
- [#7413](https://github.com/apache/trafficcontrol/issues/7413) *Traffic Ops* Fixes service_category apis to respond with RFC3339 date/time Format
- [#7413](https://github.com/apache/trafficcontrol/issues/7706) *Traffic Ops* Fixes /statuses apis to respond with RFC3339 date/time format
+- [#7743](https://github.com/apache/trafficcontrol/issues/7706) *Traffic Ops* Fixes /server_server_capabilities apis to respond with RFC3339 date/time format
Review Comment:
url path needs updated with 7743 instead of 7706
##########
traffic_ops/traffic_ops_golang/server/servers_server_capability.go:
##########
Review Comment:
Verified `v5` `servers_server_capability_test.go` DOES test the new code.
##########
traffic_ops/v5-client/server_server_capabilities.go:
##########
@@ -52,8 +52,8 @@ func (to *Session) DeleteServerServerCapability(serverID int, serverCapability s
// GetServerServerCapabilities retrieves a list of Server Capabilities that are
// assigned to Servers.
-func (to *Session) GetServerServerCapabilities(opts RequestOptions) (tc.ServerServerCapabilitiesResponse, toclientlib.ReqInf, error) {
- var resp tc.ServerServerCapabilitiesResponse
+func (to *Session) GetServerServerCapabilities(opts RequestOptions) (tc.ServerServerCapabilitiesResponseV5, toclientlib.ReqInf, error) {
+ var resp tc.ServerServerCapabilitiesResponseV5
Review Comment:
Suggestion: `GetServerServerCapabilities` should probably be `GetServerServerCapabilitiesV5`
##########
traffic_ops/v5-client/server_server_capabilities.go:
##########
@@ -31,14 +31,14 @@ const apiServerServerCapabilities = "/server_server_capabilities"
// apiMultipleServersCapabilities is the API version-relative path to the /multiple_servers_capabilities API endpoint.
const apiMultipleServersCapabilities = "/multiple_servers_capabilities"
-// CreateServerServerCapability assigns a Server Capability to a Server.
-func (to *Session) CreateServerServerCapability(ssc tc.ServerServerCapability, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error) {
+// CreateServerServerCapabilityV5 assigns a Server Capability to a Server.
+func (to *Session) CreateServerServerCapability(ssc tc.ServerServerCapabilityV5, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error) {
Review Comment:
`CreateServerServerCapabilityV5` description doesn't match `CreateServerServerCapability` func name
##########
traffic_ops/v5-client/server_server_capabilities.go:
##########
@@ -31,14 +31,14 @@ const apiServerServerCapabilities = "/server_server_capabilities"
// apiMultipleServersCapabilities is the API version-relative path to the /multiple_servers_capabilities API endpoint.
const apiMultipleServersCapabilities = "/multiple_servers_capabilities"
-// CreateServerServerCapability assigns a Server Capability to a Server.
-func (to *Session) CreateServerServerCapability(ssc tc.ServerServerCapability, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error) {
+// CreateServerServerCapabilityV5 assigns a Server Capability to a Server.
+func (to *Session) CreateServerServerCapability(ssc tc.ServerServerCapabilityV5, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error) {
var alerts tc.Alerts
reqInf, err := to.post(apiServerServerCapabilities, opts, ssc, &alerts)
return alerts, reqInf, err
}
-// DeleteServerServerCapability unassigns a Server Capability from a Server.
+// DeleteServerServerCapabilityV5 unassigns a Server Capability from a Server.
func (to *Session) DeleteServerServerCapability(serverID int, serverCapability string, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error) {
Review Comment:
`DeleteServerServerCapabilityV5` description doesn't match `DeleteServerServerCapability` func name
--
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