diff --git a/plugins/module_utils/vendor/hcloud/_version.py b/plugins/module_utils/vendor/hcloud/_version.py index b592a1b..d350d71 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 = "1.34.0" # x-release-please-version +VERSION = "1.35.0" # x-release-please-version diff --git a/plugins/module_utils/vendor/hcloud/images/client.py b/plugins/module_utils/vendor/hcloud/images/client.py index 65b7546..a7d41e0 100644 --- a/plugins/module_utils/vendor/hcloud/images/client.py +++ b/plugins/module_utils/vendor/hcloud/images/client.py @@ -1,5 +1,6 @@ from __future__ import annotations +import warnings from typing import TYPE_CHECKING, Any, NamedTuple from ..actions import ActionsPageResult, BoundAction, ResourceActionsClient @@ -305,18 +306,27 @@ class ImagesClient(ClientEntityBase): def get_by_name(self, name: str) -> BoundImage | None: """Get image by name - Deprecated: Use get_by_name_and_architecture instead. - :param name: str Used to get image by name. :return: :class:`BoundImage ` + + .. deprecated:: 1.19 + Use :func:`hcloud.images.client.ImagesClient.get_by_name_and_architecture` instead. """ + warnings.warn( + "The 'hcloud.images.client.ImagesClient.get_by_name' method is deprecated, please use the " + "'hcloud.images.client.ImagesClient.get_by_name_and_architecture' method instead.", + DeprecationWarning, + stacklevel=2, + ) return self._get_first_by(name=name) def get_by_name_and_architecture( self, name: str, architecture: str, + *, + include_deprecated: bool | None = None, ) -> BoundImage | None: """Get image by name @@ -324,9 +334,15 @@ class ImagesClient(ClientEntityBase): Used to identify the image. :param architecture: str Used to identify the image. + :param include_deprecated: bool (optional) + Include deprecated images. Default: False :return: :class:`BoundImage ` """ - return self._get_first_by(name=name, architecture=[architecture]) + return self._get_first_by( + name=name, + architecture=[architecture], + include_deprecated=include_deprecated, + ) def update( self, diff --git a/scripts/vendor.py b/scripts/vendor.py index 26a51ca..4fa881d 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 = "v1.34.0" +HCLOUD_VERSION = "v1.35.0" HCLOUD_VENDOR_PATH = "plugins/module_utils/vendor/hcloud"