From b820264858b6b43d22ecced75bbb1e109fc5b824 Mon Sep 17 00:00:00 2001 From: Jagan Parthiban <33490370+jagan-parthiban@users.noreply.github.com> Date: Mon, 26 Jun 2023 20:08:12 +0530 Subject: [PATCH] Fix Server Capability V5 Type Minor version (#7598) * Fix Type Minor version * Fix Type Minor version + CHANGELOG.md --- CHANGELOG.md | 1 + lib/go-tc/server_capabilities.go | 18 +++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a207fe4dd2..2c03baf4d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,6 +57,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - [#7469](https://github.com/apache/trafficcontrol/pull/7469) *Traffic Ops* Changed logic to not report empty or missing cookies into TO error.log. ### Fixed +- [#7598](https://github.com/apache/trafficcontrol/pull/7598) *Traffic Ops* Fixes Server Capability V5 Type Name Minor version - [#7570](https://github.com/apache/trafficcontrol/pull/7570) *Traffic Ops* Fixes `deliveryservice_request_comments` v5 apis to respond with `RFC3339` date/time Format. - [#7312](https://github.com/apache/trafficcontrol/issues/7312) *Docs* Changing docs for CDN locks for DELETE response structure v4 and v5. - [#7572](https://github.com/apache/trafficcontrol/pull/7572) *Traffic Ops* Fixes Delivery Service Requests V5 apis docs with RFC3339 date/time Format diff --git a/lib/go-tc/server_capabilities.go b/lib/go-tc/server_capabilities.go index 943118e2a7..6422b19fde 100644 --- a/lib/go-tc/server_capabilities.go +++ b/lib/go-tc/server_capabilities.go @@ -61,29 +61,29 @@ type ServerCapabilityDetailResponseV41 struct { } // ServerCapabilityV5 is an alias for the latest minor version for the major version 5. -type ServerCapabilityV5 ServerCapabilityV51 +type ServerCapabilityV5 ServerCapabilityV50 -// ServerCapabilityV51 contains information about a given serverCapability in Traffic Ops V5. -type ServerCapabilityV51 struct { +// ServerCapabilityV50 contains information about a given serverCapability in Traffic Ops V5. +type ServerCapabilityV50 struct { Name string `json:"name" db:"name"` LastUpdated time.Time `json:"lastUpdated" db:"last_updated"` Description string `json:"description" db:"description"` } // ServerCapabilitiesResponseV5 is an alias for the latest minor version for the major version 5. -type ServerCapabilitiesResponseV5 ServerCapabilitiesResponseV51 +type ServerCapabilitiesResponseV5 ServerCapabilitiesResponseV50 -// ServerCapabilitiesResponseV51 contains the result data from a GET(v5.1 and above) /server_capabilities request. -type ServerCapabilitiesResponseV51 struct { +// ServerCapabilitiesResponseV50 contains the result data from a GET(v5.1 and above) /server_capabilities request. +type ServerCapabilitiesResponseV50 struct { Response []ServerCapabilityV5 `json:"response"` Alerts } // ServerCapabilityDetailResponseV5 is an alias for the latest minor version for the major version 5. -type ServerCapabilityDetailResponseV5 ServerCapabilityDetailResponseV51 +type ServerCapabilityDetailResponseV5 ServerCapabilityDetailResponseV50 -// ServerCapabilityDetailResponseV51 contains the result data from a POST(v5.1 and above) /server_capabilities request. -type ServerCapabilityDetailResponseV51 struct { +// ServerCapabilityDetailResponseV50 contains the result data from a POST(v5.1 and above) /server_capabilities request. +type ServerCapabilityDetailResponseV50 struct { Response ServerCapabilityV5 `json:"response"` Alerts }