From 13a09483912b9437205964f6faf311d640c88ca1 Mon Sep 17 00:00:00 2001 From: jo Date: Mon, 23 Mar 2026 11:13:40 +0100 Subject: [PATCH] fix: missing internal property on LoadBalancerService --- hcloud/load_balancers/domain.py | 10 ++++++++++ tests/unit/core/test_domain.py | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/hcloud/load_balancers/domain.py b/hcloud/load_balancers/domain.py index 8bad4ded..17ad807e 100644 --- a/hcloud/load_balancers/domain.py +++ b/hcloud/load_balancers/domain.py @@ -160,6 +160,16 @@ class LoadBalancerService(BaseDomain): Configuration for http/https protocols, required when protocol is http/https """ + __api_properties__ = ( + "protocol", + "listen_port", + "destination_port", + "proxyprotocol", + "health_check", + "http", + ) + __slots__ = __api_properties__ + def __init__( self, protocol: str | None = None, diff --git a/tests/unit/core/test_domain.py b/tests/unit/core/test_domain.py index bfef1129..280dc3cb 100644 --- a/tests/unit/core/test_domain.py +++ b/tests/unit/core/test_domain.py @@ -191,3 +191,9 @@ def test_nested_list__eq__(self): d2.child = [ActionDomain(id=2, name="child2")] assert d1 != d2 + + +def test_base_domain_subclasses(): + for c in BaseDomain.__subclasses__(): + assert len(c.__api_properties__) > 0 + assert len(c.__slots__) > 0