amsdal 0.1.26__cp310-cp310-win_amd64.whl → 0.2.0__cp310-cp310-win_amd64.whl
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.
Potentially problematic release.
This version of amsdal might be problematic. Click here for more details.
- amsdal/__about__.py +1 -1
- amsdal/cloud/__init__.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/client.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/client.pyi +46 -2
- amsdal/cloud/constants.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/enums.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/enums.pyi +46 -0
- amsdal/cloud/models/__init__.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/models/base.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/models/base.pyi +156 -0
- amsdal/cloud/services/__init__.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/actions/__init__.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/actions/add_allowlist_ip.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/actions/add_allowlist_ip.pyi +16 -1
- amsdal/cloud/services/actions/add_basic_auth.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/actions/add_basic_auth.pyi +17 -1
- amsdal/cloud/services/actions/add_dependency.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/actions/add_dependency.pyi +16 -1
- amsdal/cloud/services/actions/add_secret.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/actions/add_secret.pyi +17 -1
- amsdal/cloud/services/actions/base.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/actions/base.pyi +71 -3
- amsdal/cloud/services/actions/create_deploy.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/actions/create_deploy.pyi +33 -3
- amsdal/cloud/services/actions/create_env.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/actions/create_env.pyi +15 -1
- amsdal/cloud/services/actions/create_session.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/actions/create_session.pyi +13 -1
- amsdal/cloud/services/actions/delete_allowlist_ip.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/actions/delete_allowlist_ip.pyi +16 -1
- amsdal/cloud/services/actions/delete_basic_auth.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/actions/delete_basic_auth.pyi +17 -1
- amsdal/cloud/services/actions/delete_dependency.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/actions/delete_dependency.pyi +18 -1
- amsdal/cloud/services/actions/delete_env.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/actions/delete_env.pyi +17 -1
- amsdal/cloud/services/actions/delete_secret.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/actions/delete_secret.pyi +18 -1
- amsdal/cloud/services/actions/destroy_deploy.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/actions/destroy_deploy.pyi +15 -1
- amsdal/cloud/services/actions/expose_db.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/actions/expose_db.pyi +18 -1
- amsdal/cloud/services/actions/get_basic_auth_credentials.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/actions/get_basic_auth_credentials.pyi +17 -1
- amsdal/cloud/services/actions/get_monitoring_info.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/actions/get_monitoring_info.pyi +17 -1
- amsdal/cloud/services/actions/list_dependencies.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/actions/list_dependencies.pyi +17 -1
- amsdal/cloud/services/actions/list_deploys.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/actions/list_deploys.pyi +15 -1
- amsdal/cloud/services/actions/list_envs.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/actions/list_envs.pyi +16 -1
- amsdal/cloud/services/actions/list_secrets.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/actions/list_secrets.pyi +18 -1
- amsdal/cloud/services/actions/manager.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/actions/manager.pyi +254 -20
- amsdal/cloud/services/actions/signup_action.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/actions/signup_action.pyi +16 -1
- amsdal/cloud/services/actions/update_deploy.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/actions/update_deploy.pyi +15 -1
- amsdal/cloud/services/auth/__init__.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/auth/base.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/auth/credentials.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/auth/credentials.pyi +12 -1
- amsdal/cloud/services/auth/manager.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/auth/manager.pyi +15 -1
- amsdal/cloud/services/auth/signup_service.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/auth/signup_service.pyi +16 -1
- amsdal/cloud/services/auth/token.cp310-win_amd64.pyd +0 -0
- amsdal/cloud/services/auth/token.pyi +15 -1
- amsdal/configs/constants.py +10 -0
- amsdal/configs/constants.pyi +11 -1
- amsdal/configs/main.py +132 -19
- amsdal/configs/main.pyi +140 -10
- amsdal/context/manager.py +39 -0
- amsdal/context/manager.pyi +41 -3
- amsdal/contrib/__init__.cp310-win_amd64.pyd +0 -0
- amsdal/contrib/auth/app.py +12 -0
- amsdal/contrib/auth/app.pyi +12 -1
- amsdal/contrib/auth/lifecycle/consumer.py +53 -0
- amsdal/contrib/auth/lifecycle/consumer.pyi +53 -3
- amsdal/contrib/auth/models/login_session/hooks/pre_init.py +13 -0
- amsdal/contrib/auth/models/login_session/modifiers/display_name.py +8 -0
- amsdal/contrib/auth/models/permission/modifiers/display_name.py +8 -0
- amsdal/contrib/auth/models/user/hooks/post_init.py +13 -0
- amsdal/contrib/auth/models/user/hooks/pre_create.py +6 -0
- amsdal/contrib/auth/models/user/modifiers/display_name.py +8 -0
- amsdal/contrib/auth/settings.py +15 -0
- amsdal/contrib/auth/settings.pyi +14 -0
- amsdal/contrib/frontend_configs/app.py +14 -0
- amsdal/contrib/frontend_configs/app.pyi +14 -1
- amsdal/contrib/frontend_configs/conversion/convert.py +14 -0
- amsdal/contrib/frontend_configs/conversion/convert.pyi +15 -1
- amsdal/contrib/frontend_configs/lifecycle/consumer.py +75 -3
- amsdal/contrib/frontend_configs/lifecycle/consumer.pyi +77 -6
- amsdal/contrib/frontend_configs/models/frontent_config_control_action/properties/action_validate.py +16 -0
- amsdal/contrib/frontend_configs/utils.py +12 -1
- amsdal/contrib/frontend_configs/utils.pyi +12 -1
- amsdal/fixtures/__init__.cp310-win_amd64.pyd +0 -0
- amsdal/fixtures/manager.cp310-win_amd64.pyd +0 -0
- amsdal/fixtures/manager.pyi +90 -8
- amsdal/manager.cp310-win_amd64.pyd +0 -0
- amsdal/manager.pyi +113 -25
- amsdal/migration/__init__.cp310-win_amd64.pyd +0 -0
- amsdal/migration/base_migration_schemas.cp310-win_amd64.pyd +0 -0
- amsdal/migration/base_migration_schemas.pyi +84 -8
- amsdal/migration/data_classes.cp310-win_amd64.pyd +0 -0
- amsdal/migration/data_classes.pyi +104 -4
- amsdal/migration/executors/__init__.cp310-win_amd64.pyd +0 -0
- amsdal/migration/executors/base.cp310-win_amd64.pyd +0 -0
- amsdal/migration/executors/base.pyi +75 -5
- amsdal/migration/executors/default_executor.cp310-win_amd64.pyd +0 -0
- amsdal/migration/executors/default_executor.pyi +82 -10
- amsdal/migration/executors/state_executor.cp310-win_amd64.pyd +0 -0
- amsdal/migration/executors/state_executor.pyi +69 -5
- amsdal/migration/file_migration_executor.cp310-win_amd64.pyd +0 -0
- amsdal/migration/file_migration_executor.pyi +34 -2
- amsdal/migration/file_migration_generator.cp310-win_amd64.pyd +0 -0
- amsdal/migration/file_migration_generator.pyi +102 -10
- amsdal/migration/file_migration_store.cp310-win_amd64.pyd +0 -0
- amsdal/migration/file_migration_store.pyi +36 -8
- amsdal/migration/file_migration_writer.cp310-win_amd64.pyd +0 -0
- amsdal/migration/file_migration_writer.pyi +60 -5
- amsdal/migration/migrations.cp310-win_amd64.pyd +0 -0
- amsdal/migration/migrations.pyi +111 -6
- amsdal/migration/migrations_loader.cp310-win_amd64.pyd +0 -0
- amsdal/migration/migrations_loader.pyi +17 -2
- amsdal/migration/schemas_loaders.cp310-win_amd64.pyd +0 -0
- amsdal/migration/schemas_loaders.pyi +15 -2
- amsdal/migration/utils.cp310-win_amd64.pyd +0 -0
- amsdal/migration/utils.pyi +46 -6
- amsdal/mixins/__init__.cp310-win_amd64.pyd +0 -0
- amsdal/mixins/build_mixin.cp310-win_amd64.pyd +0 -0
- amsdal/mixins/build_mixin.pyi +60 -8
- amsdal/mixins/class_versions_mixin.cp310-win_amd64.pyd +0 -0
- amsdal/mixins/class_versions_mixin.pyi +3 -7
- amsdal/schemas/core/class_object/properties/display_name.py +6 -0
- amsdal/schemas/core/file/hooks/pre_create.py +9 -0
- amsdal/schemas/core/file/hooks/pre_update.py +9 -0
- amsdal/schemas/core/file/properties/from_file.py +12 -0
- amsdal/schemas/core/file/properties/mimetype.py +8 -0
- amsdal/schemas/core/file/properties/to_file.py +12 -0
- amsdal/schemas/core/file/properties/validate_data.py +13 -0
- amsdal/schemas/manager.cp310-win_amd64.pyd +0 -0
- amsdal/schemas/manager.py +53 -2
- amsdal/schemas/manager.pyi +55 -5
- amsdal/services/__init__.cp310-win_amd64.pyd +0 -0
- amsdal/services/transaction_execution.cp310-win_amd64.pyd +0 -0
- amsdal/services/transaction_execution.pyi +52 -3
- amsdal/utils/contrib_paths.py +10 -0
- amsdal/utils/contrib_paths.pyi +11 -1
- amsdal/utils/tests/helpers.py +5 -7
- {amsdal-0.1.26.dist-info → amsdal-0.2.0.dist-info}/METADATA +4 -6
- amsdal-0.2.0.dist-info/RECORD +254 -0
- amsdal/operations/__init__.cp310-win_amd64.pyd +0 -0
- amsdal/operations/__init__.pyi +0 -0
- amsdal/operations/manager.cp310-win_amd64.pyd +0 -0
- amsdal/operations/manager.pyi +0 -24
- amsdal-0.1.26.dist-info/RECORD +0 -258
- {amsdal-0.1.26.dist-info → amsdal-0.2.0.dist-info}/LICENSE.txt +0 -0
- {amsdal-0.1.26.dist-info → amsdal-0.2.0.dist-info}/WHEEL +0 -0
- {amsdal-0.1.26.dist-info → amsdal-0.2.0.dist-info}/license_check.py +0 -0
- {amsdal-0.1.26.dist-info → amsdal-0.2.0.dist-info}/top_level.txt +0 -0
amsdal/__about__.py
CHANGED
|
Binary file
|
|
Binary file
|
amsdal/cloud/client.pyi
CHANGED
|
@@ -4,10 +4,54 @@ from amsdal.errors import AmsdalAuthConnectionError as AmsdalAuthConnectionError
|
|
|
4
4
|
from typing import Any, Protocol
|
|
5
5
|
|
|
6
6
|
class HttpFunction(Protocol):
|
|
7
|
+
"""
|
|
8
|
+
Protocol for HTTP function callables.
|
|
9
|
+
|
|
10
|
+
This protocol defines the structure for callables that perform HTTP requests, ensuring they accept a URL and
|
|
11
|
+
additional keyword arguments.
|
|
12
|
+
"""
|
|
7
13
|
def __call__(self, url: str, **kwargs: Any) -> httpx.Response: ...
|
|
8
14
|
|
|
9
15
|
class AuthClientService:
|
|
16
|
+
"""
|
|
17
|
+
Service to handle HTTP requests for authentication.
|
|
18
|
+
|
|
19
|
+
This class provides functionality to perform HTTP GET and POST requests to the authentication server,
|
|
20
|
+
handling connection errors and setting default timeouts.
|
|
21
|
+
"""
|
|
10
22
|
DEFAULT_TIMEOUT: int
|
|
11
23
|
def _default_handler(self, calling_function: HttpFunction, path: str, **kwargs: Any) -> httpx.Response: ...
|
|
12
|
-
def post(self, path: str, **kwargs: Any) -> httpx.Response:
|
|
13
|
-
|
|
24
|
+
def post(self, path: str, **kwargs: Any) -> httpx.Response:
|
|
25
|
+
"""
|
|
26
|
+
Sends an HTTP POST request to the specified path.
|
|
27
|
+
|
|
28
|
+
This method constructs the full URL using the base authentication URL and the provided path,
|
|
29
|
+
sets a default timeout, and sends an HTTP POST request.
|
|
30
|
+
|
|
31
|
+
Args:
|
|
32
|
+
path (str): The path to append to the base authentication URL.
|
|
33
|
+
**kwargs (Any): Additional keyword arguments to pass to the `httpx.post` function.
|
|
34
|
+
|
|
35
|
+
Returns:
|
|
36
|
+
httpx.Response: The response from the HTTP POST request.
|
|
37
|
+
|
|
38
|
+
Raises:
|
|
39
|
+
AmsdalAuthConnectionError: If there is a connection error.
|
|
40
|
+
"""
|
|
41
|
+
def get(self, path: str, **kwargs: Any) -> httpx.Response:
|
|
42
|
+
"""
|
|
43
|
+
Sends an HTTP GET request to the specified path.
|
|
44
|
+
|
|
45
|
+
This method constructs the full URL using the base authentication URL and the provided path,
|
|
46
|
+
sets a default timeout, and sends an HTTP GET request.
|
|
47
|
+
|
|
48
|
+
Args:
|
|
49
|
+
path (str): The path to append to the base authentication URL.
|
|
50
|
+
**kwargs (Any): Additional keyword arguments to pass to the `httpx.get` function.
|
|
51
|
+
|
|
52
|
+
Returns:
|
|
53
|
+
httpx.Response: The response from the HTTP GET request.
|
|
54
|
+
|
|
55
|
+
Raises:
|
|
56
|
+
AmsdalAuthConnectionError: If there is a connection error.
|
|
57
|
+
"""
|
|
Binary file
|
|
Binary file
|
amsdal/cloud/enums.pyi
CHANGED
|
@@ -1,22 +1,68 @@
|
|
|
1
1
|
from enum import Enum
|
|
2
2
|
|
|
3
3
|
class AuthType(Enum):
|
|
4
|
+
"""
|
|
5
|
+
Enumeration for authentication types.
|
|
6
|
+
|
|
7
|
+
This enum defines the types of authentication methods available.
|
|
8
|
+
|
|
9
|
+
Attributes:
|
|
10
|
+
CREDENTIALS: Authentication using credentials.
|
|
11
|
+
TOKEN: Authentication using a token.
|
|
12
|
+
"""
|
|
4
13
|
CREDENTIALS = ...
|
|
5
14
|
TOKEN = ...
|
|
6
15
|
|
|
7
16
|
class DeployType(str, Enum):
|
|
17
|
+
"""
|
|
18
|
+
Enumeration for deployment types.
|
|
19
|
+
|
|
20
|
+
This enum defines the types of deployment methods available.
|
|
21
|
+
|
|
22
|
+
Attributes:
|
|
23
|
+
lakehouse_only: Deployment only to the lakehouse.
|
|
24
|
+
include_state_db: Deployment including the state database.
|
|
25
|
+
"""
|
|
8
26
|
lakehouse_only = 'lakehouse_only'
|
|
9
27
|
include_state_db = 'include_state_db'
|
|
10
28
|
|
|
11
29
|
class StateOption(str, Enum):
|
|
30
|
+
"""
|
|
31
|
+
Enumeration for state options.
|
|
32
|
+
|
|
33
|
+
This enum defines the types of state database options available.
|
|
34
|
+
|
|
35
|
+
Attributes:
|
|
36
|
+
sqlite: State database using SQLite.
|
|
37
|
+
postgres: State database using PostgreSQL.
|
|
38
|
+
"""
|
|
12
39
|
sqlite = 'sqlite'
|
|
13
40
|
postgres = 'postgres'
|
|
14
41
|
|
|
15
42
|
class LakehouseOption(str, Enum):
|
|
43
|
+
"""
|
|
44
|
+
Enumeration for lakehouse options.
|
|
45
|
+
|
|
46
|
+
This enum defines the types of lakehouse options available.
|
|
47
|
+
|
|
48
|
+
Attributes:
|
|
49
|
+
spark: Lakehouse option using Spark.
|
|
50
|
+
postgres: Lakehouse option using PostgreSQL.
|
|
51
|
+
postgres_immutable: Lakehouse option using immutable PostgreSQL.
|
|
52
|
+
"""
|
|
16
53
|
spark = 'spark'
|
|
17
54
|
postgres = 'postgres'
|
|
18
55
|
postgres_immutable = 'postgres-immutable'
|
|
19
56
|
|
|
20
57
|
class ResponseStatus(str, Enum):
|
|
58
|
+
"""
|
|
59
|
+
Enumeration for response statuses.
|
|
60
|
+
|
|
61
|
+
This enum defines the types of response statuses available.
|
|
62
|
+
|
|
63
|
+
Attributes:
|
|
64
|
+
success: Indicates a successful response.
|
|
65
|
+
error: Indicates an error response.
|
|
66
|
+
"""
|
|
21
67
|
success = 'success'
|
|
22
68
|
error = 'error'
|
|
Binary file
|
|
Binary file
|
amsdal/cloud/models/base.pyi
CHANGED
|
@@ -3,10 +3,31 @@ from pydantic import BaseModel
|
|
|
3
3
|
from typing import Any
|
|
4
4
|
|
|
5
5
|
class ResponseBaseModel(BaseModel):
|
|
6
|
+
"""
|
|
7
|
+
Base model for responses.
|
|
8
|
+
|
|
9
|
+
Attributes:
|
|
10
|
+
status (ResponseStatus): The status of the response.
|
|
11
|
+
errors (list[str] | None): A list of error messages, if any.
|
|
12
|
+
"""
|
|
6
13
|
status: ResponseStatus
|
|
7
14
|
errors: list[str] | None
|
|
8
15
|
|
|
9
16
|
class DeployResponse(BaseModel):
|
|
17
|
+
"""
|
|
18
|
+
Model representing a deployment response.
|
|
19
|
+
|
|
20
|
+
Attributes:
|
|
21
|
+
status (str): The status of the deployment.
|
|
22
|
+
client_id (str): The client ID associated with the deployment.
|
|
23
|
+
deployment_id (str): The unique identifier for the deployment.
|
|
24
|
+
created_at (float): The timestamp when the deployment was created.
|
|
25
|
+
last_update_at (float): The timestamp of the last update to the deployment.
|
|
26
|
+
environment_name (str | None): The name of the environment, if any.
|
|
27
|
+
application_uuid (str | None): The UUID of the application, if any.
|
|
28
|
+
application_name (str | None): The name of the application, if any.
|
|
29
|
+
domain_url (str | None): The URL of the domain, if any.
|
|
30
|
+
"""
|
|
10
31
|
status: str
|
|
11
32
|
client_id: str
|
|
12
33
|
deployment_id: str
|
|
@@ -18,6 +39,16 @@ class DeployResponse(BaseModel):
|
|
|
18
39
|
domain_url: str | None
|
|
19
40
|
|
|
20
41
|
class UpdateDeployStatusResponse(BaseModel):
|
|
42
|
+
"""
|
|
43
|
+
Model representing an update to the deployment status.
|
|
44
|
+
|
|
45
|
+
Attributes:
|
|
46
|
+
status (str): The status of the deployment.
|
|
47
|
+
deployment_id (str): The unique identifier for the deployment.
|
|
48
|
+
created_at (float): The timestamp when the deployment was created.
|
|
49
|
+
last_update_at (float): The timestamp of the last update to the deployment.
|
|
50
|
+
updated (bool): Indicates whether the deployment status was updated.
|
|
51
|
+
"""
|
|
21
52
|
status: str
|
|
22
53
|
deployment_id: str
|
|
23
54
|
created_at: float
|
|
@@ -25,67 +56,192 @@ class UpdateDeployStatusResponse(BaseModel):
|
|
|
25
56
|
updated: bool
|
|
26
57
|
|
|
27
58
|
class ListDeployResponse(BaseModel):
|
|
59
|
+
"""
|
|
60
|
+
Model representing a list of deployment responses.
|
|
61
|
+
|
|
62
|
+
Attributes:
|
|
63
|
+
deployments (list[DeployResponse]): A list of deployment responses.
|
|
64
|
+
"""
|
|
28
65
|
deployments: list[DeployResponse]
|
|
29
66
|
|
|
30
67
|
class DeployTransactionResponse(ResponseBaseModel):
|
|
68
|
+
"""
|
|
69
|
+
Model representing a deployment transaction response.
|
|
70
|
+
|
|
71
|
+
Attributes:
|
|
72
|
+
details (DeployResponse | UpdateDeployStatusResponse | ListDeployResponse | None):
|
|
73
|
+
The details of the deployment transaction response, which can be one of
|
|
74
|
+
DeployResponse, UpdateDeployStatusResponse, ListDeployResponse, or None.
|
|
75
|
+
"""
|
|
31
76
|
details: DeployResponse | UpdateDeployStatusResponse | ListDeployResponse | None
|
|
32
77
|
|
|
33
78
|
class ListSecretsDetails(BaseModel):
|
|
79
|
+
"""
|
|
80
|
+
Model representing the details of listed secrets.
|
|
81
|
+
|
|
82
|
+
Attributes:
|
|
83
|
+
secrets (list[str]): A list of secret strings.
|
|
84
|
+
"""
|
|
34
85
|
secrets: list[str]
|
|
35
86
|
|
|
36
87
|
class ListSecretsResponse(ResponseBaseModel):
|
|
88
|
+
"""
|
|
89
|
+
Model representing a response containing the details of listed secrets.
|
|
90
|
+
|
|
91
|
+
Attributes:
|
|
92
|
+
details (ListSecretsDetails | None): The details of the listed secrets, if any.
|
|
93
|
+
"""
|
|
37
94
|
details: ListSecretsDetails | None
|
|
38
95
|
|
|
39
96
|
class SignupReponseCredentials(BaseModel):
|
|
97
|
+
"""
|
|
98
|
+
Model representing the credentials for a signup response.
|
|
99
|
+
|
|
100
|
+
Attributes:
|
|
101
|
+
amsdal_access_key_id (str): The access key ID for AMSDAL.
|
|
102
|
+
amsdal_secret_access_key (str): The secret access key for AMSDAL.
|
|
103
|
+
"""
|
|
40
104
|
amsdal_access_key_id: str
|
|
41
105
|
amsdal_secret_access_key: str
|
|
42
106
|
|
|
43
107
|
class SignupResponse(ResponseBaseModel):
|
|
108
|
+
"""
|
|
109
|
+
Model representing a signup response.
|
|
110
|
+
|
|
111
|
+
Attributes:
|
|
112
|
+
details (SignupReponseCredentials | None): The credentials for the signup response, if any.
|
|
113
|
+
"""
|
|
44
114
|
details: SignupReponseCredentials | None
|
|
45
115
|
|
|
46
116
|
class CreateSessionDetails(BaseModel):
|
|
117
|
+
"""
|
|
118
|
+
Model representing the details for creating a session.
|
|
119
|
+
|
|
120
|
+
Attributes:
|
|
121
|
+
token (str): The token for the session.
|
|
122
|
+
"""
|
|
47
123
|
token: str
|
|
48
124
|
|
|
49
125
|
class CreateSessionResponse(ResponseBaseModel):
|
|
126
|
+
"""
|
|
127
|
+
Model representing a response for creating a session.
|
|
128
|
+
|
|
129
|
+
Attributes:
|
|
130
|
+
details (CreateSessionDetails | None): The details for creating a session, if any.
|
|
131
|
+
"""
|
|
50
132
|
details: CreateSessionDetails | None
|
|
51
133
|
|
|
52
134
|
class ListDependenciesDetails(BaseModel):
|
|
135
|
+
"""
|
|
136
|
+
Model representing the details of listed dependencies.
|
|
137
|
+
|
|
138
|
+
Attributes:
|
|
139
|
+
dependencies (list[str]): A list of dependencies.
|
|
140
|
+
all (list[str]): A list of all dependencies.
|
|
141
|
+
"""
|
|
53
142
|
dependencies: list[str]
|
|
54
143
|
all: list[str]
|
|
55
144
|
|
|
56
145
|
class ListApplicationDependenciesResponse(ResponseBaseModel):
|
|
146
|
+
"""
|
|
147
|
+
Model representing a response containing the details of listed application dependencies.
|
|
148
|
+
|
|
149
|
+
Attributes:
|
|
150
|
+
details (ListDependenciesDetails | None): The details of the listed application dependencies, if any.
|
|
151
|
+
"""
|
|
57
152
|
details: ListDependenciesDetails | None
|
|
58
153
|
|
|
59
154
|
class ExposeApplicationDBResponse(ResponseBaseModel):
|
|
155
|
+
"""
|
|
156
|
+
Model representing a response for exposing an application database.
|
|
157
|
+
|
|
158
|
+
Attributes:
|
|
159
|
+
details (dict[str, Any] | None): The details of the exposed application database, if any.
|
|
160
|
+
"""
|
|
60
161
|
details: dict[str, Any] | None
|
|
61
162
|
|
|
62
163
|
class MonitoringInfo(BaseModel):
|
|
164
|
+
"""
|
|
165
|
+
Model representing monitoring information.
|
|
166
|
+
|
|
167
|
+
Attributes:
|
|
168
|
+
url (str): The URL for monitoring.
|
|
169
|
+
username (str): The username for monitoring access.
|
|
170
|
+
password (str): The password for monitoring access.
|
|
171
|
+
"""
|
|
63
172
|
url: str
|
|
64
173
|
username: str
|
|
65
174
|
password: str
|
|
66
175
|
|
|
67
176
|
class GetMonitoringInfoResponse(ResponseBaseModel):
|
|
177
|
+
"""
|
|
178
|
+
Model representing a response containing monitoring information.
|
|
179
|
+
|
|
180
|
+
Attributes:
|
|
181
|
+
details (MonitoringInfo | None): The monitoring information details, if any.
|
|
182
|
+
"""
|
|
68
183
|
details: MonitoringInfo | None
|
|
69
184
|
|
|
70
185
|
class BasicAuthCredentials(BaseModel):
|
|
186
|
+
"""
|
|
187
|
+
Model representing basic authentication credentials.
|
|
188
|
+
|
|
189
|
+
Attributes:
|
|
190
|
+
username (str): The username for basic authentication.
|
|
191
|
+
password (str): The password for basic authentication.
|
|
192
|
+
"""
|
|
71
193
|
username: str
|
|
72
194
|
password: str
|
|
73
195
|
|
|
74
196
|
class AddBasicAuthResponse(ResponseBaseModel):
|
|
197
|
+
"""
|
|
198
|
+
Model representing a response for adding basic authentication.
|
|
199
|
+
|
|
200
|
+
Attributes:
|
|
201
|
+
details (BasicAuthCredentials | None): The basic authentication credentials, if any.
|
|
202
|
+
"""
|
|
75
203
|
details: BasicAuthCredentials | None
|
|
76
204
|
|
|
77
205
|
class ListEnvsDetails(BaseModel):
|
|
206
|
+
"""
|
|
207
|
+
Model representing the details of listed environments.
|
|
208
|
+
|
|
209
|
+
Attributes:
|
|
210
|
+
application_uuid (str): The UUID of the application.
|
|
211
|
+
application_name (str): The name of the application.
|
|
212
|
+
environments (list[str]): A list of environment names.
|
|
213
|
+
"""
|
|
78
214
|
application_uuid: str
|
|
79
215
|
application_name: str
|
|
80
216
|
environments: list[str]
|
|
81
217
|
|
|
82
218
|
class ListEnvsResponse(ResponseBaseModel):
|
|
219
|
+
"""
|
|
220
|
+
Model representing a response containing the details of listed environments.
|
|
221
|
+
|
|
222
|
+
Attributes:
|
|
223
|
+
details (ListEnvsDetails | None): The details of the listed environments, if any.
|
|
224
|
+
"""
|
|
83
225
|
details: ListEnvsDetails | None
|
|
84
226
|
|
|
85
227
|
class CreateEnvDetails(BaseModel):
|
|
228
|
+
"""
|
|
229
|
+
Model representing the details for creating an environment.
|
|
230
|
+
|
|
231
|
+
Attributes:
|
|
232
|
+
environment_name (str): The name of the environment.
|
|
233
|
+
application_uuid (str): The UUID of the application.
|
|
234
|
+
application_name (str): The name of the application.
|
|
235
|
+
"""
|
|
86
236
|
environment_name: str
|
|
87
237
|
application_uuid: str
|
|
88
238
|
application_name: str
|
|
89
239
|
|
|
90
240
|
class CreateEnvResponse(ResponseBaseModel):
|
|
241
|
+
"""
|
|
242
|
+
Model representing a response for creating an environment.
|
|
243
|
+
|
|
244
|
+
Attributes:
|
|
245
|
+
details (CreateEnvDetails | None): The details for creating an environment, if any.
|
|
246
|
+
"""
|
|
91
247
|
details: CreateEnvDetails | None
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
from amsdal.cloud.services.actions.base import CloudActionBase as CloudActionBase
|
|
2
2
|
|
|
3
3
|
class AddAllowlistIPAction(CloudActionBase):
|
|
4
|
-
|
|
4
|
+
"""
|
|
5
|
+
Action class for adding an IP address to the allowlist.
|
|
6
|
+
"""
|
|
7
|
+
def action(self, env_name: str, ip_address: str | None = None, application_name: str | None = None, application_uuid: str | None = None) -> bool:
|
|
8
|
+
"""
|
|
9
|
+
Executes the action to add an IP address to the allowlist.
|
|
10
|
+
|
|
11
|
+
Args:
|
|
12
|
+
env_name (str): The name of the environment.
|
|
13
|
+
ip_address (str, optional): The IP address to add to the allowlist. Defaults to None.
|
|
14
|
+
application_name (str, optional): The name of the application. Defaults to None.
|
|
15
|
+
application_uuid (str, optional): The UUID of the application. Defaults to None.
|
|
16
|
+
|
|
17
|
+
Returns:
|
|
18
|
+
bool: True if the action was executed successfully.
|
|
19
|
+
"""
|
|
Binary file
|
|
@@ -2,4 +2,20 @@ from amsdal.cloud.models.base import AddBasicAuthResponse as AddBasicAuthRespons
|
|
|
2
2
|
from amsdal.cloud.services.actions.base import CloudActionBase as CloudActionBase
|
|
3
3
|
|
|
4
4
|
class AddBasicAuthAction(CloudActionBase):
|
|
5
|
-
|
|
5
|
+
"""
|
|
6
|
+
Action class for adding basic authentication.
|
|
7
|
+
"""
|
|
8
|
+
def action(self, env_name: str, username: str | None = None, password: str | None = None, application_name: str | None = None, application_uuid: str | None = None) -> AddBasicAuthResponse:
|
|
9
|
+
"""
|
|
10
|
+
Executes the action to add basic authentication.
|
|
11
|
+
|
|
12
|
+
Args:
|
|
13
|
+
env_name (str): The name of the environment.
|
|
14
|
+
username (str, optional): The username for basic authentication. Defaults to None.
|
|
15
|
+
password (str, optional): The password for basic authentication. Defaults to None.
|
|
16
|
+
application_name (str, optional): The name of the application. Defaults to None.
|
|
17
|
+
application_uuid (str, optional): The UUID of the application. Defaults to None.
|
|
18
|
+
|
|
19
|
+
Returns:
|
|
20
|
+
AddBasicAuthResponse: The response containing the basic authentication details.
|
|
21
|
+
"""
|
|
Binary file
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
from amsdal.cloud.services.actions.base import CloudActionBase as CloudActionBase
|
|
2
2
|
|
|
3
3
|
class AddDepenencyAction(CloudActionBase):
|
|
4
|
-
|
|
4
|
+
"""
|
|
5
|
+
Action class for adding a dependency to an application.
|
|
6
|
+
"""
|
|
7
|
+
def action(self, dependency_name: str, env_name: str, application_name: str | None = None, application_uuid: str | None = None) -> bool:
|
|
8
|
+
"""
|
|
9
|
+
Executes the action to add a dependency to an application.
|
|
10
|
+
|
|
11
|
+
Args:
|
|
12
|
+
dependency_name (str): The name of the dependency.
|
|
13
|
+
env_name (str): The name of the environment.
|
|
14
|
+
application_name (str, optional): The name of the application. Defaults to None.
|
|
15
|
+
application_uuid (str, optional): The UUID of the application. Defaults to None.
|
|
16
|
+
|
|
17
|
+
Returns:
|
|
18
|
+
bool: True if the action was executed successfully.
|
|
19
|
+
"""
|
|
Binary file
|
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
from amsdal.cloud.services.actions.base import CloudActionBase as CloudActionBase
|
|
2
2
|
|
|
3
3
|
class AddSecretAction(CloudActionBase):
|
|
4
|
-
|
|
4
|
+
"""
|
|
5
|
+
Action class for adding a secret to an application.
|
|
6
|
+
"""
|
|
7
|
+
def action(self, secret_name: str, secret_value: str, env_name: str, application_uuid: str | None = None, application_name: str | None = None) -> bool:
|
|
8
|
+
"""
|
|
9
|
+
Executes the action to add a secret to an application.
|
|
10
|
+
|
|
11
|
+
Args:
|
|
12
|
+
secret_name (str): The name of the secret.
|
|
13
|
+
secret_value (str): The value of the secret.
|
|
14
|
+
env_name (str): The name of the environment.
|
|
15
|
+
application_uuid (str, optional): The UUID of the application. Defaults to None.
|
|
16
|
+
application_name (str, optional): The name of the application. Defaults to None.
|
|
17
|
+
|
|
18
|
+
Returns:
|
|
19
|
+
bool: True if the action was executed successfully.
|
|
20
|
+
"""
|
|
Binary file
|
|
@@ -11,6 +11,37 @@ from enum import Enum
|
|
|
11
11
|
from typing import Any
|
|
12
12
|
|
|
13
13
|
class AuthErrorCodes(str, Enum):
|
|
14
|
+
"""
|
|
15
|
+
Enum for authentication error codes.
|
|
16
|
+
|
|
17
|
+
Attributes:
|
|
18
|
+
INVALID_EMAIL (str): Error code for invalid email.
|
|
19
|
+
MISSING_CREDENTIALS (str): Error code for missing credentials.
|
|
20
|
+
INVALID_CREDENTIALS (str): Error code for invalid credentials.
|
|
21
|
+
INVALID_APPLICATION_UUID (str): Error code for invalid application UUID.
|
|
22
|
+
CLIENT_IS_INACTIVE (str): Error code for inactive client.
|
|
23
|
+
CLIENT_ALREADY_EXISTS (str): Error code for client already exists.
|
|
24
|
+
DEPLOY_FAILED (str): Error code for deploy failed.
|
|
25
|
+
DEPLOY_ALREADY_EXISTS (str): Error code for deploy already exists.
|
|
26
|
+
DEPLOY_NOT_IN_DEPLOYED_STATUS (str): Error code for deploy not in deployed status.
|
|
27
|
+
DESTROY_FAILED (str): Error code for destroy failed.
|
|
28
|
+
DEPLOY_NOT_FOUND (str): Error code for deploy not found.
|
|
29
|
+
INVALID_DEPENDENCY (str): Error code for invalid dependency.
|
|
30
|
+
EXPOSE_DB_ACCESS_FAILED (str): Error code for expose DB access failed.
|
|
31
|
+
APPLICATION_ALREADY_EXISTS (str): Error code for application already exists.
|
|
32
|
+
MULTIPLE_APPLICATIONS_FOUND (str): Error code for multiple applications found.
|
|
33
|
+
MAXIMUM_APPLICATIONS_REACHED (str): Error code for maximum applications reached.
|
|
34
|
+
INTERNAL_SECRET (str): Error code for internal secret.
|
|
35
|
+
BA_DOES_NOT_EXIST (str): Error code for basic authentication does not exist.
|
|
36
|
+
INVALID_IP_ADDRESS (str): Error code for invalid IP address.
|
|
37
|
+
MONITORING_NOT_FOUND (str): Error code for monitoring not found.
|
|
38
|
+
INVALID_ENVIRONMENT_NAME (str): Error code for invalid environment name.
|
|
39
|
+
SAME_ENVIRONMENT_NAME (str): Error code for same environment name.
|
|
40
|
+
ENVIRONMENT_NOT_FOUND (str): Error code for environment not found.
|
|
41
|
+
ENVIRONMENT_NOT_DEPLOYED (str): Error code for environment not deployed.
|
|
42
|
+
MAXIMUM_DEPLOYS_PER_APPLICATION_REACHED (str): Error code for maximum deploys per application reached.
|
|
43
|
+
CANNOT_DELETE_ENVIRONMENT (str): Error code for cannot delete environment.
|
|
44
|
+
"""
|
|
14
45
|
INVALID_EMAIL = 'invalid_email'
|
|
15
46
|
MISSING_CREDENTIALS = 'missing_credentials'
|
|
16
47
|
INVALID_CREDENTIALS = 'invalid_credentials'
|
|
@@ -41,14 +72,51 @@ class AuthErrorCodes(str, Enum):
|
|
|
41
72
|
FRIENDLY_ERROR_MESSAGES: Incomplete
|
|
42
73
|
|
|
43
74
|
class CloudActionBase(ABC, metaclass=abc.ABCMeta):
|
|
75
|
+
"""
|
|
76
|
+
Abstract base class for cloud actions.
|
|
77
|
+
"""
|
|
44
78
|
auth_client: Incomplete
|
|
45
79
|
def __init__(self) -> None: ...
|
|
46
80
|
@abstractmethod
|
|
47
|
-
def action(self, *args: Any, **kwargs: Any) -> Any:
|
|
81
|
+
def action(self, *args: Any, **kwargs: Any) -> Any:
|
|
82
|
+
"""
|
|
83
|
+
Abstract method to be implemented by subclasses to execute the action.
|
|
84
|
+
|
|
85
|
+
Args:
|
|
86
|
+
*args (Any): Variable length argument list.
|
|
87
|
+
**kwargs (Any): Arbitrary keyword arguments.
|
|
88
|
+
|
|
89
|
+
Returns:
|
|
90
|
+
Any: The result of the action.
|
|
91
|
+
"""
|
|
48
92
|
def _credentials_data(self) -> bytes: ...
|
|
49
93
|
@staticmethod
|
|
50
94
|
def _input(msg: str) -> str: ...
|
|
51
95
|
@staticmethod
|
|
52
96
|
def _print(msg: str) -> None: ...
|
|
53
|
-
def execute_transaction(self, transaction_name: str, data: dict[str, Any]) -> dict[str, Any]:
|
|
54
|
-
|
|
97
|
+
def execute_transaction(self, transaction_name: str, data: dict[str, Any]) -> dict[str, Any]:
|
|
98
|
+
"""
|
|
99
|
+
Executes a transaction with the given name and data.
|
|
100
|
+
|
|
101
|
+
Args:
|
|
102
|
+
transaction_name (str): The name of the transaction to execute.
|
|
103
|
+
data (dict[str, Any]): The data to be sent with the transaction.
|
|
104
|
+
|
|
105
|
+
Returns:
|
|
106
|
+
dict[str, Any]: The response data from the transaction.
|
|
107
|
+
|
|
108
|
+
Raises:
|
|
109
|
+
AmsdalCloudError: If the transaction cannot be executed or if the transaction fails.
|
|
110
|
+
AmsdalCloudAlreadyDeployedError: If the deploy already exists.
|
|
111
|
+
"""
|
|
112
|
+
def process_errors(self, response: ResponseBaseModel) -> None:
|
|
113
|
+
"""
|
|
114
|
+
Processes errors in the response and raises appropriate exceptions.
|
|
115
|
+
|
|
116
|
+
Args:
|
|
117
|
+
response (ResponseBaseModel): The response model containing the status and errors.
|
|
118
|
+
|
|
119
|
+
Raises:
|
|
120
|
+
AmsdalCloudAlreadyDeployedError: If the deploy already exists.
|
|
121
|
+
AmsdalCloudError: If there are other errors in the response or if the transaction failed.
|
|
122
|
+
"""
|
|
Binary file
|
|
@@ -5,7 +5,37 @@ from amsdal.errors import AmsdalCloudAlreadyDeployedError as AmsdalCloudAlreadyD
|
|
|
5
5
|
from typing import Any
|
|
6
6
|
|
|
7
7
|
class CreateDeployAction(CloudActionBase):
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
"""
|
|
9
|
+
Class to handle the creation of a deploy action.
|
|
10
|
+
"""
|
|
11
|
+
def want_deploy_input(self) -> str:
|
|
12
|
+
"""
|
|
13
|
+
Prompts the user to confirm if they want to deploy the app.
|
|
14
|
+
|
|
15
|
+
Returns:
|
|
16
|
+
str: The user's input, stripped of leading and trailing whitespace.
|
|
17
|
+
"""
|
|
18
|
+
def want_redeploy_input(self) -> str:
|
|
19
|
+
"""
|
|
20
|
+
Prompts the user to confirm if they want to redeploy the app.
|
|
21
|
+
|
|
22
|
+
Returns:
|
|
23
|
+
str: The user's input, stripped of leading and trailing whitespace.
|
|
24
|
+
"""
|
|
25
|
+
def action(self, deploy_type: str, lakehouse_type: str, env_name: str, from_env: str | None = None, application_uuid: str | None = None, application_name: str | None = None, *, no_input: bool = False) -> bool:
|
|
26
|
+
"""
|
|
27
|
+
Executes the deploy action with the given parameters.
|
|
28
|
+
|
|
29
|
+
Args:
|
|
30
|
+
deploy_type (str): The type of deploy to perform.
|
|
31
|
+
lakehouse_type (str): The type of lakehouse to deploy.
|
|
32
|
+
env_name (str): The name of the environment to deploy to.
|
|
33
|
+
from_env (str | None, optional): The environment to deploy from. Defaults to None.
|
|
34
|
+
application_uuid (str | None, optional): The UUID of the application. Defaults to None.
|
|
35
|
+
application_name (str | None, optional): The name of the application. Defaults to None.
|
|
36
|
+
no_input (bool, optional): If True, skips user input prompts. Defaults to False.
|
|
37
|
+
|
|
38
|
+
Returns:
|
|
39
|
+
bool: True if the deploy action was successful, False otherwise.
|
|
40
|
+
"""
|
|
11
41
|
def _redeploy(self, deploy_data: dict[str, Any]) -> bool: ...
|
|
Binary file
|
|
@@ -2,4 +2,18 @@ from amsdal.cloud.models.base import CreateEnvResponse as CreateEnvResponse
|
|
|
2
2
|
from amsdal.cloud.services.actions.base import CloudActionBase as CloudActionBase
|
|
3
3
|
|
|
4
4
|
class CreateEnvAction(CloudActionBase):
|
|
5
|
-
|
|
5
|
+
"""
|
|
6
|
+
Class to handle the creation of an environment action.
|
|
7
|
+
"""
|
|
8
|
+
def action(self, *, env_name: str, application_name: str | None = None, application_uuid: str | None = None) -> CreateEnvResponse:
|
|
9
|
+
"""
|
|
10
|
+
Executes the environment creation action with the given parameters.
|
|
11
|
+
|
|
12
|
+
Args:
|
|
13
|
+
env_name (str): The name of the environment to create.
|
|
14
|
+
application_name (str | None, optional): The name of the application. Defaults to None.
|
|
15
|
+
application_uuid (str | None, optional): The UUID of the application. Defaults to None.
|
|
16
|
+
|
|
17
|
+
Returns:
|
|
18
|
+
CreateEnvResponse: The response model containing the details of the created environment.
|
|
19
|
+
"""
|
|
Binary file
|