Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Generator: Update SDK /services/loadbalancer#1255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
marceljk merged 2 commits intomainfromgenerator-bot-15492893853/loadbalancer
Jun 10, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletionsCHANGELOG.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
## Release (2025-XX-YY)
- `loadbalanccer`: [v0.3.0](services/loadbalancer/CHANGELOG.md#v030-2025-06-10)
- **Feature:** Add new field `target_security_group` in `LoadBalancer` Model
- `resourcemanager`: [v0.5.0](services/resourcemanager/CHANGELOG.md#v050-2025-06-04)
- **Feature:** Delete Organization labels using the new method `DeleteOrganizationLabels`
- **Feature:** Delete Project labels using the new method `DeleteProjectLabels`
Expand Down
3 changes: 3 additions & 0 deletionsservices/loadbalancer/CHANGELOG.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
## v0.3.0 (2025-06-10)
- **Feature:** Add new field `target_security_group` in `LoadBalancer` Model

## v0.2.4 (2025-06-02)
- **Improvement:** Adjusted `GetQuotaResponse` and `RESTResponseType` message

Expand Down
2 changes: 1 addition & 1 deletionservices/loadbalancer/pyproject.toml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,7 @@ name = "stackit-loadbalancer"

[tool.poetry]
name = "stackit-loadbalancer"
version = "v0.2.4"
version = "v0.3.0"
authors = [
"STACKIT Developer Tools <developer-tools@stackit.cloud>",
]
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -72,6 +72,7 @@
from stackit.loadbalancer.models.options_tcp import OptionsTCP
from stackit.loadbalancer.models.options_udp import OptionsUDP
from stackit.loadbalancer.models.plan_details import PlanDetails
from stackit.loadbalancer.models.security_group import SecurityGroup
from stackit.loadbalancer.models.server_name_indicator import ServerNameIndicator
from stackit.loadbalancer.models.session_persistence import SessionPersistence
from stackit.loadbalancer.models.status import Status
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -53,6 +53,7 @@
from stackit.loadbalancer.models.options_tcp import OptionsTCP
from stackit.loadbalancer.models.options_udp import OptionsUDP
from stackit.loadbalancer.models.plan_details import PlanDetails
from stackit.loadbalancer.models.security_group import SecurityGroup
from stackit.loadbalancer.models.server_name_indicator import ServerNameIndicator
from stackit.loadbalancer.models.session_persistence import SessionPersistence
from stackit.loadbalancer.models.status import Status
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,6 +25,7 @@
from stackit.loadbalancer.models.load_balancer_error import LoadBalancerError
from stackit.loadbalancer.models.load_balancer_options import LoadBalancerOptions
from stackit.loadbalancer.models.network import Network
from stackit.loadbalancer.models.security_group import SecurityGroup
from stackit.loadbalancer.models.target_pool import TargetPool


Expand DownExpand Up@@ -70,6 +71,11 @@ class CreateLoadBalancerPayload(BaseModel):
description="List of all target pools which will be used in the load balancer. Limited to 20.",
alias="targetPools",
)
target_security_group: Optional[SecurityGroup] = Field(
default=None,
description="Security Group permitting network traffic from the LoadBalancer to the targets.",
alias="targetSecurityGroup",
)
version: Optional[StrictStr] = Field(
default=None,
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.",
Expand All@@ -86,6 +92,7 @@ class CreateLoadBalancerPayload(BaseModel):
"region",
"status",
"targetPools",
"targetSecurityGroup",
"version",
]

Expand DownExpand Up@@ -146,13 +153,15 @@ def to_dict(self) -> Dict[str, Any]:
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
"""
excluded_fields: Set[str] = set(
[
"errors",
"private_address",
"region",
"status",
"target_security_group",
]
)

Expand DownExpand Up@@ -192,6 +201,9 @@ def to_dict(self) -> Dict[str, Any]:
if _item:
_items.append(_item.to_dict())
_dict["targetPools"] = _items
# override the default output from pydantic by calling `to_dict()` of target_security_group
if self.target_security_group:
_dict["targetSecurityGroup"] = self.target_security_group.to_dict()
return _dict

@classmethod
Expand DownExpand Up@@ -230,6 +242,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
if obj.get("targetPools") is not None
else None
),
"targetSecurityGroup": (
SecurityGroup.from_dict(obj["targetSecurityGroup"])
if obj.get("targetSecurityGroup") is not None
else None
),
"version": obj.get("version"),
}
)
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,6 +25,7 @@
from stackit.loadbalancer.models.load_balancer_error import LoadBalancerError
from stackit.loadbalancer.models.load_balancer_options import LoadBalancerOptions
from stackit.loadbalancer.models.network import Network
from stackit.loadbalancer.models.security_group import SecurityGroup
from stackit.loadbalancer.models.target_pool import TargetPool


Expand DownExpand Up@@ -70,6 +71,11 @@ class LoadBalancer(BaseModel):
description="List of all target pools which will be used in the load balancer. Limited to 20.",
alias="targetPools",
)
target_security_group: Optional[SecurityGroup] = Field(
default=None,
description="Security Group permitting network traffic from the LoadBalancer to the targets.",
alias="targetSecurityGroup",
)
version: Optional[StrictStr] = Field(
default=None,
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.",
Expand All@@ -86,6 +92,7 @@ class LoadBalancer(BaseModel):
"region",
"status",
"targetPools",
"targetSecurityGroup",
"version",
]

Expand DownExpand Up@@ -146,13 +153,15 @@ def to_dict(self) -> Dict[str, Any]:
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
"""
excluded_fields: Set[str] = set(
[
"errors",
"private_address",
"region",
"status",
"target_security_group",
]
)

Expand DownExpand Up@@ -192,6 +201,9 @@ def to_dict(self) -> Dict[str, Any]:
if _item:
_items.append(_item.to_dict())
_dict["targetPools"] = _items
# override the default output from pydantic by calling `to_dict()` of target_security_group
if self.target_security_group:
_dict["targetSecurityGroup"] = self.target_security_group.to_dict()
return _dict

@classmethod
Expand DownExpand Up@@ -230,6 +242,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
if obj.get("targetPools") is not None
else None
),
"targetSecurityGroup": (
SecurityGroup.from_dict(obj["targetSecurityGroup"])
if obj.get("targetSecurityGroup") is not None
else None
),
"version": obj.get("version"),
}
)
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
# coding: utf-8

"""
Load Balancer API

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.

The version of the OpenAPI document: 2.0.0
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
""" # noqa: E501 docstring might be too long

from __future__ import annotations

import json
import pprint
from typing import Any, ClassVar, Dict, List, Optional, Set

from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing_extensions import Self


class SecurityGroup(BaseModel):
"""
SecurityGroup
"""

id: Optional[StrictStr] = Field(default=None, description="ID of the security Group")
name: Optional[StrictStr] = Field(default=None, description="Name of the security Group")
__properties: ClassVar[List[str]] = ["id", "name"]

model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)

def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())

@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of SecurityGroup from a JSON string"""
return cls.from_dict(json.loads(json_str))

def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:

* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([])

_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict

@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of SecurityGroup from a dict"""
if obj is None:
return None

if not isinstance(obj, dict):
return cls.model_validate(obj)

_obj = cls.model_validate({"id": obj.get("id"), "name": obj.get("name")})
return _obj
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,6 +25,7 @@
from stackit.loadbalancer.models.load_balancer_error import LoadBalancerError
from stackit.loadbalancer.models.load_balancer_options import LoadBalancerOptions
from stackit.loadbalancer.models.network import Network
from stackit.loadbalancer.models.security_group import SecurityGroup
from stackit.loadbalancer.models.target_pool import TargetPool


Expand DownExpand Up@@ -70,6 +71,11 @@ class UpdateLoadBalancerPayload(BaseModel):
description="List of all target pools which will be used in the load balancer. Limited to 20.",
alias="targetPools",
)
target_security_group: Optional[SecurityGroup] = Field(
default=None,
description="Security Group permitting network traffic from the LoadBalancer to the targets.",
alias="targetSecurityGroup",
)
version: Optional[StrictStr] = Field(
default=None,
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.",
Expand All@@ -86,6 +92,7 @@ class UpdateLoadBalancerPayload(BaseModel):
"region",
"status",
"targetPools",
"targetSecurityGroup",
"version",
]

Expand DownExpand Up@@ -146,13 +153,15 @@ def to_dict(self) -> Dict[str, Any]:
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
"""
excluded_fields: Set[str] = set(
[
"errors",
"private_address",
"region",
"status",
"target_security_group",
]
)

Expand DownExpand Up@@ -192,6 +201,9 @@ def to_dict(self) -> Dict[str, Any]:
if _item:
_items.append(_item.to_dict())
_dict["targetPools"] = _items
# override the default output from pydantic by calling `to_dict()` of target_security_group
if self.target_security_group:
_dict["targetSecurityGroup"] = self.target_security_group.to_dict()
return _dict

@classmethod
Expand DownExpand Up@@ -230,6 +242,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
if obj.get("targetPools") is not None
else None
),
"targetSecurityGroup": (
SecurityGroup.from_dict(obj["targetSecurityGroup"])
if obj.get("targetSecurityGroup") is not None
else None
),
"version": obj.get("version"),
}
)
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp