mirror of
https://github.com/ansible-collections/hetzner.hcloud.git
synced 2026-02-04 08:01:49 +00:00
chore(deps): update dependency hcloud to v2.4.0 (#609)
This commit is contained in:
parent
b82e18ffbd
commit
fd8a7c4453
28 changed files with 251 additions and 45 deletions
|
|
@ -87,6 +87,11 @@ class Client:
|
|||
|
||||
The Hetzner Cloud API reference is available at https://docs.hetzner.cloud.
|
||||
|
||||
Make sure to follow our API changelog available at
|
||||
https://docs.hetzner.cloud/changelog (or the RRS feed available at
|
||||
https://docs.hetzner.cloud/changelog/feed.rss) to be notified about additions,
|
||||
deprecations and removals.
|
||||
|
||||
**Retry mechanism**
|
||||
|
||||
The :attr:`Client.request` method will retry failed requests that match certain criteria. The
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
from __future__ import annotations
|
||||
|
||||
__version__ = "2.3.0" # x-release-please-version
|
||||
__version__ = "2.4.0" # x-releaser-pleaser-version
|
||||
|
|
|
|||
|
|
@ -1,14 +1,25 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from .client import ( # noqa: F401
|
||||
from .client import (
|
||||
ActionsClient,
|
||||
ActionsPageResult,
|
||||
BoundAction,
|
||||
ResourceActionsClient,
|
||||
)
|
||||
from .domain import ( # noqa: F401
|
||||
from .domain import (
|
||||
Action,
|
||||
ActionException,
|
||||
ActionFailedException,
|
||||
ActionTimeoutException,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"Action",
|
||||
"ActionException",
|
||||
"ActionFailedException",
|
||||
"ActionTimeoutException",
|
||||
"ActionsClient",
|
||||
"ActionsPageResult",
|
||||
"BoundAction",
|
||||
"ResourceActionsClient",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,13 +1,23 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from .client import ( # noqa: F401
|
||||
from .client import (
|
||||
BoundCertificate,
|
||||
CertificatesClient,
|
||||
CertificatesPageResult,
|
||||
)
|
||||
from .domain import ( # noqa: F401
|
||||
from .domain import (
|
||||
Certificate,
|
||||
CreateManagedCertificateResponse,
|
||||
ManagedCertificateError,
|
||||
ManagedCertificateStatus,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"BoundCertificate",
|
||||
"Certificate",
|
||||
"CertificatesClient",
|
||||
"CertificatesPageResult",
|
||||
"CreateManagedCertificateResponse",
|
||||
"ManagedCertificateError",
|
||||
"ManagedCertificateStatus",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,13 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from .client import BoundModelBase, ClientEntityBase # noqa: F401
|
||||
from .domain import BaseDomain, DomainIdentityMixin, Meta, Pagination # noqa: F401
|
||||
from .client import BoundModelBase, ClientEntityBase
|
||||
from .domain import BaseDomain, DomainIdentityMixin, Meta, Pagination
|
||||
|
||||
__all__ = [
|
||||
"BoundModelBase",
|
||||
"ClientEntityBase",
|
||||
"BaseDomain",
|
||||
"DomainIdentityMixin",
|
||||
"Meta",
|
||||
"Pagination",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -96,3 +96,9 @@ class BoundModelBase:
|
|||
# models, as they will generate a lot of API call trying to print all the fields
|
||||
# of the model.
|
||||
return object.__repr__(self)
|
||||
|
||||
def __eq__(self, other: Any) -> bool:
|
||||
"""Compare a bound model object with another of the same type."""
|
||||
if not isinstance(other, self.__class__):
|
||||
return NotImplemented
|
||||
return self.data_model == other.data_model
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
|
||||
class BaseDomain:
|
||||
__api_properties__: tuple
|
||||
|
|
@ -16,6 +18,15 @@ class BaseDomain:
|
|||
kwargs = [f"{key}={getattr(self, key)!r}" for key in self.__api_properties__] # type: ignore[var-annotated]
|
||||
return f"{self.__class__.__qualname__}({', '.join(kwargs)})"
|
||||
|
||||
def __eq__(self, other: Any) -> bool:
|
||||
"""Compare a domain object with another of the same type."""
|
||||
if not isinstance(other, self.__class__):
|
||||
return NotImplemented
|
||||
for key in self.__api_properties__:
|
||||
if getattr(self, key) != getattr(other, key):
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
class DomainIdentityMixin:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,16 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from .client import ( # noqa: F401
|
||||
from .client import (
|
||||
BoundDatacenter,
|
||||
DatacentersClient,
|
||||
DatacentersPageResult,
|
||||
)
|
||||
from .domain import Datacenter, DatacenterServerTypes # noqa: F401
|
||||
from .domain import Datacenter, DatacenterServerTypes
|
||||
|
||||
__all__ = [
|
||||
"BoundDatacenter",
|
||||
"Datacenter",
|
||||
"DatacenterServerTypes",
|
||||
"DatacentersClient",
|
||||
"DatacentersPageResult",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from .domain import DeprecationInfo # noqa: F401
|
||||
from .domain import DeprecationInfo
|
||||
|
||||
__all__ = ["DeprecationInfo"]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from .client import BoundFirewall, FirewallsClient, FirewallsPageResult # noqa: F401
|
||||
from .domain import ( # noqa: F401
|
||||
from .client import BoundFirewall, FirewallsClient, FirewallsPageResult
|
||||
from .domain import (
|
||||
CreateFirewallResponse,
|
||||
Firewall,
|
||||
FirewallResource,
|
||||
|
|
@ -9,3 +9,15 @@ from .domain import ( # noqa: F401
|
|||
FirewallResourceLabelSelector,
|
||||
FirewallRule,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"BoundFirewall",
|
||||
"CreateFirewallResponse",
|
||||
"Firewall",
|
||||
"FirewallResource",
|
||||
"FirewallResourceAppliedToResources",
|
||||
"FirewallResourceLabelSelector",
|
||||
"FirewallRule",
|
||||
"FirewallsClient",
|
||||
"FirewallsPageResult",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,8 +1,16 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from .client import ( # noqa: F401
|
||||
from .client import (
|
||||
BoundFloatingIP,
|
||||
FloatingIPsClient,
|
||||
FloatingIPsPageResult,
|
||||
)
|
||||
from .domain import CreateFloatingIPResponse, FloatingIP # noqa: F401
|
||||
from .domain import CreateFloatingIPResponse, FloatingIP
|
||||
|
||||
__all__ = [
|
||||
"BoundFloatingIP",
|
||||
"CreateFloatingIPResponse",
|
||||
"FloatingIP",
|
||||
"FloatingIPsClient",
|
||||
"FloatingIPsPageResult",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from .labels import LabelValidator # noqa: F401
|
||||
from .labels import LabelValidator
|
||||
|
||||
__all__ = ["LabelValidator"]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,12 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from .client import BoundImage, ImagesClient, ImagesPageResult # noqa: F401
|
||||
from .domain import CreateImageResponse, Image # noqa: F401
|
||||
from .client import BoundImage, ImagesClient, ImagesPageResult
|
||||
from .domain import CreateImageResponse, Image
|
||||
|
||||
__all__ = [
|
||||
"BoundImage",
|
||||
"CreateImageResponse",
|
||||
"Image",
|
||||
"ImagesClient",
|
||||
"ImagesPageResult",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,11 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from .client import BoundIso, IsosClient, IsosPageResult # noqa: F401
|
||||
from .domain import Iso # noqa: F401
|
||||
from .client import BoundIso, IsosClient, IsosPageResult
|
||||
from .domain import Iso
|
||||
|
||||
__all__ = [
|
||||
"BoundIso",
|
||||
"Iso",
|
||||
"IsosClient",
|
||||
"IsosPageResult",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,8 +1,15 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from .client import ( # noqa: F401
|
||||
from .client import (
|
||||
BoundLoadBalancerType,
|
||||
LoadBalancerTypesClient,
|
||||
LoadBalancerTypesPageResult,
|
||||
)
|
||||
from .domain import LoadBalancerType # noqa: F401
|
||||
from .domain import LoadBalancerType
|
||||
|
||||
__all__ = [
|
||||
"BoundLoadBalancerType",
|
||||
"LoadBalancerType",
|
||||
"LoadBalancerTypesClient",
|
||||
"LoadBalancerTypesPageResult",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from .client import ( # noqa: F401
|
||||
from .client import (
|
||||
BoundLoadBalancer,
|
||||
LoadBalancersClient,
|
||||
LoadBalancersPageResult,
|
||||
)
|
||||
from .domain import ( # noqa: F401
|
||||
from .domain import (
|
||||
CreateLoadBalancerResponse,
|
||||
GetMetricsResponse,
|
||||
IPv4Address,
|
||||
|
|
@ -23,3 +23,25 @@ from .domain import ( # noqa: F401
|
|||
PrivateNet,
|
||||
PublicNetwork,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"BoundLoadBalancer",
|
||||
"CreateLoadBalancerResponse",
|
||||
"GetMetricsResponse",
|
||||
"IPv4Address",
|
||||
"IPv6Network",
|
||||
"LoadBalancer",
|
||||
"LoadBalancerAlgorithm",
|
||||
"LoadBalancerHealtCheckHttp",
|
||||
"LoadBalancerHealthCheck",
|
||||
"LoadBalancerService",
|
||||
"LoadBalancerServiceHttp",
|
||||
"LoadBalancerTarget",
|
||||
"LoadBalancerTargetHealthStatus",
|
||||
"LoadBalancerTargetIP",
|
||||
"LoadBalancerTargetLabelSelector",
|
||||
"LoadBalancersClient",
|
||||
"LoadBalancersPageResult",
|
||||
"PrivateNet",
|
||||
"PublicNetwork",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,11 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from .client import BoundLocation, LocationsClient, LocationsPageResult # noqa: F401
|
||||
from .domain import Location # noqa: F401
|
||||
from .client import BoundLocation, LocationsClient, LocationsPageResult
|
||||
from .domain import Location
|
||||
|
||||
__all__ = [
|
||||
"BoundLocation",
|
||||
"Location",
|
||||
"LocationsClient",
|
||||
"LocationsPageResult",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from .domain import Metrics, TimeSeries # noqa: F401
|
||||
from .domain import Metrics, TimeSeries
|
||||
|
||||
__all__ = [
|
||||
"Metrics",
|
||||
"TimeSeries",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from datetime import datetime
|
||||
from typing import Dict, List, Literal, Tuple
|
||||
from typing import Literal
|
||||
|
||||
try:
|
||||
from dateutil.parser import isoparse
|
||||
|
|
@ -10,7 +10,7 @@ except ImportError:
|
|||
|
||||
from ..core import BaseDomain
|
||||
|
||||
TimeSeries = Dict[str, Dict[Literal["values"], List[Tuple[float, str]]]]
|
||||
TimeSeries = dict[str, dict[Literal["values"], list[tuple[float, str]]]]
|
||||
|
||||
|
||||
class Metrics(BaseDomain):
|
||||
|
|
|
|||
|
|
@ -1,9 +1,19 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from .client import BoundNetwork, NetworksClient, NetworksPageResult # noqa: F401
|
||||
from .domain import ( # noqa: F401
|
||||
from .client import BoundNetwork, NetworksClient, NetworksPageResult
|
||||
from .domain import (
|
||||
CreateNetworkResponse,
|
||||
Network,
|
||||
NetworkRoute,
|
||||
NetworkSubnet,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"BoundNetwork",
|
||||
"CreateNetworkResponse",
|
||||
"Network",
|
||||
"NetworkRoute",
|
||||
"NetworkSubnet",
|
||||
"NetworksClient",
|
||||
"NetworksPageResult",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,8 +1,16 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from .client import ( # noqa: F401
|
||||
from .client import (
|
||||
BoundPlacementGroup,
|
||||
PlacementGroupsClient,
|
||||
PlacementGroupsPageResult,
|
||||
)
|
||||
from .domain import CreatePlacementGroupResponse, PlacementGroup # noqa: F401
|
||||
from .domain import CreatePlacementGroupResponse, PlacementGroup
|
||||
|
||||
__all__ = [
|
||||
"BoundPlacementGroup",
|
||||
"CreatePlacementGroupResponse",
|
||||
"PlacementGroup",
|
||||
"PlacementGroupsClient",
|
||||
"PlacementGroupsPageResult",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,12 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from .client import BoundPrimaryIP, PrimaryIPsClient, PrimaryIPsPageResult # noqa: F401
|
||||
from .domain import CreatePrimaryIPResponse, PrimaryIP # noqa: F401
|
||||
from .client import BoundPrimaryIP, PrimaryIPsClient, PrimaryIPsPageResult
|
||||
from .domain import CreatePrimaryIPResponse, PrimaryIP
|
||||
|
||||
__all__ = [
|
||||
"BoundPrimaryIP",
|
||||
"CreatePrimaryIPResponse",
|
||||
"PrimaryIP",
|
||||
"PrimaryIPsClient",
|
||||
"PrimaryIPsPageResult",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,8 +1,15 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from .client import ( # noqa: F401
|
||||
from .client import (
|
||||
BoundServerType,
|
||||
ServerTypesClient,
|
||||
ServerTypesPageResult,
|
||||
)
|
||||
from .domain import ServerType # noqa: F401
|
||||
from .domain import ServerType
|
||||
|
||||
__all__ = [
|
||||
"BoundServerType",
|
||||
"ServerType",
|
||||
"ServerTypesClient",
|
||||
"ServerTypesPageResult",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from .client import BoundServer, ServersClient, ServersPageResult # noqa: F401
|
||||
from .domain import ( # noqa: F401
|
||||
from .client import BoundServer, ServersClient, ServersPageResult
|
||||
from .domain import (
|
||||
CreateServerResponse,
|
||||
EnableRescueResponse,
|
||||
GetMetricsResponse,
|
||||
|
|
@ -15,3 +15,21 @@ from .domain import ( # noqa: F401
|
|||
Server,
|
||||
ServerCreatePublicNetwork,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"BoundServer",
|
||||
"CreateServerResponse",
|
||||
"EnableRescueResponse",
|
||||
"GetMetricsResponse",
|
||||
"IPv4Address",
|
||||
"IPv6Network",
|
||||
"PrivateNet",
|
||||
"PublicNetwork",
|
||||
"PublicNetworkFirewall",
|
||||
"RequestConsoleResponse",
|
||||
"ResetPasswordResponse",
|
||||
"Server",
|
||||
"ServerCreatePublicNetwork",
|
||||
"ServersClient",
|
||||
"ServersPageResult",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -296,8 +296,8 @@ class PublicNetwork(BaseDomain):
|
|||
|
||||
def __init__(
|
||||
self,
|
||||
ipv4: IPv4Address,
|
||||
ipv6: IPv6Network,
|
||||
ipv4: IPv4Address | None,
|
||||
ipv6: IPv6Network | None,
|
||||
floating_ips: list[BoundFloatingIP],
|
||||
primary_ipv4: BoundPrimaryIP | None,
|
||||
primary_ipv6: BoundPrimaryIP | None,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,11 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from .client import BoundSSHKey, SSHKeysClient, SSHKeysPageResult # noqa: F401
|
||||
from .domain import SSHKey # noqa: F401
|
||||
from .client import BoundSSHKey, SSHKeysClient, SSHKeysPageResult
|
||||
from .domain import SSHKey
|
||||
|
||||
__all__ = [
|
||||
"BoundSSHKey",
|
||||
"SSHKey",
|
||||
"SSHKeysClient",
|
||||
"SSHKeysPageResult",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,12 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from .client import BoundVolume, VolumesClient, VolumesPageResult # noqa: F401
|
||||
from .domain import CreateVolumeResponse, Volume # noqa: F401
|
||||
from .client import BoundVolume, VolumesClient, VolumesPageResult
|
||||
from .domain import CreateVolumeResponse, Volume
|
||||
|
||||
__all__ = [
|
||||
"BoundVolume",
|
||||
"CreateVolumeResponse",
|
||||
"Volume",
|
||||
"VolumesClient",
|
||||
"VolumesPageResult",
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue