From f87c23629b65ed98ece3e8ac66069ba0ce20f347 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 14 Nov 2025 16:06:41 +0100 Subject: [PATCH] chore(deps): update dependency hcloud to v2.11.1 (#738) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | [hcloud](https://redirect.github.com/hetznercloud/hcloud-python) ([changelog](https://redirect.github.com/hetznercloud/hcloud-python/blob/main/CHANGELOG.md)) | `2.11.0` -> `2.11.1` | [![age](https://developer.mend.io/api/mc/badges/age/pypi/hcloud/2.11.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/hcloud/2.11.0/2.11.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
hetznercloud/hcloud-python (hcloud) ### [`v2.11.1`](https://redirect.github.com/hetznercloud/hcloud-python/blob/HEAD/CHANGELOG.md#v2111) [Compare Source](https://redirect.github.com/hetznercloud/hcloud-python/compare/v2.11.0...v2.11.1) ##### Bug Fixes - support reloading sub resource bound models ([#​590](https://redirect.github.com/hetznercloud/hcloud-python/issues/590))
--- ### 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 +- .../vendor/hcloud/certificates/client.py | 2 +- plugins/module_utils/vendor/hcloud/core/client.py | 15 ++++++++------- .../vendor/hcloud/datacenters/client.py | 2 +- .../vendor/hcloud/firewalls/client.py | 2 +- .../vendor/hcloud/floating_ips/client.py | 2 +- .../module_utils/vendor/hcloud/images/client.py | 3 ++- plugins/module_utils/vendor/hcloud/isos/client.py | 2 +- .../vendor/hcloud/load_balancer_types/client.py | 2 +- .../vendor/hcloud/load_balancers/client.py | 2 +- .../vendor/hcloud/locations/client.py | 2 +- .../module_utils/vendor/hcloud/networks/client.py | 2 +- .../vendor/hcloud/placement_groups/client.py | 2 +- .../vendor/hcloud/primary_ips/client.py | 2 +- .../vendor/hcloud/server_types/client.py | 2 +- .../module_utils/vendor/hcloud/servers/client.py | 2 +- .../module_utils/vendor/hcloud/ssh_keys/client.py | 4 ++-- .../module_utils/vendor/hcloud/volumes/client.py | 2 +- .../module_utils/vendor/hcloud/zones/client.py | 7 +++++++ scripts/vendor.py | 2 +- 20 files changed, 35 insertions(+), 26 deletions(-) diff --git a/plugins/module_utils/vendor/hcloud/_version.py b/plugins/module_utils/vendor/hcloud/_version.py index e7c314f..25bb832 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.11.0" # x-releaser-pleaser-version +__version__ = "2.11.1" # x-releaser-pleaser-version diff --git a/plugins/module_utils/vendor/hcloud/certificates/client.py b/plugins/module_utils/vendor/hcloud/certificates/client.py index 9404513..8b2a7ef 100644 --- a/plugins/module_utils/vendor/hcloud/certificates/client.py +++ b/plugins/module_utils/vendor/hcloud/certificates/client.py @@ -202,7 +202,7 @@ class CertificatesClient(ResourceClientBase): Used to get certificate by name. :return: :class:`BoundCertificate ` """ - return self._get_first_by(name=name) + return self._get_first_by(self.get_list, name=name) def create( self, diff --git a/plugins/module_utils/vendor/hcloud/core/client.py b/plugins/module_utils/vendor/hcloud/core/client.py index da9901f..f0e67a7 100644 --- a/plugins/module_utils/vendor/hcloud/core/client.py +++ b/plugins/module_utils/vendor/hcloud/core/client.py @@ -46,10 +46,8 @@ class ResourceClientBase: return results - def _get_first_by(self, **kwargs): # type: ignore[no-untyped-def] - assert hasattr(self, "get_list") - # pylint: disable=no-member - entities, _ = self.get_list(**kwargs) + def _get_first_by(self, list_function: Callable, *args, **kwargs): # type: ignore[no-untyped-def] + entities, _ = list_function(*args, **kwargs) return entities[0] if entities else None @@ -105,10 +103,13 @@ class BoundModelBase: value = getattr(self.data_model, name) return value - def reload(self) -> None: - """Reloads the model and tries to get all data from the APIx""" + def _get_self(self) -> BoundModelBase: assert hasattr(self._client, "get_by_id") - bound_model = self._client.get_by_id(self.data_model.id) + return self._client.get_by_id(self.data_model.id) + + def reload(self) -> None: + """Reloads the model and tries to get all data from the API""" + bound_model = self._get_self() self.data_model = bound_model.data_model self.complete = True diff --git a/plugins/module_utils/vendor/hcloud/datacenters/client.py b/plugins/module_utils/vendor/hcloud/datacenters/client.py index 880e1c2..ae338a5 100644 --- a/plugins/module_utils/vendor/hcloud/datacenters/client.py +++ b/plugins/module_utils/vendor/hcloud/datacenters/client.py @@ -115,4 +115,4 @@ class DatacentersClient(ResourceClientBase): Used to get datacenter by name. :return: :class:`BoundDatacenter ` """ - return self._get_first_by(name=name) + return self._get_first_by(self.get_list, name=name) diff --git a/plugins/module_utils/vendor/hcloud/firewalls/client.py b/plugins/module_utils/vendor/hcloud/firewalls/client.py index 771f384..a088947 100644 --- a/plugins/module_utils/vendor/hcloud/firewalls/client.py +++ b/plugins/module_utils/vendor/hcloud/firewalls/client.py @@ -351,7 +351,7 @@ class FirewallsClient(ResourceClientBase): Used to get Firewall by name. :return: :class:`BoundFirewall ` """ - return self._get_first_by(name=name) + return self._get_first_by(self.get_list, name=name) def create( self, diff --git a/plugins/module_utils/vendor/hcloud/floating_ips/client.py b/plugins/module_utils/vendor/hcloud/floating_ips/client.py index 15432d1..ce28be3 100644 --- a/plugins/module_utils/vendor/hcloud/floating_ips/client.py +++ b/plugins/module_utils/vendor/hcloud/floating_ips/client.py @@ -293,7 +293,7 @@ class FloatingIPsClient(ResourceClientBase): Used to get Floating IP by name. :return: :class:`BoundFloatingIP ` """ - return self._get_first_by(name=name) + return self._get_first_by(self.get_list, name=name) def create( self, diff --git a/plugins/module_utils/vendor/hcloud/images/client.py b/plugins/module_utils/vendor/hcloud/images/client.py index 3933ebe..b9425b7 100644 --- a/plugins/module_utils/vendor/hcloud/images/client.py +++ b/plugins/module_utils/vendor/hcloud/images/client.py @@ -329,7 +329,7 @@ class ImagesClient(ResourceClientBase): DeprecationWarning, stacklevel=2, ) - return self._get_first_by(name=name) + return self._get_first_by(self.get_list, name=name) def get_by_name_and_architecture( self, @@ -349,6 +349,7 @@ class ImagesClient(ResourceClientBase): :return: :class:`BoundImage ` """ return self._get_first_by( + self.get_list, name=name, architecture=[architecture], include_deprecated=include_deprecated, diff --git a/plugins/module_utils/vendor/hcloud/isos/client.py b/plugins/module_utils/vendor/hcloud/isos/client.py index f3e8689..d5e4496 100644 --- a/plugins/module_utils/vendor/hcloud/isos/client.py +++ b/plugins/module_utils/vendor/hcloud/isos/client.py @@ -99,4 +99,4 @@ class IsosClient(ResourceClientBase): Used to get iso by name. :return: :class:`BoundIso ` """ - return self._get_first_by(name=name) + return self._get_first_by(self.get_list, name=name) diff --git a/plugins/module_utils/vendor/hcloud/load_balancer_types/client.py b/plugins/module_utils/vendor/hcloud/load_balancer_types/client.py index 12d0f03..fbfb08d 100644 --- a/plugins/module_utils/vendor/hcloud/load_balancer_types/client.py +++ b/plugins/module_utils/vendor/hcloud/load_balancer_types/client.py @@ -81,4 +81,4 @@ class LoadBalancerTypesClient(ResourceClientBase): Used to get Load Balancer type by name. :return: :class:`BoundLoadBalancerType ` """ - return self._get_first_by(name=name) + return self._get_first_by(self.get_list, name=name) diff --git a/plugins/module_utils/vendor/hcloud/load_balancers/client.py b/plugins/module_utils/vendor/hcloud/load_balancers/client.py index f1c2d8e..45c7464 100644 --- a/plugins/module_utils/vendor/hcloud/load_balancers/client.py +++ b/plugins/module_utils/vendor/hcloud/load_balancers/client.py @@ -470,7 +470,7 @@ class LoadBalancersClient(ResourceClientBase): Used to get Load Balancer by name. :return: :class:`BoundLoadBalancer ` """ - return self._get_first_by(name=name) + return self._get_first_by(self.get_list, name=name) def create( self, diff --git a/plugins/module_utils/vendor/hcloud/locations/client.py b/plugins/module_utils/vendor/hcloud/locations/client.py index 154ba84..e6f685d 100644 --- a/plugins/module_utils/vendor/hcloud/locations/client.py +++ b/plugins/module_utils/vendor/hcloud/locations/client.py @@ -76,4 +76,4 @@ class LocationsClient(ResourceClientBase): Used to get location by name. :return: :class:`BoundLocation ` """ - return self._get_first_by(name=name) + return self._get_first_by(self.get_list, name=name) diff --git a/plugins/module_utils/vendor/hcloud/networks/client.py b/plugins/module_utils/vendor/hcloud/networks/client.py index 7c6846a..abef2b6 100644 --- a/plugins/module_utils/vendor/hcloud/networks/client.py +++ b/plugins/module_utils/vendor/hcloud/networks/client.py @@ -252,7 +252,7 @@ class NetworksClient(ResourceClientBase): Used to get network by name. :return: :class:`BoundNetwork ` """ - return self._get_first_by(name=name) + return self._get_first_by(self.get_list, name=name) def create( self, diff --git a/plugins/module_utils/vendor/hcloud/placement_groups/client.py b/plugins/module_utils/vendor/hcloud/placement_groups/client.py index de61330..9493934 100644 --- a/plugins/module_utils/vendor/hcloud/placement_groups/client.py +++ b/plugins/module_utils/vendor/hcloud/placement_groups/client.py @@ -131,7 +131,7 @@ class PlacementGroupsClient(ResourceClientBase): Used to get Placement Group by name :return: class:`BoundPlacementGroup ` """ - return self._get_first_by(name=name) + return self._get_first_by(self.get_list, name=name) def create( self, diff --git a/plugins/module_utils/vendor/hcloud/primary_ips/client.py b/plugins/module_utils/vendor/hcloud/primary_ips/client.py index c6acf6e..eb5d30d 100644 --- a/plugins/module_utils/vendor/hcloud/primary_ips/client.py +++ b/plugins/module_utils/vendor/hcloud/primary_ips/client.py @@ -189,7 +189,7 @@ class PrimaryIPsClient(ResourceClientBase): Used to get Primary IP by name. :return: :class:`BoundPrimaryIP ` """ - return self._get_first_by(name=name) + return self._get_first_by(self.get_list, name=name) def create( self, diff --git a/plugins/module_utils/vendor/hcloud/server_types/client.py b/plugins/module_utils/vendor/hcloud/server_types/client.py index bfa525c..db0ef54 100644 --- a/plugins/module_utils/vendor/hcloud/server_types/client.py +++ b/plugins/module_utils/vendor/hcloud/server_types/client.py @@ -99,4 +99,4 @@ class ServerTypesClient(ResourceClientBase): Used to get Server type by name. :return: :class:`BoundServerType ` """ - return self._get_first_by(name=name) + return self._get_first_by(self.get_list, name=name) diff --git a/plugins/module_utils/vendor/hcloud/servers/client.py b/plugins/module_utils/vendor/hcloud/servers/client.py index 4472ab4..6aefab0 100644 --- a/plugins/module_utils/vendor/hcloud/servers/client.py +++ b/plugins/module_utils/vendor/hcloud/servers/client.py @@ -599,7 +599,7 @@ class ServersClient(ResourceClientBase): Used to get server by name. :return: :class:`BoundServer ` """ - return self._get_first_by(name=name) + return self._get_first_by(self.get_list, name=name) # pylint: disable=too-many-branches,too-many-locals def create( diff --git a/plugins/module_utils/vendor/hcloud/ssh_keys/client.py b/plugins/module_utils/vendor/hcloud/ssh_keys/client.py index 4fc541f..a565469 100644 --- a/plugins/module_utils/vendor/hcloud/ssh_keys/client.py +++ b/plugins/module_utils/vendor/hcloud/ssh_keys/client.py @@ -121,7 +121,7 @@ class SSHKeysClient(ResourceClientBase): Used to get ssh key by name. :return: :class:`BoundSSHKey ` """ - return self._get_first_by(name=name) + return self._get_first_by(self.get_list, name=name) def get_by_fingerprint(self, fingerprint: str) -> BoundSSHKey | None: """Get ssh key by fingerprint @@ -130,7 +130,7 @@ class SSHKeysClient(ResourceClientBase): Used to get ssh key by fingerprint. :return: :class:`BoundSSHKey ` """ - return self._get_first_by(fingerprint=fingerprint) + return self._get_first_by(self.get_list, fingerprint=fingerprint) def create( self, diff --git a/plugins/module_utils/vendor/hcloud/volumes/client.py b/plugins/module_utils/vendor/hcloud/volumes/client.py index 0b1b966..9d1cded 100644 --- a/plugins/module_utils/vendor/hcloud/volumes/client.py +++ b/plugins/module_utils/vendor/hcloud/volumes/client.py @@ -225,7 +225,7 @@ class VolumesClient(ResourceClientBase): Used to get volume by name. :return: :class:`BoundVolume ` """ - return self._get_first_by(name=name) + return self._get_first_by(self.get_list, name=name) def create( self, diff --git a/plugins/module_utils/vendor/hcloud/zones/client.py b/plugins/module_utils/vendor/hcloud/zones/client.py index 2da74d4..832d76f 100644 --- a/plugins/module_utils/vendor/hcloud/zones/client.py +++ b/plugins/module_utils/vendor/hcloud/zones/client.py @@ -406,6 +406,13 @@ class BoundZoneRRSet(BoundModelBase, ZoneRRSet): super().__init__(client, data, complete) + def _get_self(self) -> BoundZoneRRSet: + return self._client.get_rrset( + self.data_model.zone, + self.data_model.name, + self.data_model.type, + ) + def update_rrset( self, *, diff --git a/scripts/vendor.py b/scripts/vendor.py index ffa1856..9a8f0d2 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.11.0" +HCLOUD_VERSION = "v2.11.1" HCLOUD_VENDOR_PATH = "plugins/module_utils/vendor/hcloud"