stackit-postgresflex 0.0.1a0__tar.gz → 0.2.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_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/PKG-INFO +1 -1
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/pyproject.toml +4 -1
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/api/default_api.py +9 -9
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/configuration.py +28 -1
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/README.md +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/__init__.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/api/__init__.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/api_client.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/api_response.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/exceptions.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/__init__.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/acl.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/api_configuration.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/api_extension_config_load_response.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/api_extension_configure_response.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/api_extension_delete_response.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/api_extension_list.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/api_extension_load_response.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/api_install_response.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/api_installed_list_response.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/backup.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/clone_instance_payload.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/clone_instance_response.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/create_database_payload.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/create_instance_payload.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/create_instance_response.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/create_user_payload.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/create_user_response.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/error.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/extensions_configuration.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/extensions_extension_list_response.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/extensions_new_config.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/flavor.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/get_backup_response.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/get_user_response.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/instance.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/instance_create_database_response.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/instance_data_point.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/instance_database.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/instance_host.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/instance_host_metric.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/instance_list_databases_response.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/instance_list_instance.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/instance_metrics_response.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/instance_response.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/list_backups_response.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/list_flavors_response.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/list_instances_response.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/list_storages_response.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/list_users_response.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/list_users_response_item.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/list_versions_response.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/partial_update_instance_payload.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/partial_update_instance_response.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/partial_update_user_payload.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/postgres_database_parameter.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/postgres_database_parameter_response.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/reset_user_response.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/storage.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/storage_range.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/update_backup_schedule_payload.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/update_instance_payload.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/update_user_payload.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/user.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/user_response.py +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/py.typed +0 -0
- {stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/rest.py +0 -0
|
@@ -4438,7 +4438,7 @@ class DefaultApi:
|
|
|
4438
4438
|
metric: Annotated[
|
|
4439
4439
|
StrictStr,
|
|
4440
4440
|
Field(
|
|
4441
|
-
description="The name of the metric. Valid metrics are 'cpu', 'memory', '
|
|
4441
|
+
description="The name of the metric. Valid metrics are 'cpu', 'memory', 'disk-use', 'disk-size' and 'connections'."
|
|
4442
4442
|
),
|
|
4443
4443
|
],
|
|
4444
4444
|
granularity: Annotated[StrictStr, Field(description="The granularity in ISO8601 e.g. 5 minutes are 'PT5M'.")],
|
|
@@ -4472,13 +4472,13 @@ class DefaultApi:
|
|
|
4472
4472
|
) -> InstanceMetricsResponse:
|
|
4473
4473
|
"""Get Metric
|
|
4474
4474
|
|
|
4475
|
-
Returns a metric for an instance. The metric will only be for the master pod if needed. Granularity parameter is always needed. If start and end time is provided, period is not considered in
|
|
4475
|
+
Returns a metric for an instance. The metric will only be for the master pod if needed. Granularity parameter is always needed. If start and end time is provided, period is not considered in connections and disk-use. If you provide start time, you have to provide end time as well and vice versa.
|
|
4476
4476
|
|
|
4477
4477
|
:param project_id: The UUID of the project. (required)
|
|
4478
4478
|
:type project_id: str
|
|
4479
4479
|
:param instance_id: The UUID of the instance. (required)
|
|
4480
4480
|
:type instance_id: str
|
|
4481
|
-
:param metric: The name of the metric. Valid metrics are 'cpu', 'memory', '
|
|
4481
|
+
:param metric: The name of the metric. Valid metrics are 'cpu', 'memory', 'disk-use', 'disk-size' and 'connections'. (required)
|
|
4482
4482
|
:type metric: str
|
|
4483
4483
|
:param granularity: The granularity in ISO8601 e.g. 5 minutes are 'PT5M'. (required)
|
|
4484
4484
|
:type granularity: str
|
|
@@ -4545,7 +4545,7 @@ class DefaultApi:
|
|
|
4545
4545
|
metric: Annotated[
|
|
4546
4546
|
StrictStr,
|
|
4547
4547
|
Field(
|
|
4548
|
-
description="The name of the metric. Valid metrics are 'cpu', 'memory', '
|
|
4548
|
+
description="The name of the metric. Valid metrics are 'cpu', 'memory', 'disk-use', 'disk-size' and 'connections'."
|
|
4549
4549
|
),
|
|
4550
4550
|
],
|
|
4551
4551
|
granularity: Annotated[StrictStr, Field(description="The granularity in ISO8601 e.g. 5 minutes are 'PT5M'.")],
|
|
@@ -4579,13 +4579,13 @@ class DefaultApi:
|
|
|
4579
4579
|
) -> ApiResponse[InstanceMetricsResponse]:
|
|
4580
4580
|
"""Get Metric
|
|
4581
4581
|
|
|
4582
|
-
Returns a metric for an instance. The metric will only be for the master pod if needed. Granularity parameter is always needed. If start and end time is provided, period is not considered in
|
|
4582
|
+
Returns a metric for an instance. The metric will only be for the master pod if needed. Granularity parameter is always needed. If start and end time is provided, period is not considered in connections and disk-use. If you provide start time, you have to provide end time as well and vice versa.
|
|
4583
4583
|
|
|
4584
4584
|
:param project_id: The UUID of the project. (required)
|
|
4585
4585
|
:type project_id: str
|
|
4586
4586
|
:param instance_id: The UUID of the instance. (required)
|
|
4587
4587
|
:type instance_id: str
|
|
4588
|
-
:param metric: The name of the metric. Valid metrics are 'cpu', 'memory', '
|
|
4588
|
+
:param metric: The name of the metric. Valid metrics are 'cpu', 'memory', 'disk-use', 'disk-size' and 'connections'. (required)
|
|
4589
4589
|
:type metric: str
|
|
4590
4590
|
:param granularity: The granularity in ISO8601 e.g. 5 minutes are 'PT5M'. (required)
|
|
4591
4591
|
:type granularity: str
|
|
@@ -4652,7 +4652,7 @@ class DefaultApi:
|
|
|
4652
4652
|
metric: Annotated[
|
|
4653
4653
|
StrictStr,
|
|
4654
4654
|
Field(
|
|
4655
|
-
description="The name of the metric. Valid metrics are 'cpu', 'memory', '
|
|
4655
|
+
description="The name of the metric. Valid metrics are 'cpu', 'memory', 'disk-use', 'disk-size' and 'connections'."
|
|
4656
4656
|
),
|
|
4657
4657
|
],
|
|
4658
4658
|
granularity: Annotated[StrictStr, Field(description="The granularity in ISO8601 e.g. 5 minutes are 'PT5M'.")],
|
|
@@ -4686,13 +4686,13 @@ class DefaultApi:
|
|
|
4686
4686
|
) -> RESTResponseType:
|
|
4687
4687
|
"""Get Metric
|
|
4688
4688
|
|
|
4689
|
-
Returns a metric for an instance. The metric will only be for the master pod if needed. Granularity parameter is always needed. If start and end time is provided, period is not considered in
|
|
4689
|
+
Returns a metric for an instance. The metric will only be for the master pod if needed. Granularity parameter is always needed. If start and end time is provided, period is not considered in connections and disk-use. If you provide start time, you have to provide end time as well and vice versa.
|
|
4690
4690
|
|
|
4691
4691
|
:param project_id: The UUID of the project. (required)
|
|
4692
4692
|
:type project_id: str
|
|
4693
4693
|
:param instance_id: The UUID of the instance. (required)
|
|
4694
4694
|
:type instance_id: str
|
|
4695
|
-
:param metric: The name of the metric. Valid metrics are 'cpu', 'memory', '
|
|
4695
|
+
:param metric: The name of the metric. Valid metrics are 'cpu', 'memory', 'disk-use', 'disk-size' and 'connections'. (required)
|
|
4696
4696
|
:type metric: str
|
|
4697
4697
|
:param granularity: The granularity in ISO8601 e.g. 5 minutes are 'PT5M'. (required)
|
|
4698
4698
|
:type granularity: str
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
Do not edit the class manually.
|
|
13
13
|
""" # noqa: E501 docstring might be too long
|
|
14
14
|
|
|
15
|
+
import os
|
|
16
|
+
|
|
15
17
|
|
|
16
18
|
class HostConfiguration:
|
|
17
19
|
def __init__(
|
|
@@ -23,7 +25,14 @@ class HostConfiguration:
|
|
|
23
25
|
server_operation_variables=None,
|
|
24
26
|
ignore_operation_servers=False,
|
|
25
27
|
) -> None:
|
|
26
|
-
|
|
28
|
+
print(
|
|
29
|
+
"WARNING: STACKIT will move to a new way of specifying regions, where the region is provided\n",
|
|
30
|
+
"as a function argument instead of being set in the client configuration.\n"
|
|
31
|
+
"Once all services have migrated, the methods to specify the region in the client configuration "
|
|
32
|
+
"will be removed.",
|
|
33
|
+
)
|
|
34
|
+
"""Constructor
|
|
35
|
+
"""
|
|
27
36
|
self._base_path = "https://postgres-flex-service.api.eu01.stackit.cloud"
|
|
28
37
|
"""Default Base url
|
|
29
38
|
"""
|
|
@@ -65,6 +74,7 @@ class HostConfiguration:
|
|
|
65
74
|
:param index: array index of the host settings
|
|
66
75
|
:param variables: hash of variable and the corresponding value
|
|
67
76
|
:param servers: an array of host settings or None
|
|
77
|
+
:error: if a region is given for a global url
|
|
68
78
|
:return: URL based on host settings
|
|
69
79
|
"""
|
|
70
80
|
if index is None:
|
|
@@ -83,8 +93,25 @@ class HostConfiguration:
|
|
|
83
93
|
|
|
84
94
|
url = server["url"]
|
|
85
95
|
|
|
96
|
+
# check if environment variable was provided for region
|
|
97
|
+
# if nothing was set this is None
|
|
98
|
+
region_env = os.environ.get("STACKIT_REGION")
|
|
99
|
+
|
|
86
100
|
# go through variables and replace placeholders
|
|
87
101
|
for variable_name, variable in server.get("variables", {}).items():
|
|
102
|
+
# If a region is provided by the user for a global url
|
|
103
|
+
# return an error (except for providing via environment variable).
|
|
104
|
+
# The region is provided as a function argument instead of being set in the client configuration.
|
|
105
|
+
if (
|
|
106
|
+
variable_name == "region"
|
|
107
|
+
and (variable["default_value"] == "global" or variable["default_value"] == "")
|
|
108
|
+
and region_env is None
|
|
109
|
+
and variables.get(variable_name) is not None
|
|
110
|
+
):
|
|
111
|
+
raise ValueError(
|
|
112
|
+
"this API does not support setting a region in the the client configuration, "
|
|
113
|
+
"please check if the region can be specified as a function parameter"
|
|
114
|
+
)
|
|
88
115
|
used_value = variables.get(variable_name, variable["default_value"])
|
|
89
116
|
|
|
90
117
|
if "enum_values" in variable and used_value not in variable["enum_values"]:
|
|
File without changes
|
{stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/__init__.py
RENAMED
|
File without changes
|
{stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/api/__init__.py
RENAMED
|
File without changes
|
{stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/api_client.py
RENAMED
|
File without changes
|
{stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/api_response.py
RENAMED
|
File without changes
|
{stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
{stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/acl.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
|
{stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/error.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
|
|
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_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/models/user.py
RENAMED
|
File without changes
|
|
File without changes
|
{stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/py.typed
RENAMED
|
File without changes
|
{stackit_postgresflex-0.0.1a0 → stackit_postgresflex-0.2.0}/src/stackit/postgresflex/rest.py
RENAMED
|
File without changes
|