mirror of
https://github.com/ansible-collections/hetzner.hcloud.git
synced 2026-02-04 08:01:49 +00:00
chore: update vendored files
This commit is contained in:
parent
fee0404c35
commit
2a0c1962a8
5 changed files with 101 additions and 7 deletions
|
|
@ -1,3 +1,3 @@
|
|||
from __future__ import annotations
|
||||
|
||||
__version__ = "2.5.3" # x-releaser-pleaser-version
|
||||
__version__ = "2.5.4" # x-releaser-pleaser-version
|
||||
|
|
|
|||
|
|
@ -90,6 +90,13 @@ class ManagedCertificateStatus(BaseDomain):
|
|||
If issuance or renewal reports failure, this property contains information about what happened
|
||||
"""
|
||||
|
||||
__api_properties__ = (
|
||||
"issuance",
|
||||
"renewal",
|
||||
"error",
|
||||
)
|
||||
__slots__ = __api_properties__
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
issuance: str | None = None,
|
||||
|
|
@ -110,6 +117,12 @@ class ManagedCertificateError(BaseDomain):
|
|||
Message detailing the error
|
||||
"""
|
||||
|
||||
__api_properties__ = (
|
||||
"code",
|
||||
"message",
|
||||
)
|
||||
__slots__ = __api_properties__
|
||||
|
||||
def __init__(self, code: str | None = None, message: str | None = None):
|
||||
self.code = code
|
||||
self.message = message
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ from .domain import (
|
|||
LoadBalancerAlgorithm,
|
||||
LoadBalancerHealtCheckHttp,
|
||||
LoadBalancerHealthCheck,
|
||||
LoadBalancerHealthCheckHttp,
|
||||
LoadBalancerService,
|
||||
LoadBalancerServiceHttp,
|
||||
LoadBalancerTarget,
|
||||
|
|
@ -33,6 +34,7 @@ __all__ = [
|
|||
"LoadBalancer",
|
||||
"LoadBalancerAlgorithm",
|
||||
"LoadBalancerHealtCheckHttp",
|
||||
"LoadBalancerHealthCheckHttp",
|
||||
"LoadBalancerHealthCheck",
|
||||
"LoadBalancerService",
|
||||
"LoadBalancerServiceHttp",
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ from .domain import (
|
|||
IPv6Network,
|
||||
LoadBalancer,
|
||||
LoadBalancerAlgorithm,
|
||||
LoadBalancerHealtCheckHttp,
|
||||
LoadBalancerHealthCheck,
|
||||
LoadBalancerHealthCheckHttp,
|
||||
LoadBalancerService,
|
||||
LoadBalancerServiceHttp,
|
||||
LoadBalancerTarget,
|
||||
|
|
@ -142,7 +142,7 @@ class BoundLoadBalancer(BoundModelBase, LoadBalancer):
|
|||
timeout=service["health_check"]["timeout"],
|
||||
)
|
||||
if tmp_service.health_check.protocol != "tcp":
|
||||
tmp_service.health_check.http = LoadBalancerHealtCheckHttp(
|
||||
tmp_service.health_check.http = LoadBalancerHealthCheckHttp(
|
||||
domain=service["health_check"]["http"]["domain"],
|
||||
path=service["health_check"]["http"]["path"],
|
||||
response=service["health_check"]["http"]["response"],
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import warnings
|
||||
from typing import TYPE_CHECKING, Any, Literal
|
||||
|
||||
try:
|
||||
|
|
@ -231,6 +232,15 @@ class LoadBalancerServiceHttp(BaseDomain):
|
|||
Use sticky sessions. Only available if protocol is "http" or "https".
|
||||
"""
|
||||
|
||||
__api_properties__ = (
|
||||
"cookie_name",
|
||||
"cookie_lifetime",
|
||||
"certificates",
|
||||
"redirect_http",
|
||||
"sticky_sessions",
|
||||
)
|
||||
__slots__ = __api_properties__
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
cookie_name: str | None = None,
|
||||
|
|
@ -259,10 +269,20 @@ class LoadBalancerHealthCheck(BaseDomain):
|
|||
Timeout in sec after a try is assumed as timeout
|
||||
:param retries: int
|
||||
Retries we perform until we assume a target as unhealthy
|
||||
:param http: LoadBalancerHealtCheckHttp
|
||||
:param http: LoadBalancerHealthCheckHttp
|
||||
HTTP Config
|
||||
"""
|
||||
|
||||
__api_properties__ = (
|
||||
"protocol",
|
||||
"port",
|
||||
"interval",
|
||||
"timeout",
|
||||
"retries",
|
||||
"http",
|
||||
)
|
||||
__slots__ = __api_properties__
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
protocol: str | None = None,
|
||||
|
|
@ -270,7 +290,7 @@ class LoadBalancerHealthCheck(BaseDomain):
|
|||
interval: int | None = None,
|
||||
timeout: int | None = None,
|
||||
retries: int | None = None,
|
||||
http: LoadBalancerHealtCheckHttp | None = None,
|
||||
http: LoadBalancerHealthCheckHttp | None = None,
|
||||
):
|
||||
self.protocol = protocol
|
||||
self.port = port
|
||||
|
|
@ -280,8 +300,8 @@ class LoadBalancerHealthCheck(BaseDomain):
|
|||
self.http = http
|
||||
|
||||
|
||||
class LoadBalancerHealtCheckHttp(BaseDomain):
|
||||
"""LoadBalancerHealtCheckHttp Domain
|
||||
class LoadBalancerHealthCheckHttp(BaseDomain):
|
||||
"""LoadBalancerHealthCheckHttp Domain
|
||||
|
||||
:param domain: str
|
||||
Domain name to send in HTTP request. Can be null: In that case we will not send a domain name
|
||||
|
|
@ -295,6 +315,15 @@ class LoadBalancerHealtCheckHttp(BaseDomain):
|
|||
Type of health check
|
||||
"""
|
||||
|
||||
__api_properties__ = (
|
||||
"domain",
|
||||
"path",
|
||||
"response",
|
||||
"status_codes",
|
||||
"tls",
|
||||
)
|
||||
__slots__ = __api_properties__
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
domain: str | None = None,
|
||||
|
|
@ -310,6 +339,31 @@ class LoadBalancerHealtCheckHttp(BaseDomain):
|
|||
self.tls = tls
|
||||
|
||||
|
||||
class LoadBalancerHealtCheckHttp(LoadBalancerHealthCheckHttp):
|
||||
"""
|
||||
Kept for backward compatibility.
|
||||
|
||||
.. deprecated:: 2.5.4
|
||||
Use :class:``hcloud.load_balancers.domain.LoadBalancerHealthCheckHttp`` instead.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
domain: str | None = None,
|
||||
path: str | None = None,
|
||||
response: str | None = None,
|
||||
status_codes: list | None = None,
|
||||
tls: bool | None = None,
|
||||
):
|
||||
warnings.warn(
|
||||
"The 'hcloud.load_balancers.domain.LoadBalancerHealtCheckHttp' class is deprecated, please use the "
|
||||
"'hcloud.load_balancers.domain.LoadBalancerHealthCheckHttp' class instead.",
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
super().__init__(domain, path, response, status_codes, tls)
|
||||
|
||||
|
||||
class LoadBalancerTarget(BaseDomain):
|
||||
"""LoadBalancerTarget Domain
|
||||
|
||||
|
|
@ -327,6 +381,16 @@ class LoadBalancerTarget(BaseDomain):
|
|||
List of health statuses of the services on this target. Only present for target types "server" and "ip".
|
||||
"""
|
||||
|
||||
__api_properties__ = (
|
||||
"type",
|
||||
"server",
|
||||
"label_selector",
|
||||
"ip",
|
||||
"use_private_ip",
|
||||
"health_status",
|
||||
)
|
||||
__slots__ = __api_properties__
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
type: str | None = None,
|
||||
|
|
@ -378,6 +442,12 @@ class LoadBalancerTargetHealthStatus(BaseDomain):
|
|||
:param status: Load Balancer Target status. Choices: healthy, unhealthy, unknown
|
||||
"""
|
||||
|
||||
__api_properties__ = (
|
||||
"listen_port",
|
||||
"status",
|
||||
)
|
||||
__slots__ = __api_properties__
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
listen_port: int | None = None,
|
||||
|
|
@ -393,6 +463,9 @@ class LoadBalancerTargetLabelSelector(BaseDomain):
|
|||
:param selector: str Target label selector
|
||||
"""
|
||||
|
||||
__api_properties__ = ("selector",)
|
||||
__slots__ = __api_properties__
|
||||
|
||||
def __init__(self, selector: str | None = None):
|
||||
self.selector = selector
|
||||
|
||||
|
|
@ -403,6 +476,9 @@ class LoadBalancerTargetIP(BaseDomain):
|
|||
:param ip: str Target IP
|
||||
"""
|
||||
|
||||
__api_properties__ = ("ip",)
|
||||
__slots__ = __api_properties__
|
||||
|
||||
def __init__(self, ip: str | None = None):
|
||||
self.ip = ip
|
||||
|
||||
|
|
@ -414,6 +490,9 @@ class LoadBalancerAlgorithm(BaseDomain):
|
|||
Algorithm of the Load Balancer. Choices: round_robin, least_connections
|
||||
"""
|
||||
|
||||
__api_properties__ = ("type",)
|
||||
__slots__ = __api_properties__
|
||||
|
||||
def __init__(self, type: str | None = None):
|
||||
self.type = type
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue