From ba0a419db3e48b9c3385efdda786c7f665d67868 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 10 Jun 2025 20:36:03 +0200 Subject: [PATCH] chore(deps): update dependency hcloud to v2.5.3 (#649) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [hcloud](https://redirect.github.com/hetznercloud/hcloud-python) ([changelog](https://redirect.github.com/hetznercloud/hcloud-python/blob/main/CHANGELOG.md)) | `2.5.2` -> `2.5.3` | [![age](https://developer.mend.io/api/mc/badges/age/pypi/hcloud/2.5.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/hcloud/2.5.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/hcloud/2.5.2/2.5.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/hcloud/2.5.2/2.5.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
hetznercloud/hcloud-python (hcloud) ### [`v2.5.3`](https://redirect.github.com/hetznercloud/hcloud-python/blob/HEAD/CHANGELOG.md#v253) [Compare Source](https://redirect.github.com/hetznercloud/hcloud-python/compare/v2.5.2...v2.5.3) ##### Bug Fixes - invalid placement group id casting ([#​501](https://redirect.github.com/hetznercloud/hcloud-python/issues/501)) - handle string id when checking has_id_or_name ([#​504](https://redirect.github.com/hetznercloud/hcloud-python/issues/504))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/ansible-collections/hetzner.hcloud). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: jo --- plugins/module_utils/vendor/hcloud/_version.py | 2 +- .../module_utils/vendor/hcloud/core/domain.py | 17 ++++++++++++----- .../vendor/hcloud/servers/client.py | 2 +- scripts/vendor.py | 2 +- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/plugins/module_utils/vendor/hcloud/_version.py b/plugins/module_utils/vendor/hcloud/_version.py index e93dacf..7252467 100644 --- a/plugins/module_utils/vendor/hcloud/_version.py +++ b/plugins/module_utils/vendor/hcloud/_version.py @@ -1,3 +1,3 @@ from __future__ import annotations -__version__ = "2.5.2" # x-releaser-pleaser-version +__version__ = "2.5.3" # x-releaser-pleaser-version diff --git a/plugins/module_utils/vendor/hcloud/core/domain.py b/plugins/module_utils/vendor/hcloud/core/domain.py index f305030..b2ac197 100644 --- a/plugins/module_utils/vendor/hcloud/core/domain.py +++ b/plugins/module_utils/vendor/hcloud/core/domain.py @@ -52,15 +52,22 @@ class DomainIdentityMixin: the comparison will not work as expected (e.g. the domains are the same but cannot be equal, if one provides an id and the other the name). """ - values: list[int | str] = [] + result = None + if self.id is not None: - values.append(self.id) + value = id_or_name + if isinstance(id_or_name, str) and id_or_name.isnumeric(): + value = int(id_or_name) + + result = result or self.id == value + if self.name is not None: - values.append(self.name) - if not values: + result = result or self.name == str(id_or_name) + + if result is None: raise ValueError("id or name must be set") - return id_or_name in values + return result class Pagination(BaseDomain): diff --git a/plugins/module_utils/vendor/hcloud/servers/client.py b/plugins/module_utils/vendor/hcloud/servers/client.py index a0883e4..e1f0b80 100644 --- a/plugins/module_utils/vendor/hcloud/servers/client.py +++ b/plugins/module_utils/vendor/hcloud/servers/client.py @@ -1230,7 +1230,7 @@ class ServersClient(ClientEntityBase): :param placement_group: :class:`BoundPlacementGroup ` or :class:`Network ` :return: :class:`BoundAction ` """ - data: dict[str, Any] = {"placement_group": str(placement_group.id)} + data: dict[str, Any] = {"placement_group": placement_group.id} response = self._client.request( url=f"/servers/{server.id}/actions/add_to_placement_group", method="POST", diff --git a/scripts/vendor.py b/scripts/vendor.py index f8ccd66..7a2000b 100755 --- a/scripts/vendor.py +++ b/scripts/vendor.py @@ -22,7 +22,7 @@ from textwrap import dedent logger = logging.getLogger("vendor") HCLOUD_SOURCE_URL = "https://github.com/hetznercloud/hcloud-python" -HCLOUD_VERSION = "v2.5.2" +HCLOUD_VERSION = "v2.5.3" HCLOUD_VENDOR_PATH = "plugins/module_utils/vendor/hcloud"