diff --git a/plugins/module_utils/vendor/hcloud/_version.py b/plugins/module_utils/vendor/hcloud/_version.py index 21bc9b8..1a01ca7 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.29.1" # x-release-please-version +VERSION = "1.30.0" # x-release-please-version diff --git a/plugins/module_utils/vendor/hcloud/isos/domain.py b/plugins/module_utils/vendor/hcloud/isos/domain.py index 99be0a0..3a5d814 100644 --- a/plugins/module_utils/vendor/hcloud/isos/domain.py +++ b/plugins/module_utils/vendor/hcloud/isos/domain.py @@ -6,6 +6,7 @@ except ImportError: isoparse = None from ..core import BaseDomain, DomainIdentityMixin +from ..deprecation import DeprecationInfo class Iso(BaseDomain, DomainIdentityMixin): @@ -22,10 +23,21 @@ class Iso(BaseDomain, DomainIdentityMixin): :param architecture: str, None CPU Architecture that the ISO is compatible with. None means that the compatibility is unknown. Choices: `x86`, `arm` :param deprecated: datetime, None - ISO 8601 timestamp of deprecation, None if ISO is still available. After the deprecation time it will no longer be possible to attach the ISO to servers. + ISO 8601 timestamp of deprecation, None if ISO is still available. After the deprecation time it will no longer be possible to attach the ISO to servers. This field is deprecated. Use `deprecation` instead. + :param deprecation: :class:`DeprecationInfo `, None + Describes if, when & how the resources was deprecated. If this field is set to None the resource is not + deprecated. If it has a value, it is considered deprecated. """ - __slots__ = ("id", "name", "type", "architecture", "description", "deprecated") + __slots__ = ( + "id", + "name", + "type", + "architecture", + "description", + "deprecated", + "deprecation", + ) def __init__( self, @@ -35,6 +47,7 @@ class Iso(BaseDomain, DomainIdentityMixin): architecture: str | None = None, description: str | None = None, deprecated: str | None = None, + deprecation: dict | None = None, ): self.id = id self.name = name @@ -42,3 +55,6 @@ class Iso(BaseDomain, DomainIdentityMixin): self.architecture = architecture self.description = description self.deprecated = isoparse(deprecated) if deprecated else None + self.deprecation = ( + DeprecationInfo.from_dict(deprecation) if deprecation is not None else None + ) diff --git a/plugins/module_utils/vendor/hcloud/servers/client.py b/plugins/module_utils/vendor/hcloud/servers/client.py index 5cbd48a..ea72851 100644 --- a/plugins/module_utils/vendor/hcloud/servers/client.py +++ b/plugins/module_utils/vendor/hcloud/servers/client.py @@ -9,8 +9,6 @@ from ..firewalls import BoundFirewall from ..floating_ips import BoundFloatingIP from ..images import BoundImage, CreateImageResponse from ..isos import BoundIso -from ..networks import BoundNetwork # noqa -from ..networks import Network # noqa from ..placement_groups import BoundPlacementGroup from ..primary_ips import BoundPrimaryIP from ..server_types import BoundServerType @@ -35,6 +33,7 @@ if TYPE_CHECKING: from ..images import Image from ..isos import Iso from ..locations import BoundLocation, Location + from ..networks import BoundNetwork, Network from ..placement_groups import PlacementGroup from ..server_types import ServerType from ..ssh_keys import BoundSSHKey, SSHKey @@ -131,6 +130,9 @@ class BoundServer(BoundModelBase, Server): private_nets = data.get("private_net") if private_nets: + # pylint: disable=import-outside-toplevel + from ..networks import BoundNetwork + private_nets = [ PrivateNet( network=BoundNetwork( diff --git a/scripts/vendor.py b/scripts/vendor.py index dfe9bf2..089c629 100755 --- a/scripts/vendor.py +++ b/scripts/vendor.py @@ -20,7 +20,7 @@ from textwrap import dedent logger = logging.getLogger("vendor") HCLOUD_SOURCE_URL = "https://github.com/hetznercloud/hcloud-python" -HCLOUD_VERSION = "v1.29.1" +HCLOUD_VERSION = "v1.30.0" HCLOUD_VENDOR_PATH = "plugins/module_utils/vendor/hcloud"