From 807f193b0769d051f79294e6e82449255e8595ed Mon Sep 17 00:00:00 2001 From: Mikolaj Pawlikowski Date: Fri, 12 Mar 2021 13:06:26 +0000 Subject: [PATCH] Regenerate Signed-off-by: Mikolaj Pawlikowski --- pkg/models/cluster_health_results.go | 17 +++-------- pkg/restapi/configure_goldpinger.go | 4 +-- pkg/restapi/embedded_spec.go | 44 +++------------------------- 3 files changed, 10 insertions(+), 55 deletions(-) diff --git a/pkg/models/cluster_health_results.go b/pkg/models/cluster_health_results.go index e241c74..63bd1d7 100644 --- a/pkg/models/cluster_health_results.go +++ b/pkg/models/cluster_health_results.go @@ -19,9 +19,6 @@ import ( // swagger:model ClusterHealthResults type ClusterHealthResults struct { - // DNS - DNS []string `json:"DNS"` - // o k // Required: true OK bool `json:"OK"` @@ -33,17 +30,11 @@ type ClusterHealthResults struct { // Format: date-time GeneratedAt strfmt.DateTime `json:"generated-at,omitempty"` - // hosts healthy - HostsHealthy []string `json:"hostsHealthy"` + // nodes healthy + NodesHealthy []string `json:"nodesHealthy"` - // hosts unhealthy - HostsUnhealthy []string `json:"hostsUnhealthy"` - - // pods healthy - PodsHealthy []string `json:"podsHealthy"` - - // pods unhealthy - PodsUnhealthy []string `json:"podsUnhealthy"` + // nodes unhealthy + NodesUnhealthy []string `json:"nodesUnhealthy"` } // Validate validates this cluster health results diff --git a/pkg/restapi/configure_goldpinger.go b/pkg/restapi/configure_goldpinger.go index 5730524..bc4c96e 100644 --- a/pkg/restapi/configure_goldpinger.go +++ b/pkg/restapi/configure_goldpinger.go @@ -104,8 +104,8 @@ func configureAPI(api *operations.GoldpingerAPI) http.Handler { ) defer cancel() - ok, payload := goldpinger.CheckCluster(ctx) - if ok { + payload := goldpinger.CheckCluster(ctx) + if payload.OK { return operations.NewClusterHealthOK().WithPayload(payload) } else { return operations.NewClusterHealthServiceUnavailable().WithPayload(payload) diff --git a/pkg/restapi/embedded_spec.go b/pkg/restapi/embedded_spec.go index 40e0cea..ccd5c8d 100644 --- a/pkg/restapi/embedded_spec.go +++ b/pkg/restapi/embedded_spec.go @@ -231,12 +231,6 @@ func init() { "OK" ], "properties": { - "DNS": { - "type": "array", - "items": { - "type": "string" - } - }, "OK": { "type": "boolean", "default": false @@ -249,25 +243,13 @@ func init() { "type": "string", "format": "date-time" }, - "hostsHealthy": { + "nodesHealthy": { "type": "array", "items": { "type": "string" } }, - "hostsUnhealthy": { - "type": "array", - "items": { - "type": "string" - } - }, - "podsHealthy": { - "type": "array", - "items": { - "type": "string" - } - }, - "podsUnhealthy": { + "nodesUnhealthy": { "type": "array", "items": { "type": "string" @@ -576,12 +558,6 @@ func init() { "OK" ], "properties": { - "DNS": { - "type": "array", - "items": { - "type": "string" - } - }, "OK": { "type": "boolean", "default": false @@ -594,25 +570,13 @@ func init() { "type": "string", "format": "date-time" }, - "hostsHealthy": { + "nodesHealthy": { "type": "array", "items": { "type": "string" } }, - "hostsUnhealthy": { - "type": "array", - "items": { - "type": "string" - } - }, - "podsHealthy": { - "type": "array", - "items": { - "type": "string" - } - }, - "podsUnhealthy": { + "nodesUnhealthy": { "type": "array", "items": { "type": "string"