Skip to content

Commit 1c6f0a0

Browse files
stackit-pipelinerubenhoenle
authored andcommitted
Generate loadbalancer
1 parent 010ab88 commit 1c6f0a0

File tree

3 files changed

+48
-6
lines changed

3 files changed

+48
-6
lines changed

services/loadbalancer/src/stackit/loadbalancer/models/create_load_balancer_payload.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,14 @@
1818
import re
1919
from typing import Any, ClassVar, Dict, List, Optional, Set
2020

21-
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
21+
from pydantic import (
22+
BaseModel,
23+
ConfigDict,
24+
Field,
25+
StrictBool,
26+
StrictStr,
27+
field_validator,
28+
)
2229
from typing_extensions import Annotated, Self
2330

2431
from stackit.loadbalancer.models.listener import Listener
@@ -34,6 +41,11 @@ class CreateLoadBalancerPayload(BaseModel):
3441
CreateLoadBalancerPayload
3542
"""
3643

44+
disable_target_security_group_assignment: Optional[StrictBool] = Field(
45+
default=None,
46+
description="Disable target security group assignemt to allow targets outside of the given network. Connectivity to targets need to be ensured by the customer, including routing and Security Groups (targetSecurityGroup can be assigned). Not changeable after creation.",
47+
alias="disableTargetSecurityGroupAssignment",
48+
)
3749
errors: Optional[List[LoadBalancerError]] = Field(
3850
default=None, description="Reports all errors a load balancer has."
3951
)
@@ -73,14 +85,15 @@ class CreateLoadBalancerPayload(BaseModel):
7385
)
7486
target_security_group: Optional[SecurityGroup] = Field(
7587
default=None,
76-
description="Security Group permitting network traffic from the LoadBalancer to the targets.",
88+
description="Security Group permitting network traffic from the LoadBalancer to the targets. Useful when disableTargetSecurityGroupAssignment=true to manually assign target security groups to targets.",
7789
alias="targetSecurityGroup",
7890
)
7991
version: Optional[StrictStr] = Field(
8092
default=None,
8193
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.",
8294
)
8395
__properties: ClassVar[List[str]] = [
96+
"disableTargetSecurityGroupAssignment",
8497
"errors",
8598
"externalAddress",
8699
"listeners",
@@ -217,6 +230,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
217230

218231
_obj = cls.model_validate(
219232
{
233+
"disableTargetSecurityGroupAssignment": obj.get("disableTargetSecurityGroupAssignment"),
220234
"errors": (
221235
[LoadBalancerError.from_dict(_item) for _item in obj["errors"]]
222236
if obj.get("errors") is not None

services/loadbalancer/src/stackit/loadbalancer/models/load_balancer.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,14 @@
1818
import re
1919
from typing import Any, ClassVar, Dict, List, Optional, Set
2020

21-
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
21+
from pydantic import (
22+
BaseModel,
23+
ConfigDict,
24+
Field,
25+
StrictBool,
26+
StrictStr,
27+
field_validator,
28+
)
2229
from typing_extensions import Annotated, Self
2330

2431
from stackit.loadbalancer.models.listener import Listener
@@ -34,6 +41,11 @@ class LoadBalancer(BaseModel):
3441
LoadBalancer
3542
"""
3643

44+
disable_target_security_group_assignment: Optional[StrictBool] = Field(
45+
default=None,
46+
description="Disable target security group assignemt to allow targets outside of the given network. Connectivity to targets need to be ensured by the customer, including routing and Security Groups (targetSecurityGroup can be assigned). Not changeable after creation.",
47+
alias="disableTargetSecurityGroupAssignment",
48+
)
3749
errors: Optional[List[LoadBalancerError]] = Field(
3850
default=None, description="Reports all errors a load balancer has."
3951
)
@@ -73,14 +85,15 @@ class LoadBalancer(BaseModel):
7385
)
7486
target_security_group: Optional[SecurityGroup] = Field(
7587
default=None,
76-
description="Security Group permitting network traffic from the LoadBalancer to the targets.",
88+
description="Security Group permitting network traffic from the LoadBalancer to the targets. Useful when disableTargetSecurityGroupAssignment=true to manually assign target security groups to targets.",
7789
alias="targetSecurityGroup",
7890
)
7991
version: Optional[StrictStr] = Field(
8092
default=None,
8193
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.",
8294
)
8395
__properties: ClassVar[List[str]] = [
96+
"disableTargetSecurityGroupAssignment",
8497
"errors",
8598
"externalAddress",
8699
"listeners",
@@ -217,6 +230,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
217230

218231
_obj = cls.model_validate(
219232
{
233+
"disableTargetSecurityGroupAssignment": obj.get("disableTargetSecurityGroupAssignment"),
220234
"errors": (
221235
[LoadBalancerError.from_dict(_item) for _item in obj["errors"]]
222236
if obj.get("errors") is not None

services/loadbalancer/src/stackit/loadbalancer/models/update_load_balancer_payload.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,14 @@
1818
import re
1919
from typing import Any, ClassVar, Dict, List, Optional, Set
2020

21-
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
21+
from pydantic import (
22+
BaseModel,
23+
ConfigDict,
24+
Field,
25+
StrictBool,
26+
StrictStr,
27+
field_validator,
28+
)
2229
from typing_extensions import Annotated, Self
2330

2431
from stackit.loadbalancer.models.listener import Listener
@@ -34,6 +41,11 @@ class UpdateLoadBalancerPayload(BaseModel):
3441
UpdateLoadBalancerPayload
3542
"""
3643

44+
disable_target_security_group_assignment: Optional[StrictBool] = Field(
45+
default=None,
46+
description="Disable target security group assignemt to allow targets outside of the given network. Connectivity to targets need to be ensured by the customer, including routing and Security Groups (targetSecurityGroup can be assigned). Not changeable after creation.",
47+
alias="disableTargetSecurityGroupAssignment",
48+
)
3749
errors: Optional[List[LoadBalancerError]] = Field(
3850
default=None, description="Reports all errors a load balancer has."
3951
)
@@ -73,14 +85,15 @@ class UpdateLoadBalancerPayload(BaseModel):
7385
)
7486
target_security_group: Optional[SecurityGroup] = Field(
7587
default=None,
76-
description="Security Group permitting network traffic from the LoadBalancer to the targets.",
88+
description="Security Group permitting network traffic from the LoadBalancer to the targets. Useful when disableTargetSecurityGroupAssignment=true to manually assign target security groups to targets.",
7789
alias="targetSecurityGroup",
7890
)
7991
version: Optional[StrictStr] = Field(
8092
default=None,
8193
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.",
8294
)
8395
__properties: ClassVar[List[str]] = [
96+
"disableTargetSecurityGroupAssignment",
8497
"errors",
8598
"externalAddress",
8699
"listeners",
@@ -217,6 +230,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
217230

218231
_obj = cls.model_validate(
219232
{
233+
"disableTargetSecurityGroupAssignment": obj.get("disableTargetSecurityGroupAssignment"),
220234
"errors": (
221235
[LoadBalancerError.from_dict(_item) for _item in obj["errors"]]
222236
if obj.get("errors") is not None

0 commit comments

Comments
 (0)