From fb35516e7609fad4dd3fa75138dbc603f83d9aa0 Mon Sep 17 00:00:00 2001 From: Jonas L Date: Mon, 25 Sep 2023 12:20:18 +0200 Subject: [PATCH] fix: invalid field in load_balancer_service health_check.http return data (#333) ##### SUMMARY In the `hcloud_load_balancer_service` return data, the `health_check.http.certificates` field must be named `health_check.http.status_codes`. https://docs.hetzner.cloud/#load-balancers-get-a-load-balancer Fixes #332 ##### ISSUE TYPE - Bugfix Pull Request ##### COMPONENT NAME hcloud_load_balancer_service --- .../rename-load-balancer-service-http-health-check-dict.yaml | 4 ++++ plugins/modules/hcloud_load_balancer_service.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/rename-load-balancer-service-http-health-check-dict.yaml diff --git a/changelogs/fragments/rename-load-balancer-service-http-health-check-dict.yaml b/changelogs/fragments/rename-load-balancer-service-http-health-check-dict.yaml new file mode 100644 index 00000000..ec9ae518 --- /dev/null +++ b/changelogs/fragments/rename-load-balancer-service-http-health-check-dict.yaml @@ -0,0 +1,4 @@ +bugfixes: + - > + hcloud_load_balancer_service - In the returned data, the invalid + `health_check.http.certificates` field was renamed to `health_check.http.status_codes`. diff --git a/plugins/modules/hcloud_load_balancer_service.py b/plugins/modules/hcloud_load_balancer_service.py index 7324ac9d..610fbec0 100644 --- a/plugins/modules/hcloud_load_balancer_service.py +++ b/plugins/modules/hcloud_load_balancer_service.py @@ -322,7 +322,7 @@ def _prepare_result(self): "domain": to_native(self.hcloud_load_balancer_service.health_check.http.domain), "path": to_native(self.hcloud_load_balancer_service.health_check.http.path), "response": to_native(self.hcloud_load_balancer_service.health_check.http.response), - "certificates": [ + "status_codes": [ to_native(status_code) for status_code in self.hcloud_load_balancer_service.health_check.http.status_codes ],