stackit-edge 0.3.0__tar.gz → 0.5.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_edge-0.3.0 → stackit_edge-0.5.0}/PKG-INFO +1 -1
- {stackit_edge-0.3.0 → stackit_edge-0.5.0}/pyproject.toml +1 -1
- {stackit_edge-0.3.0 → stackit_edge-0.5.0}/src/stackit/edge/__init__.py +4 -0
- {stackit_edge-0.3.0 → stackit_edge-0.5.0}/src/stackit/edge/api/default_api.py +235 -0
- {stackit_edge-0.3.0 → stackit_edge-0.5.0}/src/stackit/edge/api_client.py +15 -17
- {stackit_edge-0.3.0 → stackit_edge-0.5.0}/src/stackit/edge/models/__init__.py +1 -0
- {stackit_edge-0.3.0 → stackit_edge-0.5.0}/src/stackit/edge/models/bad_request.py +4 -3
- {stackit_edge-0.3.0 → stackit_edge-0.5.0}/src/stackit/edge/models/create_instance_payload.py +4 -3
- {stackit_edge-0.3.0 → stackit_edge-0.5.0}/src/stackit/edge/models/instance.py +4 -3
- {stackit_edge-0.3.0 → stackit_edge-0.5.0}/src/stackit/edge/models/instance_list.py +4 -3
- {stackit_edge-0.3.0 → stackit_edge-0.5.0}/src/stackit/edge/models/kubeconfig.py +4 -3
- stackit_edge-0.5.0/src/stackit/edge/models/kubernetes_release_list.py +82 -0
- {stackit_edge-0.3.0 → stackit_edge-0.5.0}/src/stackit/edge/models/plan.py +4 -3
- {stackit_edge-0.3.0 → stackit_edge-0.5.0}/src/stackit/edge/models/plan_list.py +4 -3
- {stackit_edge-0.3.0 → stackit_edge-0.5.0}/src/stackit/edge/models/token.py +4 -3
- {stackit_edge-0.3.0 → stackit_edge-0.5.0}/src/stackit/edge/models/unauthorized_request.py +4 -3
- {stackit_edge-0.3.0 → stackit_edge-0.5.0}/src/stackit/edge/models/update_instance_by_name_payload.py +4 -3
- {stackit_edge-0.3.0 → stackit_edge-0.5.0}/src/stackit/edge/models/update_instance_payload.py +4 -3
- {stackit_edge-0.3.0 → stackit_edge-0.5.0}/src/stackit/edge/models/user.py +4 -3
- {stackit_edge-0.3.0 → stackit_edge-0.5.0}/.gitignore +0 -0
- {stackit_edge-0.3.0 → stackit_edge-0.5.0}/LICENSE.md +0 -0
- {stackit_edge-0.3.0 → stackit_edge-0.5.0}/NOTICE.txt +0 -0
- {stackit_edge-0.3.0 → stackit_edge-0.5.0}/README.md +0 -0
- {stackit_edge-0.3.0 → stackit_edge-0.5.0}/src/stackit/edge/api/__init__.py +0 -0
- {stackit_edge-0.3.0 → stackit_edge-0.5.0}/src/stackit/edge/api_response.py +0 -0
- {stackit_edge-0.3.0 → stackit_edge-0.5.0}/src/stackit/edge/configuration.py +0 -0
- {stackit_edge-0.3.0 → stackit_edge-0.5.0}/src/stackit/edge/exceptions.py +0 -0
- {stackit_edge-0.3.0 → stackit_edge-0.5.0}/src/stackit/edge/py.typed +0 -0
- {stackit_edge-0.3.0 → stackit_edge-0.5.0}/src/stackit/edge/rest.py +0 -0
|
@@ -33,6 +33,7 @@ __all__ = [
|
|
|
33
33
|
"Instance",
|
|
34
34
|
"InstanceList",
|
|
35
35
|
"Kubeconfig",
|
|
36
|
+
"KubernetesReleaseList",
|
|
36
37
|
"Plan",
|
|
37
38
|
"PlanList",
|
|
38
39
|
"Token",
|
|
@@ -64,6 +65,9 @@ from stackit.edge.models.create_instance_payload import (
|
|
|
64
65
|
from stackit.edge.models.instance import Instance as Instance
|
|
65
66
|
from stackit.edge.models.instance_list import InstanceList as InstanceList
|
|
66
67
|
from stackit.edge.models.kubeconfig import Kubeconfig as Kubeconfig
|
|
68
|
+
from stackit.edge.models.kubernetes_release_list import (
|
|
69
|
+
KubernetesReleaseList as KubernetesReleaseList,
|
|
70
|
+
)
|
|
67
71
|
from stackit.edge.models.plan import Plan as Plan
|
|
68
72
|
from stackit.edge.models.plan_list import PlanList as PlanList
|
|
69
73
|
from stackit.edge.models.token import Token as Token
|
|
@@ -30,6 +30,7 @@ from stackit.edge.models.create_instance_payload import CreateInstancePayload
|
|
|
30
30
|
from stackit.edge.models.instance import Instance
|
|
31
31
|
from stackit.edge.models.instance_list import InstanceList
|
|
32
32
|
from stackit.edge.models.kubeconfig import Kubeconfig
|
|
33
|
+
from stackit.edge.models.kubernetes_release_list import KubernetesReleaseList
|
|
33
34
|
from stackit.edge.models.plan_list import PlanList
|
|
34
35
|
from stackit.edge.models.token import Token
|
|
35
36
|
from stackit.edge.models.update_instance_by_name_payload import (
|
|
@@ -2627,6 +2628,240 @@ class DefaultApi:
|
|
|
2627
2628
|
_request_auth=_request_auth,
|
|
2628
2629
|
)
|
|
2629
2630
|
|
|
2631
|
+
@validate_call
|
|
2632
|
+
def list_compatible_kubernetes_releases(
|
|
2633
|
+
self,
|
|
2634
|
+
talos_version: Annotated[StrictStr, Field(description="The name of the Talos release.")],
|
|
2635
|
+
_request_timeout: Union[
|
|
2636
|
+
None,
|
|
2637
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2638
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2639
|
+
] = None,
|
|
2640
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2641
|
+
_content_type: Optional[StrictStr] = None,
|
|
2642
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2643
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2644
|
+
) -> KubernetesReleaseList:
|
|
2645
|
+
"""list_compatible_kubernetes_releases
|
|
2646
|
+
|
|
2647
|
+
|
|
2648
|
+
:param talos_version: The name of the Talos release. (required)
|
|
2649
|
+
:type talos_version: str
|
|
2650
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2651
|
+
number provided, it will be total request
|
|
2652
|
+
timeout. It can also be a pair (tuple) of
|
|
2653
|
+
(connection, read) timeouts.
|
|
2654
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2655
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2656
|
+
request; this effectively ignores the
|
|
2657
|
+
authentication in the spec for a single request.
|
|
2658
|
+
:type _request_auth: dict, optional
|
|
2659
|
+
:param _content_type: force content-type for the request.
|
|
2660
|
+
:type _content_type: str, Optional
|
|
2661
|
+
:param _headers: set to override the headers for a single
|
|
2662
|
+
request; this effectively ignores the headers
|
|
2663
|
+
in the spec for a single request.
|
|
2664
|
+
:type _headers: dict, optional
|
|
2665
|
+
:param _host_index: set to override the host_index for a single
|
|
2666
|
+
request; this effectively ignores the host_index
|
|
2667
|
+
in the spec for a single request.
|
|
2668
|
+
:type _host_index: int, optional
|
|
2669
|
+
:return: Returns the result object.
|
|
2670
|
+
""" # noqa: E501
|
|
2671
|
+
|
|
2672
|
+
_param = self._list_compatible_kubernetes_releases_serialize(
|
|
2673
|
+
talos_version=talos_version,
|
|
2674
|
+
_request_auth=_request_auth,
|
|
2675
|
+
_content_type=_content_type,
|
|
2676
|
+
_headers=_headers,
|
|
2677
|
+
_host_index=_host_index,
|
|
2678
|
+
)
|
|
2679
|
+
|
|
2680
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2681
|
+
"200": "KubernetesReleaseList",
|
|
2682
|
+
"400": "BadRequest",
|
|
2683
|
+
"404": None,
|
|
2684
|
+
"500": None,
|
|
2685
|
+
}
|
|
2686
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2687
|
+
response_data.read()
|
|
2688
|
+
return self.api_client.response_deserialize(
|
|
2689
|
+
response_data=response_data,
|
|
2690
|
+
response_types_map=_response_types_map,
|
|
2691
|
+
).data
|
|
2692
|
+
|
|
2693
|
+
@validate_call
|
|
2694
|
+
def list_compatible_kubernetes_releases_with_http_info(
|
|
2695
|
+
self,
|
|
2696
|
+
talos_version: Annotated[StrictStr, Field(description="The name of the Talos release.")],
|
|
2697
|
+
_request_timeout: Union[
|
|
2698
|
+
None,
|
|
2699
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2700
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2701
|
+
] = None,
|
|
2702
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2703
|
+
_content_type: Optional[StrictStr] = None,
|
|
2704
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2705
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2706
|
+
) -> ApiResponse[KubernetesReleaseList]:
|
|
2707
|
+
"""list_compatible_kubernetes_releases
|
|
2708
|
+
|
|
2709
|
+
|
|
2710
|
+
:param talos_version: The name of the Talos release. (required)
|
|
2711
|
+
:type talos_version: str
|
|
2712
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2713
|
+
number provided, it will be total request
|
|
2714
|
+
timeout. It can also be a pair (tuple) of
|
|
2715
|
+
(connection, read) timeouts.
|
|
2716
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2717
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2718
|
+
request; this effectively ignores the
|
|
2719
|
+
authentication in the spec for a single request.
|
|
2720
|
+
:type _request_auth: dict, optional
|
|
2721
|
+
:param _content_type: force content-type for the request.
|
|
2722
|
+
:type _content_type: str, Optional
|
|
2723
|
+
:param _headers: set to override the headers for a single
|
|
2724
|
+
request; this effectively ignores the headers
|
|
2725
|
+
in the spec for a single request.
|
|
2726
|
+
:type _headers: dict, optional
|
|
2727
|
+
:param _host_index: set to override the host_index for a single
|
|
2728
|
+
request; this effectively ignores the host_index
|
|
2729
|
+
in the spec for a single request.
|
|
2730
|
+
:type _host_index: int, optional
|
|
2731
|
+
:return: Returns the result object.
|
|
2732
|
+
""" # noqa: E501
|
|
2733
|
+
|
|
2734
|
+
_param = self._list_compatible_kubernetes_releases_serialize(
|
|
2735
|
+
talos_version=talos_version,
|
|
2736
|
+
_request_auth=_request_auth,
|
|
2737
|
+
_content_type=_content_type,
|
|
2738
|
+
_headers=_headers,
|
|
2739
|
+
_host_index=_host_index,
|
|
2740
|
+
)
|
|
2741
|
+
|
|
2742
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2743
|
+
"200": "KubernetesReleaseList",
|
|
2744
|
+
"400": "BadRequest",
|
|
2745
|
+
"404": None,
|
|
2746
|
+
"500": None,
|
|
2747
|
+
}
|
|
2748
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2749
|
+
response_data.read()
|
|
2750
|
+
return self.api_client.response_deserialize(
|
|
2751
|
+
response_data=response_data,
|
|
2752
|
+
response_types_map=_response_types_map,
|
|
2753
|
+
)
|
|
2754
|
+
|
|
2755
|
+
@validate_call
|
|
2756
|
+
def list_compatible_kubernetes_releases_without_preload_content(
|
|
2757
|
+
self,
|
|
2758
|
+
talos_version: Annotated[StrictStr, Field(description="The name of the Talos release.")],
|
|
2759
|
+
_request_timeout: Union[
|
|
2760
|
+
None,
|
|
2761
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2762
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2763
|
+
] = None,
|
|
2764
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2765
|
+
_content_type: Optional[StrictStr] = None,
|
|
2766
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2767
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2768
|
+
) -> RESTResponseType:
|
|
2769
|
+
"""list_compatible_kubernetes_releases
|
|
2770
|
+
|
|
2771
|
+
|
|
2772
|
+
:param talos_version: The name of the Talos release. (required)
|
|
2773
|
+
:type talos_version: str
|
|
2774
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2775
|
+
number provided, it will be total request
|
|
2776
|
+
timeout. It can also be a pair (tuple) of
|
|
2777
|
+
(connection, read) timeouts.
|
|
2778
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2779
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2780
|
+
request; this effectively ignores the
|
|
2781
|
+
authentication in the spec for a single request.
|
|
2782
|
+
:type _request_auth: dict, optional
|
|
2783
|
+
:param _content_type: force content-type for the request.
|
|
2784
|
+
:type _content_type: str, Optional
|
|
2785
|
+
:param _headers: set to override the headers for a single
|
|
2786
|
+
request; this effectively ignores the headers
|
|
2787
|
+
in the spec for a single request.
|
|
2788
|
+
:type _headers: dict, optional
|
|
2789
|
+
:param _host_index: set to override the host_index for a single
|
|
2790
|
+
request; this effectively ignores the host_index
|
|
2791
|
+
in the spec for a single request.
|
|
2792
|
+
:type _host_index: int, optional
|
|
2793
|
+
:return: Returns the result object.
|
|
2794
|
+
""" # noqa: E501
|
|
2795
|
+
|
|
2796
|
+
_param = self._list_compatible_kubernetes_releases_serialize(
|
|
2797
|
+
talos_version=talos_version,
|
|
2798
|
+
_request_auth=_request_auth,
|
|
2799
|
+
_content_type=_content_type,
|
|
2800
|
+
_headers=_headers,
|
|
2801
|
+
_host_index=_host_index,
|
|
2802
|
+
)
|
|
2803
|
+
|
|
2804
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2805
|
+
"200": "KubernetesReleaseList",
|
|
2806
|
+
"400": "BadRequest",
|
|
2807
|
+
"404": None,
|
|
2808
|
+
"500": None,
|
|
2809
|
+
}
|
|
2810
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2811
|
+
return response_data.response
|
|
2812
|
+
|
|
2813
|
+
def _list_compatible_kubernetes_releases_serialize(
|
|
2814
|
+
self,
|
|
2815
|
+
talos_version,
|
|
2816
|
+
_request_auth,
|
|
2817
|
+
_content_type,
|
|
2818
|
+
_headers,
|
|
2819
|
+
_host_index,
|
|
2820
|
+
) -> RequestSerialized:
|
|
2821
|
+
|
|
2822
|
+
_host = None
|
|
2823
|
+
|
|
2824
|
+
_collection_formats: Dict[str, str] = {}
|
|
2825
|
+
|
|
2826
|
+
_path_params: Dict[str, str] = {}
|
|
2827
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2828
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2829
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2830
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
2831
|
+
_body_params: Optional[bytes] = None
|
|
2832
|
+
|
|
2833
|
+
# process the path parameters
|
|
2834
|
+
# process the query parameters
|
|
2835
|
+
if talos_version is not None:
|
|
2836
|
+
|
|
2837
|
+
_query_params.append(("talosVersion", talos_version))
|
|
2838
|
+
|
|
2839
|
+
# process the header parameters
|
|
2840
|
+
# process the form parameters
|
|
2841
|
+
# process the body parameter
|
|
2842
|
+
|
|
2843
|
+
# set the HTTP header `Accept`
|
|
2844
|
+
if "Accept" not in _header_params:
|
|
2845
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
2846
|
+
|
|
2847
|
+
# authentication setting
|
|
2848
|
+
_auth_settings: List[str] = []
|
|
2849
|
+
|
|
2850
|
+
return self.api_client.param_serialize(
|
|
2851
|
+
method="GET",
|
|
2852
|
+
resource_path="/v1beta1/listcompatiblekubernetesreleases",
|
|
2853
|
+
path_params=_path_params,
|
|
2854
|
+
query_params=_query_params,
|
|
2855
|
+
header_params=_header_params,
|
|
2856
|
+
body=_body_params,
|
|
2857
|
+
post_params=_form_params,
|
|
2858
|
+
files=_files,
|
|
2859
|
+
auth_settings=_auth_settings,
|
|
2860
|
+
collection_formats=_collection_formats,
|
|
2861
|
+
_host=_host,
|
|
2862
|
+
_request_auth=_request_auth,
|
|
2863
|
+
)
|
|
2864
|
+
|
|
2630
2865
|
@validate_call
|
|
2631
2866
|
def list_instances(
|
|
2632
2867
|
self,
|
|
@@ -66,6 +66,7 @@ class ApiClient:
|
|
|
66
66
|
"date": datetime.date,
|
|
67
67
|
"datetime": datetime.datetime,
|
|
68
68
|
"decimal": decimal.Decimal,
|
|
69
|
+
"UUID": uuid.UUID,
|
|
69
70
|
"object": object,
|
|
70
71
|
}
|
|
71
72
|
_pool = None
|
|
@@ -265,7 +266,7 @@ class ApiClient:
|
|
|
265
266
|
response_text = None
|
|
266
267
|
return_data = None
|
|
267
268
|
try:
|
|
268
|
-
if response_type
|
|
269
|
+
if response_type in ("bytearray", "bytes"):
|
|
269
270
|
return_data = response_data.data
|
|
270
271
|
elif response_type == "file":
|
|
271
272
|
return_data = self.__deserialize_file(response_data)
|
|
@@ -326,25 +327,20 @@ class ApiClient:
|
|
|
326
327
|
return obj.isoformat()
|
|
327
328
|
elif isinstance(obj, decimal.Decimal):
|
|
328
329
|
return str(obj)
|
|
329
|
-
|
|
330
330
|
elif isinstance(obj, dict):
|
|
331
|
-
|
|
331
|
+
return {key: self.sanitize_for_serialization(val) for key, val in obj.items()}
|
|
332
|
+
|
|
333
|
+
# Convert model obj to dict except
|
|
334
|
+
# attributes `openapi_types`, `attribute_map`
|
|
335
|
+
# and attributes which value is not None.
|
|
336
|
+
# Convert attribute name to json key in
|
|
337
|
+
# model definition for request.
|
|
338
|
+
if hasattr(obj, "to_dict") and callable(getattr(obj, "to_dict")): # noqa: B009
|
|
339
|
+
obj_dict = obj.to_dict()
|
|
332
340
|
else:
|
|
333
|
-
|
|
334
|
-
# attributes `openapi_types`, `attribute_map`
|
|
335
|
-
# and attributes which value is not None.
|
|
336
|
-
# Convert attribute name to json key in
|
|
337
|
-
# model definition for request.
|
|
338
|
-
if hasattr(obj, "to_dict") and callable(getattr(obj, "to_dict")): # noqa: B009
|
|
339
|
-
obj_dict = obj.to_dict()
|
|
340
|
-
else:
|
|
341
|
-
obj_dict = obj.__dict__
|
|
342
|
-
|
|
343
|
-
if isinstance(obj_dict, list):
|
|
344
|
-
# here we handle instances that can either be a list or something else, and only became a real list by calling to_dict() # noqa: E501
|
|
345
|
-
return self.sanitize_for_serialization(obj_dict)
|
|
341
|
+
obj_dict = obj.__dict__
|
|
346
342
|
|
|
347
|
-
return
|
|
343
|
+
return self.sanitize_for_serialization(obj_dict)
|
|
348
344
|
|
|
349
345
|
def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]):
|
|
350
346
|
"""Deserializes response into an object.
|
|
@@ -417,6 +413,8 @@ class ApiClient:
|
|
|
417
413
|
return self.__deserialize_datetime(data)
|
|
418
414
|
elif klass is decimal.Decimal:
|
|
419
415
|
return decimal.Decimal(data)
|
|
416
|
+
elif klass is uuid.UUID:
|
|
417
|
+
return uuid.UUID(data)
|
|
420
418
|
elif issubclass(klass, Enum):
|
|
421
419
|
return self.__deserialize_enum(data, klass)
|
|
422
420
|
else:
|
|
@@ -18,6 +18,7 @@ from stackit.edge.models.create_instance_payload import CreateInstancePayload
|
|
|
18
18
|
from stackit.edge.models.instance import Instance
|
|
19
19
|
from stackit.edge.models.instance_list import InstanceList
|
|
20
20
|
from stackit.edge.models.kubeconfig import Kubeconfig
|
|
21
|
+
from stackit.edge.models.kubernetes_release_list import KubernetesReleaseList
|
|
21
22
|
from stackit.edge.models.plan import Plan
|
|
22
23
|
from stackit.edge.models.plan_list import PlanList
|
|
23
24
|
from stackit.edge.models.token import Token
|
|
@@ -18,6 +18,7 @@ import pprint
|
|
|
18
18
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
21
|
+
from pydantic_core import to_jsonable_python
|
|
21
22
|
from typing_extensions import Self
|
|
22
23
|
|
|
23
24
|
|
|
@@ -31,7 +32,8 @@ class BadRequest(BaseModel):
|
|
|
31
32
|
__properties: ClassVar[List[str]] = ["code", "message"]
|
|
32
33
|
|
|
33
34
|
model_config = ConfigDict(
|
|
34
|
-
|
|
35
|
+
validate_by_name=True,
|
|
36
|
+
validate_by_alias=True,
|
|
35
37
|
validate_assignment=True,
|
|
36
38
|
protected_namespaces=(),
|
|
37
39
|
)
|
|
@@ -42,8 +44,7 @@ class BadRequest(BaseModel):
|
|
|
42
44
|
|
|
43
45
|
def to_json(self) -> str:
|
|
44
46
|
"""Returns the JSON representation of the model using alias"""
|
|
45
|
-
|
|
46
|
-
return json.dumps(self.to_dict())
|
|
47
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
47
48
|
|
|
48
49
|
@classmethod
|
|
49
50
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
{stackit_edge-0.3.0 → stackit_edge-0.5.0}/src/stackit/edge/models/create_instance_payload.py
RENAMED
|
@@ -19,6 +19,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
|
19
19
|
from uuid import UUID
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
22
23
|
from typing_extensions import Annotated, Self
|
|
23
24
|
|
|
24
25
|
|
|
@@ -37,7 +38,8 @@ class CreateInstancePayload(BaseModel):
|
|
|
37
38
|
__properties: ClassVar[List[str]] = ["description", "displayName", "planId"]
|
|
38
39
|
|
|
39
40
|
model_config = ConfigDict(
|
|
40
|
-
|
|
41
|
+
validate_by_name=True,
|
|
42
|
+
validate_by_alias=True,
|
|
41
43
|
validate_assignment=True,
|
|
42
44
|
protected_namespaces=(),
|
|
43
45
|
)
|
|
@@ -48,8 +50,7 @@ class CreateInstancePayload(BaseModel):
|
|
|
48
50
|
|
|
49
51
|
def to_json(self) -> str:
|
|
50
52
|
"""Returns the JSON representation of the model using alias"""
|
|
51
|
-
|
|
52
|
-
return json.dumps(self.to_dict())
|
|
53
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
53
54
|
|
|
54
55
|
@classmethod
|
|
55
56
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -21,6 +21,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
|
21
21
|
from uuid import UUID
|
|
22
22
|
|
|
23
23
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
24
|
+
from pydantic_core import to_jsonable_python
|
|
24
25
|
from typing_extensions import Annotated, Self
|
|
25
26
|
|
|
26
27
|
|
|
@@ -73,7 +74,8 @@ class Instance(BaseModel):
|
|
|
73
74
|
return value
|
|
74
75
|
|
|
75
76
|
model_config = ConfigDict(
|
|
76
|
-
|
|
77
|
+
validate_by_name=True,
|
|
78
|
+
validate_by_alias=True,
|
|
77
79
|
validate_assignment=True,
|
|
78
80
|
protected_namespaces=(),
|
|
79
81
|
)
|
|
@@ -84,8 +86,7 @@ class Instance(BaseModel):
|
|
|
84
86
|
|
|
85
87
|
def to_json(self) -> str:
|
|
86
88
|
"""Returns the JSON representation of the model using alias"""
|
|
87
|
-
|
|
88
|
-
return json.dumps(self.to_dict())
|
|
89
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
89
90
|
|
|
90
91
|
@classmethod
|
|
91
92
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -18,6 +18,7 @@ import pprint
|
|
|
18
18
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict
|
|
21
|
+
from pydantic_core import to_jsonable_python
|
|
21
22
|
from typing_extensions import Self
|
|
22
23
|
|
|
23
24
|
from stackit.edge.models.instance import Instance
|
|
@@ -32,7 +33,8 @@ class InstanceList(BaseModel):
|
|
|
32
33
|
__properties: ClassVar[List[str]] = ["instances"]
|
|
33
34
|
|
|
34
35
|
model_config = ConfigDict(
|
|
35
|
-
|
|
36
|
+
validate_by_name=True,
|
|
37
|
+
validate_by_alias=True,
|
|
36
38
|
validate_assignment=True,
|
|
37
39
|
protected_namespaces=(),
|
|
38
40
|
)
|
|
@@ -43,8 +45,7 @@ class InstanceList(BaseModel):
|
|
|
43
45
|
|
|
44
46
|
def to_json(self) -> str:
|
|
45
47
|
"""Returns the JSON representation of the model using alias"""
|
|
46
|
-
|
|
47
|
-
return json.dumps(self.to_dict())
|
|
48
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
48
49
|
|
|
49
50
|
@classmethod
|
|
50
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -18,6 +18,7 @@ import pprint
|
|
|
18
18
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field
|
|
21
|
+
from pydantic_core import to_jsonable_python
|
|
21
22
|
from typing_extensions import Self
|
|
22
23
|
|
|
23
24
|
|
|
@@ -30,7 +31,8 @@ class Kubeconfig(BaseModel):
|
|
|
30
31
|
__properties: ClassVar[List[str]] = ["kubeconfig"]
|
|
31
32
|
|
|
32
33
|
model_config = ConfigDict(
|
|
33
|
-
|
|
34
|
+
validate_by_name=True,
|
|
35
|
+
validate_by_alias=True,
|
|
34
36
|
validate_assignment=True,
|
|
35
37
|
protected_namespaces=(),
|
|
36
38
|
)
|
|
@@ -41,8 +43,7 @@ class Kubeconfig(BaseModel):
|
|
|
41
43
|
|
|
42
44
|
def to_json(self) -> str:
|
|
43
45
|
"""Returns the JSON representation of the model using alias"""
|
|
44
|
-
|
|
45
|
-
return json.dumps(self.to_dict())
|
|
46
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
46
47
|
|
|
47
48
|
@classmethod
|
|
48
49
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Edge Cloud API
|
|
5
|
+
|
|
6
|
+
This API provides endpoints for managing STACKIT Edge Cloud instances.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1beta1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
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 pydantic_core import to_jsonable_python
|
|
22
|
+
from typing_extensions import Self
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class KubernetesReleaseList(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
A list of compatible Kubernetes releases.
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
|
|
30
|
+
k8s_releases: List[StrictStr] = Field(description="Array of Kubernetes version strings.")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["k8s_releases"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
validate_by_name=True,
|
|
35
|
+
validate_by_alias=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
50
|
+
"""Create an instance of KubernetesReleaseList 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 KubernetesReleaseList 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({"k8s_releases": obj.get("k8s_releases")})
|
|
82
|
+
return _obj
|
|
@@ -19,6 +19,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
|
19
19
|
from uuid import UUID
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
22
23
|
from typing_extensions import Self
|
|
23
24
|
|
|
24
25
|
|
|
@@ -39,7 +40,8 @@ class Plan(BaseModel):
|
|
|
39
40
|
__properties: ClassVar[List[str]] = ["description", "id", "maxEdgeHosts", "minEdgeHosts", "name"]
|
|
40
41
|
|
|
41
42
|
model_config = ConfigDict(
|
|
42
|
-
|
|
43
|
+
validate_by_name=True,
|
|
44
|
+
validate_by_alias=True,
|
|
43
45
|
validate_assignment=True,
|
|
44
46
|
protected_namespaces=(),
|
|
45
47
|
)
|
|
@@ -50,8 +52,7 @@ class Plan(BaseModel):
|
|
|
50
52
|
|
|
51
53
|
def to_json(self) -> str:
|
|
52
54
|
"""Returns the JSON representation of the model using alias"""
|
|
53
|
-
|
|
54
|
-
return json.dumps(self.to_dict())
|
|
55
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
55
56
|
|
|
56
57
|
@classmethod
|
|
57
58
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -18,6 +18,7 @@ import pprint
|
|
|
18
18
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field
|
|
21
|
+
from pydantic_core import to_jsonable_python
|
|
21
22
|
from typing_extensions import Self
|
|
22
23
|
|
|
23
24
|
from stackit.edge.models.plan import Plan
|
|
@@ -32,7 +33,8 @@ class PlanList(BaseModel):
|
|
|
32
33
|
__properties: ClassVar[List[str]] = ["validPlans"]
|
|
33
34
|
|
|
34
35
|
model_config = ConfigDict(
|
|
35
|
-
|
|
36
|
+
validate_by_name=True,
|
|
37
|
+
validate_by_alias=True,
|
|
36
38
|
validate_assignment=True,
|
|
37
39
|
protected_namespaces=(),
|
|
38
40
|
)
|
|
@@ -43,8 +45,7 @@ class PlanList(BaseModel):
|
|
|
43
45
|
|
|
44
46
|
def to_json(self) -> str:
|
|
45
47
|
"""Returns the JSON representation of the model using alias"""
|
|
46
|
-
|
|
47
|
-
return json.dumps(self.to_dict())
|
|
48
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
48
49
|
|
|
49
50
|
@classmethod
|
|
50
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -18,6 +18,7 @@ import pprint
|
|
|
18
18
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from pydantic_core import to_jsonable_python
|
|
21
22
|
from typing_extensions import Self
|
|
22
23
|
|
|
23
24
|
|
|
@@ -30,7 +31,8 @@ class Token(BaseModel):
|
|
|
30
31
|
__properties: ClassVar[List[str]] = ["token"]
|
|
31
32
|
|
|
32
33
|
model_config = ConfigDict(
|
|
33
|
-
|
|
34
|
+
validate_by_name=True,
|
|
35
|
+
validate_by_alias=True,
|
|
34
36
|
validate_assignment=True,
|
|
35
37
|
protected_namespaces=(),
|
|
36
38
|
)
|
|
@@ -41,8 +43,7 @@ class Token(BaseModel):
|
|
|
41
43
|
|
|
42
44
|
def to_json(self) -> str:
|
|
43
45
|
"""Returns the JSON representation of the model using alias"""
|
|
44
|
-
|
|
45
|
-
return json.dumps(self.to_dict())
|
|
46
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
46
47
|
|
|
47
48
|
@classmethod
|
|
48
49
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -18,6 +18,7 @@ import pprint
|
|
|
18
18
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
21
|
+
from pydantic_core import to_jsonable_python
|
|
21
22
|
from typing_extensions import Self
|
|
22
23
|
|
|
23
24
|
|
|
@@ -31,7 +32,8 @@ class UnauthorizedRequest(BaseModel):
|
|
|
31
32
|
__properties: ClassVar[List[str]] = ["code", "message"]
|
|
32
33
|
|
|
33
34
|
model_config = ConfigDict(
|
|
34
|
-
|
|
35
|
+
validate_by_name=True,
|
|
36
|
+
validate_by_alias=True,
|
|
35
37
|
validate_assignment=True,
|
|
36
38
|
protected_namespaces=(),
|
|
37
39
|
)
|
|
@@ -42,8 +44,7 @@ class UnauthorizedRequest(BaseModel):
|
|
|
42
44
|
|
|
43
45
|
def to_json(self) -> str:
|
|
44
46
|
"""Returns the JSON representation of the model using alias"""
|
|
45
|
-
|
|
46
|
-
return json.dumps(self.to_dict())
|
|
47
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
47
48
|
|
|
48
49
|
@classmethod
|
|
49
50
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
{stackit_edge-0.3.0 → stackit_edge-0.5.0}/src/stackit/edge/models/update_instance_by_name_payload.py
RENAMED
|
@@ -19,6 +19,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
|
19
19
|
from uuid import UUID
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
22
23
|
from typing_extensions import Annotated, Self
|
|
23
24
|
|
|
24
25
|
|
|
@@ -36,7 +37,8 @@ class UpdateInstanceByNamePayload(BaseModel):
|
|
|
36
37
|
__properties: ClassVar[List[str]] = ["description", "planId"]
|
|
37
38
|
|
|
38
39
|
model_config = ConfigDict(
|
|
39
|
-
|
|
40
|
+
validate_by_name=True,
|
|
41
|
+
validate_by_alias=True,
|
|
40
42
|
validate_assignment=True,
|
|
41
43
|
protected_namespaces=(),
|
|
42
44
|
)
|
|
@@ -47,8 +49,7 @@ class UpdateInstanceByNamePayload(BaseModel):
|
|
|
47
49
|
|
|
48
50
|
def to_json(self) -> str:
|
|
49
51
|
"""Returns the JSON representation of the model using alias"""
|
|
50
|
-
|
|
51
|
-
return json.dumps(self.to_dict())
|
|
52
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
52
53
|
|
|
53
54
|
@classmethod
|
|
54
55
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
{stackit_edge-0.3.0 → stackit_edge-0.5.0}/src/stackit/edge/models/update_instance_payload.py
RENAMED
|
@@ -19,6 +19,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
|
19
19
|
from uuid import UUID
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
22
23
|
from typing_extensions import Annotated, Self
|
|
23
24
|
|
|
24
25
|
|
|
@@ -36,7 +37,8 @@ class UpdateInstancePayload(BaseModel):
|
|
|
36
37
|
__properties: ClassVar[List[str]] = ["description", "planId"]
|
|
37
38
|
|
|
38
39
|
model_config = ConfigDict(
|
|
39
|
-
|
|
40
|
+
validate_by_name=True,
|
|
41
|
+
validate_by_alias=True,
|
|
40
42
|
validate_assignment=True,
|
|
41
43
|
protected_namespaces=(),
|
|
42
44
|
)
|
|
@@ -47,8 +49,7 @@ class UpdateInstancePayload(BaseModel):
|
|
|
47
49
|
|
|
48
50
|
def to_json(self) -> str:
|
|
49
51
|
"""Returns the JSON representation of the model using alias"""
|
|
50
|
-
|
|
51
|
-
return json.dumps(self.to_dict())
|
|
52
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
52
53
|
|
|
53
54
|
@classmethod
|
|
54
55
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -19,6 +19,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
|
19
19
|
from uuid import UUID
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
22
23
|
from typing_extensions import Self
|
|
23
24
|
|
|
24
25
|
|
|
@@ -32,7 +33,8 @@ class User(BaseModel):
|
|
|
32
33
|
__properties: ClassVar[List[str]] = ["email", "internalId"]
|
|
33
34
|
|
|
34
35
|
model_config = ConfigDict(
|
|
35
|
-
|
|
36
|
+
validate_by_name=True,
|
|
37
|
+
validate_by_alias=True,
|
|
36
38
|
validate_assignment=True,
|
|
37
39
|
protected_namespaces=(),
|
|
38
40
|
)
|
|
@@ -43,8 +45,7 @@ class User(BaseModel):
|
|
|
43
45
|
|
|
44
46
|
def to_json(self) -> str:
|
|
45
47
|
"""Returns the JSON representation of the model using alias"""
|
|
46
|
-
|
|
47
|
-
return json.dumps(self.to_dict())
|
|
48
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
48
49
|
|
|
49
50
|
@classmethod
|
|
50
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
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
|