mirror of
https://github.com/ansible-collections/hetzner.hcloud
synced 2024-11-10 06:34:13 +00:00
deps: update dependency hcloud to v2.1.0 (#531)
This commit is contained in:
parent
e8cb7802f4
commit
42a1438d43
24 changed files with 251 additions and 103 deletions
|
@ -1,6 +1,10 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from ._client import Client as Client # noqa pylint: disable=C0414
|
from ._client import ( # noqa pylint: disable=C0414
|
||||||
|
Client as Client,
|
||||||
|
constant_backoff_function as constant_backoff_function,
|
||||||
|
exponential_backoff_function as exponential_backoff_function,
|
||||||
|
)
|
||||||
from ._exceptions import ( # noqa pylint: disable=C0414
|
from ._exceptions import ( # noqa pylint: disable=C0414
|
||||||
APIException as APIException,
|
APIException as APIException,
|
||||||
HCloudException as HCloudException,
|
HCloudException as HCloudException,
|
||||||
|
|
138
plugins/module_utils/vendor/hcloud/_client.py
vendored
138
plugins/module_utils/vendor/hcloud/_client.py
vendored
|
@ -1,6 +1,7 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import time
|
import time
|
||||||
|
from random import uniform
|
||||||
from typing import Protocol
|
from typing import Protocol
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -29,7 +30,7 @@ from .ssh_keys import SSHKeysClient
|
||||||
from .volumes import VolumesClient
|
from .volumes import VolumesClient
|
||||||
|
|
||||||
|
|
||||||
class PollIntervalFunction(Protocol):
|
class BackoffFunction(Protocol):
|
||||||
def __call__(self, retries: int) -> float:
|
def __call__(self, retries: int) -> float:
|
||||||
"""
|
"""
|
||||||
Return a interval in seconds to wait between each API call.
|
Return a interval in seconds to wait between each API call.
|
||||||
|
@ -38,20 +39,65 @@ class PollIntervalFunction(Protocol):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
def constant_backoff_function(interval: float) -> BackoffFunction:
|
||||||
|
"""
|
||||||
|
Return a backoff function, implementing a constant backoff.
|
||||||
|
|
||||||
|
:param interval: Constant interval to return.
|
||||||
|
"""
|
||||||
|
|
||||||
|
# pylint: disable=unused-argument
|
||||||
|
def func(retries: int) -> float:
|
||||||
|
return interval
|
||||||
|
|
||||||
|
return func
|
||||||
|
|
||||||
|
|
||||||
|
def exponential_backoff_function(
|
||||||
|
*,
|
||||||
|
base: float,
|
||||||
|
multiplier: int,
|
||||||
|
cap: float,
|
||||||
|
jitter: bool = False,
|
||||||
|
) -> BackoffFunction:
|
||||||
|
"""
|
||||||
|
Return a backoff function, implementing a truncated exponential backoff with
|
||||||
|
optional full jitter.
|
||||||
|
|
||||||
|
:param base: Base for the exponential backoff algorithm.
|
||||||
|
:param multiplier: Multiplier for the exponential backoff algorithm.
|
||||||
|
:param cap: Value at which the interval is truncated.
|
||||||
|
:param jitter: Whether to add jitter.
|
||||||
|
"""
|
||||||
|
|
||||||
|
def func(retries: int) -> float:
|
||||||
|
interval = base * multiplier**retries # Exponential backoff
|
||||||
|
interval = min(cap, interval) # Cap backoff
|
||||||
|
if jitter:
|
||||||
|
interval = uniform(base, interval) # Add jitter
|
||||||
|
return interval
|
||||||
|
|
||||||
|
return func
|
||||||
|
|
||||||
|
|
||||||
class Client:
|
class Client:
|
||||||
"""Base Client for accessing the Hetzner Cloud API"""
|
"""Base Client for accessing the Hetzner Cloud API"""
|
||||||
|
|
||||||
_version = __version__
|
_version = __version__
|
||||||
_retry_wait_time = 0.5
|
|
||||||
__user_agent_prefix = "hcloud-python"
|
__user_agent_prefix = "hcloud-python"
|
||||||
|
|
||||||
|
_retry_interval = exponential_backoff_function(
|
||||||
|
base=1.0, multiplier=2, cap=60.0, jitter=True
|
||||||
|
)
|
||||||
|
_retry_max_retries = 5
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
token: str,
|
token: str,
|
||||||
api_endpoint: str = "https://api.hetzner.cloud/v1",
|
api_endpoint: str = "https://api.hetzner.cloud/v1",
|
||||||
application_name: str | None = None,
|
application_name: str | None = None,
|
||||||
application_version: str | None = None,
|
application_version: str | None = None,
|
||||||
poll_interval: int | float | PollIntervalFunction = 1.0,
|
poll_interval: int | float | BackoffFunction = 1.0,
|
||||||
poll_max_retries: int = 120,
|
poll_max_retries: int = 120,
|
||||||
timeout: float | tuple[float, float] | None = None,
|
timeout: float | tuple[float, float] | None = None,
|
||||||
):
|
):
|
||||||
|
@ -76,7 +122,7 @@ class Client:
|
||||||
self._requests_timeout = timeout
|
self._requests_timeout = timeout
|
||||||
|
|
||||||
if isinstance(poll_interval, (int, float)):
|
if isinstance(poll_interval, (int, float)):
|
||||||
self._poll_interval_func = lambda _: poll_interval # Constant poll interval
|
self._poll_interval_func = constant_backoff_function(poll_interval)
|
||||||
else:
|
else:
|
||||||
self._poll_interval_func = poll_interval
|
self._poll_interval_func = poll_interval
|
||||||
self._poll_max_retries = poll_max_retries
|
self._poll_max_retries = poll_max_retries
|
||||||
|
@ -197,8 +243,6 @@ class Client:
|
||||||
self,
|
self,
|
||||||
method: str,
|
method: str,
|
||||||
url: str,
|
url: str,
|
||||||
*,
|
|
||||||
_tries: int = 1,
|
|
||||||
**kwargs,
|
**kwargs,
|
||||||
) -> dict:
|
) -> dict:
|
||||||
"""Perform a request to the Hetzner Cloud API, wrapper around requests.request
|
"""Perform a request to the Hetzner Cloud API, wrapper around requests.request
|
||||||
|
@ -208,50 +252,58 @@ class Client:
|
||||||
:param timeout: Requests timeout in seconds
|
:param timeout: Requests timeout in seconds
|
||||||
:return: Response
|
:return: Response
|
||||||
"""
|
"""
|
||||||
timeout = kwargs.pop("timeout", self._requests_timeout)
|
kwargs.setdefault("timeout", self._requests_timeout)
|
||||||
|
|
||||||
response = self._requests_session.request(
|
url = self._api_endpoint + url
|
||||||
method=method,
|
headers = self._get_headers()
|
||||||
url=self._api_endpoint + url,
|
|
||||||
headers=self._get_headers(),
|
|
||||||
timeout=timeout,
|
|
||||||
**kwargs,
|
|
||||||
)
|
|
||||||
|
|
||||||
correlation_id = response.headers.get("X-Correlation-Id")
|
retries = 0
|
||||||
payload = {}
|
while True:
|
||||||
try:
|
response = self._requests_session.request(
|
||||||
if len(response.content) > 0:
|
method=method,
|
||||||
payload = response.json()
|
url=url,
|
||||||
except (TypeError, ValueError) as exc:
|
headers=headers,
|
||||||
raise APIException(
|
**kwargs,
|
||||||
code=response.status_code,
|
)
|
||||||
message=response.reason,
|
|
||||||
details={"content": response.content},
|
|
||||||
correlation_id=correlation_id,
|
|
||||||
) from exc
|
|
||||||
|
|
||||||
if not response.ok:
|
correlation_id = response.headers.get("X-Correlation-Id")
|
||||||
if not payload or "error" not in payload:
|
payload = {}
|
||||||
|
try:
|
||||||
|
if len(response.content) > 0:
|
||||||
|
payload = response.json()
|
||||||
|
except (TypeError, ValueError) as exc:
|
||||||
raise APIException(
|
raise APIException(
|
||||||
code=response.status_code,
|
code=response.status_code,
|
||||||
message=response.reason,
|
message=response.reason,
|
||||||
details={"content": response.content},
|
details={"content": response.content},
|
||||||
correlation_id=correlation_id,
|
correlation_id=correlation_id,
|
||||||
|
) from exc
|
||||||
|
|
||||||
|
if not response.ok:
|
||||||
|
if not payload or "error" not in payload:
|
||||||
|
raise APIException(
|
||||||
|
code=response.status_code,
|
||||||
|
message=response.reason,
|
||||||
|
details={"content": response.content},
|
||||||
|
correlation_id=correlation_id,
|
||||||
|
)
|
||||||
|
|
||||||
|
error: dict = payload["error"]
|
||||||
|
|
||||||
|
if (
|
||||||
|
error["code"] == "rate_limit_exceeded"
|
||||||
|
and retries < self._retry_max_retries
|
||||||
|
):
|
||||||
|
# pylint: disable=too-many-function-args
|
||||||
|
time.sleep(self._retry_interval(retries))
|
||||||
|
retries += 1
|
||||||
|
continue
|
||||||
|
|
||||||
|
raise APIException(
|
||||||
|
code=error["code"],
|
||||||
|
message=error["message"],
|
||||||
|
details=error.get("details"),
|
||||||
|
correlation_id=correlation_id,
|
||||||
)
|
)
|
||||||
|
|
||||||
error: dict = payload["error"]
|
return payload
|
||||||
|
|
||||||
if error["code"] == "rate_limit_exceeded" and _tries < 5:
|
|
||||||
time.sleep(_tries * self._retry_wait_time)
|
|
||||||
_tries = _tries + 1
|
|
||||||
return self.request(method, url, _tries=_tries, **kwargs)
|
|
||||||
|
|
||||||
raise APIException(
|
|
||||||
code=error["code"],
|
|
||||||
message=error["message"],
|
|
||||||
details=error.get("details"),
|
|
||||||
correlation_id=correlation_id,
|
|
||||||
)
|
|
||||||
|
|
||||||
return payload
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
__version__ = "2.0.1" # x-release-please-version
|
__version__ = "2.1.0" # x-release-please-version
|
||||||
|
|
|
@ -34,7 +34,7 @@ class Action(BaseDomain):
|
||||||
STATUS_ERROR = "error"
|
STATUS_ERROR = "error"
|
||||||
"""Action Status error"""
|
"""Action Status error"""
|
||||||
|
|
||||||
__slots__ = (
|
__api_properties__ = (
|
||||||
"id",
|
"id",
|
||||||
"command",
|
"command",
|
||||||
"status",
|
"status",
|
||||||
|
@ -44,6 +44,7 @@ class Action(BaseDomain):
|
||||||
"started",
|
"started",
|
||||||
"finished",
|
"finished",
|
||||||
)
|
)
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
|
|
@ -34,7 +34,7 @@ class Certificate(BaseDomain, DomainIdentityMixin):
|
||||||
:param status: ManagedCertificateStatus Current status of a type managed Certificate, always none for type uploaded Certificates
|
:param status: ManagedCertificateStatus Current status of a type managed Certificate, always none for type uploaded Certificates
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = (
|
__api_properties__ = (
|
||||||
"id",
|
"id",
|
||||||
"name",
|
"name",
|
||||||
"certificate",
|
"certificate",
|
||||||
|
@ -47,6 +47,8 @@ class Certificate(BaseDomain, DomainIdentityMixin):
|
||||||
"type",
|
"type",
|
||||||
"status",
|
"status",
|
||||||
)
|
)
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
TYPE_UPLOADED = "uploaded"
|
TYPE_UPLOADED = "uploaded"
|
||||||
TYPE_MANAGED = "managed"
|
TYPE_MANAGED = "managed"
|
||||||
|
|
||||||
|
@ -122,7 +124,8 @@ class CreateManagedCertificateResponse(BaseDomain):
|
||||||
Shows the progress of the certificate creation
|
Shows the progress of the certificate creation
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("certificate", "action")
|
__api_properties__ = ("certificate", "action")
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
|
|
@ -2,23 +2,22 @@ from __future__ import annotations
|
||||||
|
|
||||||
|
|
||||||
class BaseDomain:
|
class BaseDomain:
|
||||||
__slots__ = ()
|
__api_properties__: tuple
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_dict(cls, data: dict): # type: ignore[no-untyped-def]
|
def from_dict(cls, data: dict): # type: ignore[no-untyped-def]
|
||||||
"""
|
"""
|
||||||
Build the domain object from the data dict.
|
Build the domain object from the data dict.
|
||||||
"""
|
"""
|
||||||
supported_data = {k: v for k, v in data.items() if k in cls.__slots__}
|
supported_data = {k: v for k, v in data.items() if k in cls.__api_properties__}
|
||||||
return cls(**supported_data)
|
return cls(**supported_data)
|
||||||
|
|
||||||
def __repr__(self) -> str:
|
def __repr__(self) -> str:
|
||||||
kwargs = [f"{key}={getattr(self, key)!r}" for key in self.__slots__] # type: ignore[var-annotated]
|
kwargs = [f"{key}={getattr(self, key)!r}" for key in self.__api_properties__] # type: ignore[var-annotated]
|
||||||
return f"{self.__class__.__qualname__}({', '.join(kwargs)})"
|
return f"{self.__class__.__qualname__}({', '.join(kwargs)})"
|
||||||
|
|
||||||
|
|
||||||
class DomainIdentityMixin:
|
class DomainIdentityMixin:
|
||||||
__slots__ = ()
|
|
||||||
|
|
||||||
id: int | None
|
id: int | None
|
||||||
name: str | None
|
name: str | None
|
||||||
|
@ -54,7 +53,7 @@ class DomainIdentityMixin:
|
||||||
|
|
||||||
|
|
||||||
class Pagination(BaseDomain):
|
class Pagination(BaseDomain):
|
||||||
__slots__ = (
|
__api_properties__ = (
|
||||||
"page",
|
"page",
|
||||||
"per_page",
|
"per_page",
|
||||||
"previous_page",
|
"previous_page",
|
||||||
|
@ -62,6 +61,7 @@ class Pagination(BaseDomain):
|
||||||
"last_page",
|
"last_page",
|
||||||
"total_entries",
|
"total_entries",
|
||||||
)
|
)
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -81,7 +81,8 @@ class Pagination(BaseDomain):
|
||||||
|
|
||||||
|
|
||||||
class Meta(BaseDomain):
|
class Meta(BaseDomain):
|
||||||
__slots__ = ("pagination",)
|
__api_properties__ = ("pagination",)
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(self, pagination: Pagination | None = None):
|
def __init__(self, pagination: Pagination | None = None):
|
||||||
self.pagination = pagination
|
self.pagination = pagination
|
||||||
|
|
|
@ -19,7 +19,8 @@ class Datacenter(BaseDomain, DomainIdentityMixin):
|
||||||
:param server_types: :class:`DatacenterServerTypes <hcloud.datacenters.domain.DatacenterServerTypes>`
|
:param server_types: :class:`DatacenterServerTypes <hcloud.datacenters.domain.DatacenterServerTypes>`
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("id", "name", "description", "location", "server_types")
|
__api_properties__ = ("id", "name", "description", "location", "server_types")
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -47,7 +48,8 @@ class DatacenterServerTypes(BaseDomain):
|
||||||
All available for migration (change type) server types for this datacenter
|
All available for migration (change type) server types for this datacenter
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("available", "supported", "available_for_migration")
|
__api_properties__ = ("available", "supported", "available_for_migration")
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
|
|
@ -20,10 +20,11 @@ class DeprecationInfo(BaseDomain):
|
||||||
new servers with this image after the mentioned date.
|
new servers with this image after the mentioned date.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = (
|
__api_properties__ = (
|
||||||
"announced",
|
"announced",
|
||||||
"unavailable_after",
|
"unavailable_after",
|
||||||
)
|
)
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
|
|
@ -32,7 +32,8 @@ class Firewall(BaseDomain, DomainIdentityMixin):
|
||||||
Point in time when the image was created
|
Point in time when the image was created
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("id", "name", "labels", "rules", "applied_to", "created")
|
__api_properties__ = ("id", "name", "labels", "rules", "applied_to", "created")
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -69,7 +70,7 @@ class FirewallRule(BaseDomain):
|
||||||
Short description of the firewall rule
|
Short description of the firewall rule
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = (
|
__api_properties__ = (
|
||||||
"direction",
|
"direction",
|
||||||
"port",
|
"port",
|
||||||
"protocol",
|
"protocol",
|
||||||
|
@ -77,6 +78,7 @@ class FirewallRule(BaseDomain):
|
||||||
"destination_ips",
|
"destination_ips",
|
||||||
"description",
|
"description",
|
||||||
)
|
)
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
DIRECTION_IN = "in"
|
DIRECTION_IN = "in"
|
||||||
"""Firewall Rule Direction In"""
|
"""Firewall Rule Direction In"""
|
||||||
|
@ -141,7 +143,8 @@ class FirewallResource(BaseDomain):
|
||||||
applied to.
|
applied to.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("type", "server", "label_selector", "applied_to_resources")
|
__api_properties__ = ("type", "server", "label_selector", "applied_to_resources")
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
TYPE_SERVER = "server"
|
TYPE_SERVER = "server"
|
||||||
"""Firewall Used By Type Server"""
|
"""Firewall Used By Type Server"""
|
||||||
|
@ -180,7 +183,8 @@ class FirewallResourceAppliedToResources(BaseDomain):
|
||||||
:param server: Server the Firewall is applied to
|
:param server: Server the Firewall is applied to
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("type", "server")
|
__api_properties__ = ("type", "server")
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -210,7 +214,8 @@ class CreateFirewallResponse(BaseDomain):
|
||||||
The Action which shows the progress of the Firewall Creation
|
The Action which shows the progress of the Firewall Creation
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("firewall", "actions")
|
__api_properties__ = ("firewall", "actions")
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
|
|
@ -45,7 +45,7 @@ class FloatingIP(BaseDomain, DomainIdentityMixin):
|
||||||
Name of the Floating IP
|
Name of the Floating IP
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = (
|
__api_properties__ = (
|
||||||
"id",
|
"id",
|
||||||
"type",
|
"type",
|
||||||
"description",
|
"description",
|
||||||
|
@ -59,6 +59,7 @@ class FloatingIP(BaseDomain, DomainIdentityMixin):
|
||||||
"name",
|
"name",
|
||||||
"created",
|
"created",
|
||||||
)
|
)
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -98,7 +99,8 @@ class CreateFloatingIPResponse(BaseDomain):
|
||||||
The Action which shows the progress of the Floating IP Creation
|
The Action which shows the progress of the Floating IP Creation
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("floating_ip", "action")
|
__api_properties__ = ("floating_ip", "action")
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
|
|
@ -54,7 +54,7 @@ class Image(BaseDomain, DomainIdentityMixin):
|
||||||
User-defined labels (key-value pairs)
|
User-defined labels (key-value pairs)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = (
|
__api_properties__ = (
|
||||||
"id",
|
"id",
|
||||||
"name",
|
"name",
|
||||||
"type",
|
"type",
|
||||||
|
@ -73,6 +73,7 @@ class Image(BaseDomain, DomainIdentityMixin):
|
||||||
"created",
|
"created",
|
||||||
"deprecated",
|
"deprecated",
|
||||||
)
|
)
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
# pylint: disable=too-many-locals
|
# pylint: disable=too-many-locals
|
||||||
def __init__(
|
def __init__(
|
||||||
|
@ -123,7 +124,8 @@ class CreateImageResponse(BaseDomain):
|
||||||
The Action which shows the progress of the Floating IP Creation
|
The Action which shows the progress of the Floating IP Creation
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("action", "image")
|
__api_properties__ = ("action", "image")
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
|
|
@ -27,7 +27,7 @@ class Iso(BaseDomain, DomainIdentityMixin):
|
||||||
deprecated. If it has a value, it is considered deprecated.
|
deprecated. If it has a value, it is considered deprecated.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = (
|
__api_properties__ = (
|
||||||
"id",
|
"id",
|
||||||
"name",
|
"name",
|
||||||
"type",
|
"type",
|
||||||
|
@ -35,6 +35,7 @@ class Iso(BaseDomain, DomainIdentityMixin):
|
||||||
"description",
|
"description",
|
||||||
"deprecation",
|
"deprecation",
|
||||||
)
|
)
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
|
|
@ -25,7 +25,7 @@ class LoadBalancerType(BaseDomain, DomainIdentityMixin):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = (
|
__api_properties__ = (
|
||||||
"id",
|
"id",
|
||||||
"name",
|
"name",
|
||||||
"description",
|
"description",
|
||||||
|
@ -35,6 +35,7 @@ class LoadBalancerType(BaseDomain, DomainIdentityMixin):
|
||||||
"max_assigned_certificates",
|
"max_assigned_certificates",
|
||||||
"prices",
|
"prices",
|
||||||
)
|
)
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
|
|
@ -55,7 +55,7 @@ class LoadBalancer(BaseDomain, DomainIdentityMixin):
|
||||||
Free Traffic for the current billing period in bytes
|
Free Traffic for the current billing period in bytes
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = (
|
__api_properties__ = (
|
||||||
"id",
|
"id",
|
||||||
"name",
|
"name",
|
||||||
"public_net",
|
"public_net",
|
||||||
|
@ -72,6 +72,7 @@ class LoadBalancer(BaseDomain, DomainIdentityMixin):
|
||||||
"ingoing_traffic",
|
"ingoing_traffic",
|
||||||
"included_traffic",
|
"included_traffic",
|
||||||
)
|
)
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
# pylint: disable=too-many-locals
|
# pylint: disable=too-many-locals
|
||||||
def __init__(
|
def __init__(
|
||||||
|
@ -425,7 +426,8 @@ class PublicNetwork(BaseDomain):
|
||||||
:param enabled: boolean
|
:param enabled: boolean
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("ipv4", "ipv6", "enabled")
|
__api_properties__ = ("ipv4", "ipv6", "enabled")
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -445,7 +447,8 @@ class IPv4Address(BaseDomain):
|
||||||
The IPv4 Address
|
The IPv4 Address
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("ip", "dns_ptr")
|
__api_properties__ = ("ip", "dns_ptr")
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -463,7 +466,8 @@ class IPv6Network(BaseDomain):
|
||||||
The IPv6 Network as CIDR Notation
|
The IPv6 Network as CIDR Notation
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("ip", "dns_ptr")
|
__api_properties__ = ("ip", "dns_ptr")
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -483,7 +487,8 @@ class PrivateNet(BaseDomain):
|
||||||
The main IP Address of the LoadBalancer in the Network
|
The main IP Address of the LoadBalancer in the Network
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("network", "ip")
|
__api_properties__ = ("network", "ip")
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -503,7 +508,8 @@ class CreateLoadBalancerResponse(BaseDomain):
|
||||||
Shows the progress of the Load Balancer creation
|
Shows the progress of the Load Balancer creation
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("load_balancer", "action")
|
__api_properties__ = ("load_balancer", "action")
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -528,7 +534,8 @@ class GetMetricsResponse(BaseDomain):
|
||||||
:param metrics: The Load Balancer metrics
|
:param metrics: The Load Balancer metrics
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("metrics",)
|
__api_properties__ = ("metrics",)
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
|
|
@ -24,7 +24,7 @@ class Location(BaseDomain, DomainIdentityMixin):
|
||||||
Name of network zone this location resides in
|
Name of network zone this location resides in
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = (
|
__api_properties__ = (
|
||||||
"id",
|
"id",
|
||||||
"name",
|
"name",
|
||||||
"description",
|
"description",
|
||||||
|
@ -34,6 +34,7 @@ class Location(BaseDomain, DomainIdentityMixin):
|
||||||
"longitude",
|
"longitude",
|
||||||
"network_zone",
|
"network_zone",
|
||||||
)
|
)
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
|
|
@ -29,12 +29,13 @@ class Metrics(BaseDomain):
|
||||||
step: float
|
step: float
|
||||||
time_series: TimeSeries
|
time_series: TimeSeries
|
||||||
|
|
||||||
__slots__ = (
|
__api_properties__ = (
|
||||||
"start",
|
"start",
|
||||||
"end",
|
"end",
|
||||||
"step",
|
"step",
|
||||||
"time_series",
|
"time_series",
|
||||||
)
|
)
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
|
|
@ -38,7 +38,7 @@ class Network(BaseDomain, DomainIdentityMixin):
|
||||||
User-defined labels (key-value pairs)
|
User-defined labels (key-value pairs)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = (
|
__api_properties__ = (
|
||||||
"id",
|
"id",
|
||||||
"name",
|
"name",
|
||||||
"ip_range",
|
"ip_range",
|
||||||
|
@ -50,6 +50,7 @@ class Network(BaseDomain, DomainIdentityMixin):
|
||||||
"labels",
|
"labels",
|
||||||
"created",
|
"created",
|
||||||
)
|
)
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -97,7 +98,9 @@ class NetworkSubnet(BaseDomain):
|
||||||
"""Subnet Type cloud"""
|
"""Subnet Type cloud"""
|
||||||
TYPE_VSWITCH = "vswitch"
|
TYPE_VSWITCH = "vswitch"
|
||||||
"""Subnet Type vSwitch"""
|
"""Subnet Type vSwitch"""
|
||||||
__slots__ = ("type", "ip_range", "network_zone", "gateway", "vswitch_id")
|
|
||||||
|
__api_properties__ = ("type", "ip_range", "network_zone", "gateway", "vswitch_id")
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -123,7 +126,8 @@ class NetworkRoute(BaseDomain):
|
||||||
Gateway for the route.
|
Gateway for the route.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("destination", "gateway")
|
__api_properties__ = ("destination", "gateway")
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(self, destination: str, gateway: str):
|
def __init__(self, destination: str, gateway: str):
|
||||||
self.destination = destination
|
self.destination = destination
|
||||||
|
@ -139,7 +143,8 @@ class CreateNetworkResponse(BaseDomain):
|
||||||
The Action which shows the progress of the network Creation
|
The Action which shows the progress of the network Creation
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("network", "action")
|
__api_properties__ = ("network", "action")
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
|
|
@ -31,7 +31,8 @@ class PlacementGroup(BaseDomain, DomainIdentityMixin):
|
||||||
Point in time when the image was created
|
Point in time when the image was created
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("id", "name", "labels", "servers", "type", "created")
|
__api_properties__ = ("id", "name", "labels", "servers", "type", "created")
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
"""Placement Group type spread
|
"""Placement Group type spread
|
||||||
spreads all servers in the group on different vhosts
|
spreads all servers in the group on different vhosts
|
||||||
|
@ -64,7 +65,8 @@ class CreatePlacementGroupResponse(BaseDomain):
|
||||||
The Action which shows the progress of the Placement Group Creation
|
The Action which shows the progress of the Placement Group Creation
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("placement_group", "action")
|
__api_properties__ = ("placement_group", "action")
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
|
|
@ -46,7 +46,7 @@ class PrimaryIP(BaseDomain, DomainIdentityMixin):
|
||||||
Delete the Primary IP when the Assignee it is assigned to is deleted.
|
Delete the Primary IP when the Assignee it is assigned to is deleted.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = (
|
__api_properties__ = (
|
||||||
"id",
|
"id",
|
||||||
"ip",
|
"ip",
|
||||||
"type",
|
"type",
|
||||||
|
@ -61,6 +61,7 @@ class PrimaryIP(BaseDomain, DomainIdentityMixin):
|
||||||
"assignee_type",
|
"assignee_type",
|
||||||
"auto_delete",
|
"auto_delete",
|
||||||
)
|
)
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -102,7 +103,8 @@ class CreatePrimaryIPResponse(BaseDomain):
|
||||||
The Action which shows the progress of the Primary IP Creation
|
The Action which shows the progress of the Primary IP Creation
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("primary_ip", "action")
|
__api_properties__ = ("primary_ip", "action")
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import warnings
|
||||||
|
|
||||||
from ..core import BaseDomain, DomainIdentityMixin
|
from ..core import BaseDomain, DomainIdentityMixin
|
||||||
from ..deprecation import DeprecationInfo
|
from ..deprecation import DeprecationInfo
|
||||||
|
|
||||||
|
@ -36,7 +38,7 @@ class ServerType(BaseDomain, DomainIdentityMixin):
|
||||||
Free traffic per month in bytes
|
Free traffic per month in bytes
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = (
|
__properties__ = (
|
||||||
"id",
|
"id",
|
||||||
"name",
|
"name",
|
||||||
"description",
|
"description",
|
||||||
|
@ -49,8 +51,15 @@ class ServerType(BaseDomain, DomainIdentityMixin):
|
||||||
"architecture",
|
"architecture",
|
||||||
"deprecated",
|
"deprecated",
|
||||||
"deprecation",
|
"deprecation",
|
||||||
|
)
|
||||||
|
__api_properties__ = (
|
||||||
|
*__properties__,
|
||||||
"included_traffic",
|
"included_traffic",
|
||||||
)
|
)
|
||||||
|
__slots__ = (
|
||||||
|
*__properties__,
|
||||||
|
"_included_traffic",
|
||||||
|
)
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -83,3 +92,25 @@ class ServerType(BaseDomain, DomainIdentityMixin):
|
||||||
DeprecationInfo.from_dict(deprecation) if deprecation is not None else None
|
DeprecationInfo.from_dict(deprecation) if deprecation is not None else None
|
||||||
)
|
)
|
||||||
self.included_traffic = included_traffic
|
self.included_traffic = included_traffic
|
||||||
|
|
||||||
|
@property
|
||||||
|
def included_traffic(self) -> int | None:
|
||||||
|
"""
|
||||||
|
.. deprecated:: 2.1.0
|
||||||
|
The 'included_traffic' property is deprecated and will be set to 'None' on 5 August 2024.
|
||||||
|
Please refer to the 'prices' property instead.
|
||||||
|
|
||||||
|
See https://docs.hetzner.cloud/changelog#2024-07-25-cloud-api-returns-traffic-information-in-different-format.
|
||||||
|
"""
|
||||||
|
warnings.warn(
|
||||||
|
"The 'included_traffic' property is deprecated and will be set to 'None' on 5 August 2024. "
|
||||||
|
"Please refer to the 'prices' property instead. "
|
||||||
|
"See https://docs.hetzner.cloud/changelog#2024-07-25-cloud-api-returns-traffic-information-in-different-format",
|
||||||
|
DeprecationWarning,
|
||||||
|
stacklevel=2,
|
||||||
|
)
|
||||||
|
return self._included_traffic
|
||||||
|
|
||||||
|
@included_traffic.setter
|
||||||
|
def included_traffic(self, value: int | None) -> None:
|
||||||
|
self._included_traffic = value
|
||||||
|
|
|
@ -84,7 +84,8 @@ class Server(BaseDomain, DomainIdentityMixin):
|
||||||
"""Server Status rebuilding"""
|
"""Server Status rebuilding"""
|
||||||
STATUS_UNKNOWN = "unknown"
|
STATUS_UNKNOWN = "unknown"
|
||||||
"""Server Status unknown"""
|
"""Server Status unknown"""
|
||||||
__slots__ = (
|
|
||||||
|
__api_properties__ = (
|
||||||
"id",
|
"id",
|
||||||
"name",
|
"name",
|
||||||
"status",
|
"status",
|
||||||
|
@ -107,6 +108,7 @@ class Server(BaseDomain, DomainIdentityMixin):
|
||||||
"primary_disk_size",
|
"primary_disk_size",
|
||||||
"placement_group",
|
"placement_group",
|
||||||
)
|
)
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
# pylint: disable=too-many-locals
|
# pylint: disable=too-many-locals
|
||||||
def __init__(
|
def __init__(
|
||||||
|
@ -169,7 +171,8 @@ class CreateServerResponse(BaseDomain):
|
||||||
The root password of the server if no SSH-Key was given on server creation
|
The root password of the server if no SSH-Key was given on server creation
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("server", "action", "next_actions", "root_password")
|
__api_properties__ = ("server", "action", "next_actions", "root_password")
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -193,7 +196,8 @@ class ResetPasswordResponse(BaseDomain):
|
||||||
The root password of the server
|
The root password of the server
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("action", "root_password")
|
__api_properties__ = ("action", "root_password")
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -213,7 +217,8 @@ class EnableRescueResponse(BaseDomain):
|
||||||
The root password of the server in the rescue mode
|
The root password of the server in the rescue mode
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("action", "root_password")
|
__api_properties__ = ("action", "root_password")
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -235,7 +240,8 @@ class RequestConsoleResponse(BaseDomain):
|
||||||
VNC password to use for this connection. This password only works in combination with a wss_url with valid token.
|
VNC password to use for this connection. This password only works in combination with a wss_url with valid token.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("action", "wss_url", "password")
|
__api_properties__ = ("action", "wss_url", "password")
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -255,7 +261,8 @@ class RebuildResponse(BaseDomain):
|
||||||
:param root_password: The root password of the server when not using SSH keys
|
:param root_password: The root password of the server when not using SSH keys
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("action", "root_password")
|
__api_properties__ = ("action", "root_password")
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -277,7 +284,7 @@ class PublicNetwork(BaseDomain):
|
||||||
:param firewalls: List[:class:`PublicNetworkFirewall <hcloud.servers.client.PublicNetworkFirewall>`]
|
:param firewalls: List[:class:`PublicNetworkFirewall <hcloud.servers.client.PublicNetworkFirewall>`]
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = (
|
__api_properties__ = (
|
||||||
"ipv4",
|
"ipv4",
|
||||||
"ipv6",
|
"ipv6",
|
||||||
"floating_ips",
|
"floating_ips",
|
||||||
|
@ -285,6 +292,7 @@ class PublicNetwork(BaseDomain):
|
||||||
"primary_ipv4",
|
"primary_ipv4",
|
||||||
"primary_ipv6",
|
"primary_ipv6",
|
||||||
)
|
)
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -310,7 +318,8 @@ class PublicNetworkFirewall(BaseDomain):
|
||||||
:param status: str
|
:param status: str
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("firewall", "status")
|
__api_properties__ = ("firewall", "status")
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
STATUS_APPLIED = "applied"
|
STATUS_APPLIED = "applied"
|
||||||
"""Public Network Firewall Status applied"""
|
"""Public Network Firewall Status applied"""
|
||||||
|
@ -337,7 +346,8 @@ class IPv4Address(BaseDomain):
|
||||||
DNS PTR for the ip
|
DNS PTR for the ip
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("ip", "blocked", "dns_ptr")
|
__api_properties__ = ("ip", "blocked", "dns_ptr")
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -365,7 +375,8 @@ class IPv6Network(BaseDomain):
|
||||||
The network mask
|
The network mask
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("ip", "blocked", "dns_ptr", "network", "network_mask")
|
__api_properties__ = ("ip", "blocked", "dns_ptr", "network", "network_mask")
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -394,7 +405,8 @@ class PrivateNet(BaseDomain):
|
||||||
The mac address of the interface on the server
|
The mac address of the interface on the server
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("network", "ip", "alias_ips", "mac_address")
|
__api_properties__ = ("network", "ip", "alias_ips", "mac_address")
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -418,7 +430,8 @@ class ServerCreatePublicNetwork(BaseDomain):
|
||||||
:param enable_ipv6: bool
|
:param enable_ipv6: bool
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("ipv4", "ipv6", "enable_ipv4", "enable_ipv6")
|
__api_properties__ = ("ipv4", "ipv6", "enable_ipv4", "enable_ipv6")
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -446,7 +459,8 @@ class GetMetricsResponse(BaseDomain):
|
||||||
:param metrics: The Server metrics
|
:param metrics: The Server metrics
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("metrics",)
|
__api_properties__ = ("metrics",)
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
|
|
@ -25,7 +25,15 @@ class SSHKey(BaseDomain, DomainIdentityMixin):
|
||||||
Point in time when the SSH Key was created
|
Point in time when the SSH Key was created
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("id", "name", "fingerprint", "public_key", "labels", "created")
|
__api_properties__ = (
|
||||||
|
"id",
|
||||||
|
"name",
|
||||||
|
"fingerprint",
|
||||||
|
"public_key",
|
||||||
|
"labels",
|
||||||
|
"created",
|
||||||
|
)
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
|
|
@ -48,7 +48,7 @@ class Volume(BaseDomain, DomainIdentityMixin):
|
||||||
STATUS_AVAILABLE = "available"
|
STATUS_AVAILABLE = "available"
|
||||||
"""Volume Status available"""
|
"""Volume Status available"""
|
||||||
|
|
||||||
__slots__ = (
|
__api_properties__ = (
|
||||||
"id",
|
"id",
|
||||||
"name",
|
"name",
|
||||||
"server",
|
"server",
|
||||||
|
@ -61,6 +61,7 @@ class Volume(BaseDomain, DomainIdentityMixin):
|
||||||
"status",
|
"status",
|
||||||
"created",
|
"created",
|
||||||
)
|
)
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -100,7 +101,8 @@ class CreateVolumeResponse(BaseDomain):
|
||||||
List of actions that are performed after the creation, like attaching to a server
|
List of actions that are performed after the creation, like attaching to a server
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ("volume", "action", "next_actions")
|
__api_properties__ = ("volume", "action", "next_actions")
|
||||||
|
__slots__ = __api_properties__
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
|
|
@ -22,7 +22,7 @@ from textwrap import dedent
|
||||||
logger = logging.getLogger("vendor")
|
logger = logging.getLogger("vendor")
|
||||||
|
|
||||||
HCLOUD_SOURCE_URL = "https://github.com/hetznercloud/hcloud-python"
|
HCLOUD_SOURCE_URL = "https://github.com/hetznercloud/hcloud-python"
|
||||||
HCLOUD_VERSION = "v2.0.1"
|
HCLOUD_VERSION = "v2.1.0"
|
||||||
HCLOUD_VENDOR_PATH = "plugins/module_utils/vendor/hcloud"
|
HCLOUD_VENDOR_PATH = "plugins/module_utils/vendor/hcloud"
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue