stackit-loadbalancer 0.2.4__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/PKG-INFO +1 -1
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/pyproject.toml +1 -1
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/__init__.py +1 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/__init__.py +1 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/create_load_balancer_payload.py +17 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/load_balancer.py +17 -0
- stackit_loadbalancer-0.3.0/src/stackit/loadbalancer/models/security_group.py +82 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/update_load_balancer_payload.py +17 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/LICENSE.md +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/NOTICE.txt +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/README.md +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/api/__init__.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/api/default_api.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/api_client.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/api_response.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/configuration.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/exceptions.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/active_health_check.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/create_credentials_payload.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/create_credentials_response.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/credentials_response.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/get_credentials_response.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/get_quota_response.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/google_protobuf_any.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/list_credentials_response.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/list_load_balancers_response.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/list_plans_response.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/listener.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/load_balancer_error.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/load_balancer_options.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/loadbalancer_option_access_control.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/loadbalancer_option_logs.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/loadbalancer_option_metrics.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/loadbalancer_option_observability.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/network.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/options_tcp.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/options_udp.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/plan_details.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/server_name_indicator.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/session_persistence.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/status.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/target.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/target_pool.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/update_credentials_payload.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/update_credentials_response.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/update_target_pool_payload.py +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/py.typed +0 -0
- {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/rest.py +0 -0
{stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/__init__.py
RENAMED
|
@@ -72,6 +72,7 @@ from stackit.loadbalancer.models.network import Network
|
|
|
72
72
|
from stackit.loadbalancer.models.options_tcp import OptionsTCP
|
|
73
73
|
from stackit.loadbalancer.models.options_udp import OptionsUDP
|
|
74
74
|
from stackit.loadbalancer.models.plan_details import PlanDetails
|
|
75
|
+
from stackit.loadbalancer.models.security_group import SecurityGroup
|
|
75
76
|
from stackit.loadbalancer.models.server_name_indicator import ServerNameIndicator
|
|
76
77
|
from stackit.loadbalancer.models.session_persistence import SessionPersistence
|
|
77
78
|
from stackit.loadbalancer.models.status import Status
|
|
@@ -53,6 +53,7 @@ from stackit.loadbalancer.models.network import Network
|
|
|
53
53
|
from stackit.loadbalancer.models.options_tcp import OptionsTCP
|
|
54
54
|
from stackit.loadbalancer.models.options_udp import OptionsUDP
|
|
55
55
|
from stackit.loadbalancer.models.plan_details import PlanDetails
|
|
56
|
+
from stackit.loadbalancer.models.security_group import SecurityGroup
|
|
56
57
|
from stackit.loadbalancer.models.server_name_indicator import ServerNameIndicator
|
|
57
58
|
from stackit.loadbalancer.models.session_persistence import SessionPersistence
|
|
58
59
|
from stackit.loadbalancer.models.status import Status
|
|
@@ -25,6 +25,7 @@ from stackit.loadbalancer.models.listener import Listener
|
|
|
25
25
|
from stackit.loadbalancer.models.load_balancer_error import LoadBalancerError
|
|
26
26
|
from stackit.loadbalancer.models.load_balancer_options import LoadBalancerOptions
|
|
27
27
|
from stackit.loadbalancer.models.network import Network
|
|
28
|
+
from stackit.loadbalancer.models.security_group import SecurityGroup
|
|
28
29
|
from stackit.loadbalancer.models.target_pool import TargetPool
|
|
29
30
|
|
|
30
31
|
|
|
@@ -70,6 +71,11 @@ class CreateLoadBalancerPayload(BaseModel):
|
|
|
70
71
|
description="List of all target pools which will be used in the load balancer. Limited to 20.",
|
|
71
72
|
alias="targetPools",
|
|
72
73
|
)
|
|
74
|
+
target_security_group: Optional[SecurityGroup] = Field(
|
|
75
|
+
default=None,
|
|
76
|
+
description="Security Group permitting network traffic from the LoadBalancer to the targets.",
|
|
77
|
+
alias="targetSecurityGroup",
|
|
78
|
+
)
|
|
73
79
|
version: Optional[StrictStr] = Field(
|
|
74
80
|
default=None,
|
|
75
81
|
description="Load balancer resource version. Must be empty or unset for creating load balancers, non-empty for updating load balancers. Semantics: While retrieving load balancers, this is the current version of this load balancer resource that changes during updates of the load balancers. On updates this field specified the load balancer version you calculated your update for instead of the future version to enable concurrency safe updates. Update calls will then report the new version in their result as you would see with a load balancer retrieval call later. There exist no total order of the version, so you can only compare it for equality, but not for less/greater than another version. Since the creation of load balancer is always intended to create the first version of it, there should be no existing version. That's why this field must by empty of not present in that case.",
|
|
@@ -86,6 +92,7 @@ class CreateLoadBalancerPayload(BaseModel):
|
|
|
86
92
|
"region",
|
|
87
93
|
"status",
|
|
88
94
|
"targetPools",
|
|
95
|
+
"targetSecurityGroup",
|
|
89
96
|
"version",
|
|
90
97
|
]
|
|
91
98
|
|
|
@@ -146,6 +153,7 @@ class CreateLoadBalancerPayload(BaseModel):
|
|
|
146
153
|
* OpenAPI `readOnly` fields are excluded.
|
|
147
154
|
* OpenAPI `readOnly` fields are excluded.
|
|
148
155
|
* OpenAPI `readOnly` fields are excluded.
|
|
156
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
149
157
|
"""
|
|
150
158
|
excluded_fields: Set[str] = set(
|
|
151
159
|
[
|
|
@@ -153,6 +161,7 @@ class CreateLoadBalancerPayload(BaseModel):
|
|
|
153
161
|
"private_address",
|
|
154
162
|
"region",
|
|
155
163
|
"status",
|
|
164
|
+
"target_security_group",
|
|
156
165
|
]
|
|
157
166
|
)
|
|
158
167
|
|
|
@@ -192,6 +201,9 @@ class CreateLoadBalancerPayload(BaseModel):
|
|
|
192
201
|
if _item:
|
|
193
202
|
_items.append(_item.to_dict())
|
|
194
203
|
_dict["targetPools"] = _items
|
|
204
|
+
# override the default output from pydantic by calling `to_dict()` of target_security_group
|
|
205
|
+
if self.target_security_group:
|
|
206
|
+
_dict["targetSecurityGroup"] = self.target_security_group.to_dict()
|
|
195
207
|
return _dict
|
|
196
208
|
|
|
197
209
|
@classmethod
|
|
@@ -230,6 +242,11 @@ class CreateLoadBalancerPayload(BaseModel):
|
|
|
230
242
|
if obj.get("targetPools") is not None
|
|
231
243
|
else None
|
|
232
244
|
),
|
|
245
|
+
"targetSecurityGroup": (
|
|
246
|
+
SecurityGroup.from_dict(obj["targetSecurityGroup"])
|
|
247
|
+
if obj.get("targetSecurityGroup") is not None
|
|
248
|
+
else None
|
|
249
|
+
),
|
|
233
250
|
"version": obj.get("version"),
|
|
234
251
|
}
|
|
235
252
|
)
|
|
@@ -25,6 +25,7 @@ from stackit.loadbalancer.models.listener import Listener
|
|
|
25
25
|
from stackit.loadbalancer.models.load_balancer_error import LoadBalancerError
|
|
26
26
|
from stackit.loadbalancer.models.load_balancer_options import LoadBalancerOptions
|
|
27
27
|
from stackit.loadbalancer.models.network import Network
|
|
28
|
+
from stackit.loadbalancer.models.security_group import SecurityGroup
|
|
28
29
|
from stackit.loadbalancer.models.target_pool import TargetPool
|
|
29
30
|
|
|
30
31
|
|
|
@@ -70,6 +71,11 @@ class LoadBalancer(BaseModel):
|
|
|
70
71
|
description="List of all target pools which will be used in the load balancer. Limited to 20.",
|
|
71
72
|
alias="targetPools",
|
|
72
73
|
)
|
|
74
|
+
target_security_group: Optional[SecurityGroup] = Field(
|
|
75
|
+
default=None,
|
|
76
|
+
description="Security Group permitting network traffic from the LoadBalancer to the targets.",
|
|
77
|
+
alias="targetSecurityGroup",
|
|
78
|
+
)
|
|
73
79
|
version: Optional[StrictStr] = Field(
|
|
74
80
|
default=None,
|
|
75
81
|
description="Load balancer resource version. Must be empty or unset for creating load balancers, non-empty for updating load balancers. Semantics: While retrieving load balancers, this is the current version of this load balancer resource that changes during updates of the load balancers. On updates this field specified the load balancer version you calculated your update for instead of the future version to enable concurrency safe updates. Update calls will then report the new version in their result as you would see with a load balancer retrieval call later. There exist no total order of the version, so you can only compare it for equality, but not for less/greater than another version. Since the creation of load balancer is always intended to create the first version of it, there should be no existing version. That's why this field must by empty of not present in that case.",
|
|
@@ -86,6 +92,7 @@ class LoadBalancer(BaseModel):
|
|
|
86
92
|
"region",
|
|
87
93
|
"status",
|
|
88
94
|
"targetPools",
|
|
95
|
+
"targetSecurityGroup",
|
|
89
96
|
"version",
|
|
90
97
|
]
|
|
91
98
|
|
|
@@ -146,6 +153,7 @@ class LoadBalancer(BaseModel):
|
|
|
146
153
|
* OpenAPI `readOnly` fields are excluded.
|
|
147
154
|
* OpenAPI `readOnly` fields are excluded.
|
|
148
155
|
* OpenAPI `readOnly` fields are excluded.
|
|
156
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
149
157
|
"""
|
|
150
158
|
excluded_fields: Set[str] = set(
|
|
151
159
|
[
|
|
@@ -153,6 +161,7 @@ class LoadBalancer(BaseModel):
|
|
|
153
161
|
"private_address",
|
|
154
162
|
"region",
|
|
155
163
|
"status",
|
|
164
|
+
"target_security_group",
|
|
156
165
|
]
|
|
157
166
|
)
|
|
158
167
|
|
|
@@ -192,6 +201,9 @@ class LoadBalancer(BaseModel):
|
|
|
192
201
|
if _item:
|
|
193
202
|
_items.append(_item.to_dict())
|
|
194
203
|
_dict["targetPools"] = _items
|
|
204
|
+
# override the default output from pydantic by calling `to_dict()` of target_security_group
|
|
205
|
+
if self.target_security_group:
|
|
206
|
+
_dict["targetSecurityGroup"] = self.target_security_group.to_dict()
|
|
195
207
|
return _dict
|
|
196
208
|
|
|
197
209
|
@classmethod
|
|
@@ -230,6 +242,11 @@ class LoadBalancer(BaseModel):
|
|
|
230
242
|
if obj.get("targetPools") is not None
|
|
231
243
|
else None
|
|
232
244
|
),
|
|
245
|
+
"targetSecurityGroup": (
|
|
246
|
+
SecurityGroup.from_dict(obj["targetSecurityGroup"])
|
|
247
|
+
if obj.get("targetSecurityGroup") is not None
|
|
248
|
+
else None
|
|
249
|
+
),
|
|
233
250
|
"version": obj.get("version"),
|
|
234
251
|
}
|
|
235
252
|
)
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Load Balancer API
|
|
5
|
+
|
|
6
|
+
This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501 docstring might be too long
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import json
|
|
17
|
+
import pprint
|
|
18
|
+
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing_extensions import Self
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class SecurityGroup(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
SecurityGroup
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
id: Optional[StrictStr] = Field(default=None, description="ID of the security Group")
|
|
30
|
+
name: Optional[StrictStr] = Field(default=None, description="Name of the security Group")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["id", "name"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
def to_str(self) -> str:
|
|
40
|
+
"""Returns the string representation of the model using alias"""
|
|
41
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
42
|
+
|
|
43
|
+
def to_json(self) -> str:
|
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
|
45
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
46
|
+
return json.dumps(self.to_dict())
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
50
|
+
"""Create an instance of SecurityGroup from a JSON string"""
|
|
51
|
+
return cls.from_dict(json.loads(json_str))
|
|
52
|
+
|
|
53
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
54
|
+
"""Return the dictionary representation of the model using alias.
|
|
55
|
+
|
|
56
|
+
This has the following differences from calling pydantic's
|
|
57
|
+
`self.model_dump(by_alias=True)`:
|
|
58
|
+
|
|
59
|
+
* `None` is only added to the output dict for nullable fields that
|
|
60
|
+
were set at model initialization. Other fields with value `None`
|
|
61
|
+
are ignored.
|
|
62
|
+
"""
|
|
63
|
+
excluded_fields: Set[str] = set([])
|
|
64
|
+
|
|
65
|
+
_dict = self.model_dump(
|
|
66
|
+
by_alias=True,
|
|
67
|
+
exclude=excluded_fields,
|
|
68
|
+
exclude_none=True,
|
|
69
|
+
)
|
|
70
|
+
return _dict
|
|
71
|
+
|
|
72
|
+
@classmethod
|
|
73
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
74
|
+
"""Create an instance of SecurityGroup from a dict"""
|
|
75
|
+
if obj is None:
|
|
76
|
+
return None
|
|
77
|
+
|
|
78
|
+
if not isinstance(obj, dict):
|
|
79
|
+
return cls.model_validate(obj)
|
|
80
|
+
|
|
81
|
+
_obj = cls.model_validate({"id": obj.get("id"), "name": obj.get("name")})
|
|
82
|
+
return _obj
|
|
@@ -25,6 +25,7 @@ from stackit.loadbalancer.models.listener import Listener
|
|
|
25
25
|
from stackit.loadbalancer.models.load_balancer_error import LoadBalancerError
|
|
26
26
|
from stackit.loadbalancer.models.load_balancer_options import LoadBalancerOptions
|
|
27
27
|
from stackit.loadbalancer.models.network import Network
|
|
28
|
+
from stackit.loadbalancer.models.security_group import SecurityGroup
|
|
28
29
|
from stackit.loadbalancer.models.target_pool import TargetPool
|
|
29
30
|
|
|
30
31
|
|
|
@@ -70,6 +71,11 @@ class UpdateLoadBalancerPayload(BaseModel):
|
|
|
70
71
|
description="List of all target pools which will be used in the load balancer. Limited to 20.",
|
|
71
72
|
alias="targetPools",
|
|
72
73
|
)
|
|
74
|
+
target_security_group: Optional[SecurityGroup] = Field(
|
|
75
|
+
default=None,
|
|
76
|
+
description="Security Group permitting network traffic from the LoadBalancer to the targets.",
|
|
77
|
+
alias="targetSecurityGroup",
|
|
78
|
+
)
|
|
73
79
|
version: Optional[StrictStr] = Field(
|
|
74
80
|
default=None,
|
|
75
81
|
description="Load balancer resource version. Must be empty or unset for creating load balancers, non-empty for updating load balancers. Semantics: While retrieving load balancers, this is the current version of this load balancer resource that changes during updates of the load balancers. On updates this field specified the load balancer version you calculated your update for instead of the future version to enable concurrency safe updates. Update calls will then report the new version in their result as you would see with a load balancer retrieval call later. There exist no total order of the version, so you can only compare it for equality, but not for less/greater than another version. Since the creation of load balancer is always intended to create the first version of it, there should be no existing version. That's why this field must by empty of not present in that case.",
|
|
@@ -86,6 +92,7 @@ class UpdateLoadBalancerPayload(BaseModel):
|
|
|
86
92
|
"region",
|
|
87
93
|
"status",
|
|
88
94
|
"targetPools",
|
|
95
|
+
"targetSecurityGroup",
|
|
89
96
|
"version",
|
|
90
97
|
]
|
|
91
98
|
|
|
@@ -146,6 +153,7 @@ class UpdateLoadBalancerPayload(BaseModel):
|
|
|
146
153
|
* OpenAPI `readOnly` fields are excluded.
|
|
147
154
|
* OpenAPI `readOnly` fields are excluded.
|
|
148
155
|
* OpenAPI `readOnly` fields are excluded.
|
|
156
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
149
157
|
"""
|
|
150
158
|
excluded_fields: Set[str] = set(
|
|
151
159
|
[
|
|
@@ -153,6 +161,7 @@ class UpdateLoadBalancerPayload(BaseModel):
|
|
|
153
161
|
"private_address",
|
|
154
162
|
"region",
|
|
155
163
|
"status",
|
|
164
|
+
"target_security_group",
|
|
156
165
|
]
|
|
157
166
|
)
|
|
158
167
|
|
|
@@ -192,6 +201,9 @@ class UpdateLoadBalancerPayload(BaseModel):
|
|
|
192
201
|
if _item:
|
|
193
202
|
_items.append(_item.to_dict())
|
|
194
203
|
_dict["targetPools"] = _items
|
|
204
|
+
# override the default output from pydantic by calling `to_dict()` of target_security_group
|
|
205
|
+
if self.target_security_group:
|
|
206
|
+
_dict["targetSecurityGroup"] = self.target_security_group.to_dict()
|
|
195
207
|
return _dict
|
|
196
208
|
|
|
197
209
|
@classmethod
|
|
@@ -230,6 +242,11 @@ class UpdateLoadBalancerPayload(BaseModel):
|
|
|
230
242
|
if obj.get("targetPools") is not None
|
|
231
243
|
else None
|
|
232
244
|
),
|
|
245
|
+
"targetSecurityGroup": (
|
|
246
|
+
SecurityGroup.from_dict(obj["targetSecurityGroup"])
|
|
247
|
+
if obj.get("targetSecurityGroup") is not None
|
|
248
|
+
else None
|
|
249
|
+
),
|
|
233
250
|
"version": obj.get("version"),
|
|
234
251
|
}
|
|
235
252
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/api/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/api_client.py
RENAMED
|
File without changes
|
{stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/api_response.py
RENAMED
|
File without changes
|
{stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/configuration.py
RENAMED
|
File without changes
|
{stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/network.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/status.py
RENAMED
|
File without changes
|
{stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.3.0}/src/stackit/loadbalancer/models/target.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|