Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Release (2025-xx-xx)
- `iaas`: [v1.1.0](services/iaas/CHANGELOG.md#v110)
- **Feature:** Add `CreateIsolatedNetwork` functionality
- **Feature:** Add `ImageFromVolumePayload` functionality
- **Feature:** Add `SystemRoutes` to `UpdateRoutingTableOfAreaPayload`

## Release (2025-12-08)
- `scf`: [v0.3.0](services/scf/CHANGELOG.md#v030)
- **Feature:** Add new model `IsolationSegment` and `IsolationSegmentsList`
Expand Down
5 changes: 5 additions & 0 deletions services/iaas/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## v1.1.0
- **Feature:** Add `CreateIsolatedNetwork` functionality
- **Feature:** Add `ImageFromVolumePayload` functionality
- **Feature:** Add `SystemRoutes` to `UpdateRoutingTableOfAreaPayload`

## v1.0.0
- **Breaking Change:** Add required `region` parameter to most API methods in `DefaultApi` class.
- **Breaking Change:** Removal of API methods from `DefaultApi` class: `list_snapshots`, `update_image_scope_local`, `update_image_scope_public`.
Expand Down
2 changes: 1 addition & 1 deletion services/iaas/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "stackit-iaas"

[tool.poetry]
name = "stackit-iaas"
version = "v1.0.0"
version = "v1.1.0"
authors = [
"STACKIT Developer Tools <developer-tools@stackit.cloud>",
]
Expand Down
6 changes: 5 additions & 1 deletion services/iaas/src/stackit/iaas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# flake8: noqa

"""
IaaS-API
STACKIT IaaS API

This API allows you to create and modify IaaS resources.

Expand Down Expand Up @@ -46,6 +46,7 @@
"CreateAffinityGroupPayload",
"CreateBackupPayload",
"CreateImagePayload",
"CreateIsolatedNetworkPayload",
"CreateKeyPairPayload",
"CreateNetworkAreaPayload",
"CreateNetworkAreaRangePayload",
Expand Down Expand Up @@ -228,6 +229,9 @@
from stackit.iaas.models.create_image_payload import (
CreateImagePayload as CreateImagePayload,
)
from stackit.iaas.models.create_isolated_network_payload import (
CreateIsolatedNetworkPayload as CreateIsolatedNetworkPayload,
)
from stackit.iaas.models.create_key_pair_payload import (
CreateKeyPairPayload as CreateKeyPairPayload,
)
Expand Down
318 changes: 309 additions & 9 deletions services/iaas/src/stackit/iaas/api/default_api.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion services/iaas/src/stackit/iaas/api_client.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8

"""
IaaS-API
STACKIT IaaS API

This API allows you to create and modify IaaS resources.

Expand Down
2 changes: 1 addition & 1 deletion services/iaas/src/stackit/iaas/configuration.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8

"""
IaaS-API
STACKIT IaaS API

This API allows you to create and modify IaaS resources.

Expand Down
2 changes: 1 addition & 1 deletion services/iaas/src/stackit/iaas/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8

"""
IaaS-API
STACKIT IaaS API

This API allows you to create and modify IaaS resources.

Expand Down
5 changes: 4 additions & 1 deletion services/iaas/src/stackit/iaas/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# flake8: noqa
"""
IaaS-API
STACKIT IaaS API

This API allows you to create and modify IaaS resources.

Expand Down Expand Up @@ -38,6 +38,9 @@
from stackit.iaas.models.create_affinity_group_payload import CreateAffinityGroupPayload
from stackit.iaas.models.create_backup_payload import CreateBackupPayload
from stackit.iaas.models.create_image_payload import CreateImagePayload
from stackit.iaas.models.create_isolated_network_payload import (
CreateIsolatedNetworkPayload,
)
from stackit.iaas.models.create_key_pair_payload import CreateKeyPairPayload
from stackit.iaas.models.create_network_area_payload import CreateNetworkAreaPayload
from stackit.iaas.models.create_network_area_range_payload import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8

"""
IaaS-API
STACKIT IaaS API

This API allows you to create and modify IaaS resources.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8

"""
IaaS-API
STACKIT IaaS API

This API allows you to create and modify IaaS resources.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8

"""
IaaS-API
STACKIT IaaS API

This API allows you to create and modify IaaS resources.

Expand Down
2 changes: 1 addition & 1 deletion services/iaas/src/stackit/iaas/models/affinity_group.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8

"""
IaaS-API
STACKIT IaaS API

This API allows you to create and modify IaaS resources.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8

"""
IaaS-API
STACKIT IaaS API

This API allows you to create and modify IaaS resources.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8

"""
IaaS-API
STACKIT IaaS API

This API allows you to create and modify IaaS resources.

Expand Down
2 changes: 1 addition & 1 deletion services/iaas/src/stackit/iaas/models/area_id.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8

"""
IaaS-API
STACKIT IaaS API

This API allows you to create and modify IaaS resources.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8

"""
IaaS-API
STACKIT IaaS API

This API allows you to create and modify IaaS resources.

Expand Down
2 changes: 1 addition & 1 deletion services/iaas/src/stackit/iaas/models/backup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8

"""
IaaS-API
STACKIT IaaS API

This API allows you to create and modify IaaS resources.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8

"""
IaaS-API
STACKIT IaaS API

This API allows you to create and modify IaaS resources.

Expand Down
2 changes: 1 addition & 1 deletion services/iaas/src/stackit/iaas/models/backup_source.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8

"""
IaaS-API
STACKIT IaaS API

This API allows you to create and modify IaaS resources.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8

"""
IaaS-API
STACKIT IaaS API

This API allows you to create and modify IaaS resources.

Expand Down
2 changes: 1 addition & 1 deletion services/iaas/src/stackit/iaas/models/boot_volume.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8

"""
IaaS-API
STACKIT IaaS API

This API allows you to create and modify IaaS resources.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8

"""
IaaS-API
STACKIT IaaS API

This API allows you to create and modify IaaS resources.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8

"""
IaaS-API
STACKIT IaaS API

This API allows you to create and modify IaaS resources.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8

"""
IaaS-API
STACKIT IaaS API

This API allows you to create and modify IaaS resources.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8

"""
IaaS-API
STACKIT IaaS API

This API allows you to create and modify IaaS resources.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# coding: utf-8

"""
STACKIT IaaS API

This API allows you to create and modify IaaS resources.

The version of the OpenAPI document: 2
Contact: stackit-iaas@mail.schwarz
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
""" # noqa: E501

from __future__ import annotations

import json
import pprint
import re # noqa: F401
from typing import Any, ClassVar, Dict, List, Optional, Set

from pydantic import BaseModel, ConfigDict, Field, StrictBool, field_validator
from typing_extensions import Annotated, Self

from stackit.iaas.models.create_network_ipv4 import CreateNetworkIPv4


class CreateIsolatedNetworkPayload(BaseModel):
"""
Object that represents the request body for a single isolated network create.
""" # noqa: E501

dhcp: Optional[StrictBool] = Field(default=None, description="Enable or disable DHCP for a network.")
ipv4: Optional[CreateNetworkIPv4] = None
labels: Optional[Dict[str, Any]] = Field(
default=None,
description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.",
)
name: Annotated[str, Field(strict=True, max_length=127)] = Field(
description="The name for a General Object. Matches Names and also UUIDs."
)
__properties: ClassVar[List[str]] = ["dhcp", "ipv4", "labels", "name"]

@field_validator("name")
def name_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if not re.match(r"^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$", value):
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$/")
return value

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 CreateIsolatedNetworkPayload 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,
)
# override the default output from pydantic by calling `to_dict()` of ipv4
if self.ipv4:
_dict["ipv4"] = self.ipv4.to_dict()
return _dict

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

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

_obj = cls.model_validate(
{
"dhcp": obj.get("dhcp"),
"ipv4": CreateNetworkIPv4.from_dict(obj["ipv4"]) if obj.get("ipv4") is not None else None,
"labels": obj.get("labels"),
"name": obj.get("name"),
}
)
return _obj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8

"""
IaaS-API
STACKIT IaaS API

This API allows you to create and modify IaaS resources.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8

"""
IaaS-API
STACKIT IaaS API

This API allows you to create and modify IaaS resources.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8

"""
IaaS-API
STACKIT IaaS API

This API allows you to create and modify IaaS resources.

Expand Down
Loading