loopix-sdk 2.30.0__py3-none-any.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.
- loopix/__init__.py +260 -0
- loopix/api/__init__.py +287 -0
- loopix/api/client/__init__.py +8 -0
- loopix/api/client/api/__init__.py +1 -0
- loopix/api/client/api/sandboxes/__init__.py +1 -0
- loopix/api/client/api/sandboxes/delete_sandboxes_sandbox_id.py +161 -0
- loopix/api/client/api/sandboxes/get_sandboxes.py +176 -0
- loopix/api/client/api/sandboxes/get_sandboxes_metrics.py +173 -0
- loopix/api/client/api/sandboxes/get_sandboxes_sandbox_id.py +163 -0
- loopix/api/client/api/sandboxes/get_sandboxes_sandbox_id_logs.py +199 -0
- loopix/api/client/api/sandboxes/get_sandboxes_sandbox_id_metrics.py +212 -0
- loopix/api/client/api/sandboxes/get_v2_sandboxes.py +230 -0
- loopix/api/client/api/sandboxes/get_v_2_sandboxes_sandbox_id_logs.py +254 -0
- loopix/api/client/api/sandboxes/post_sandboxes.py +172 -0
- loopix/api/client/api/sandboxes/post_sandboxes_sandbox_id_connect.py +193 -0
- loopix/api/client/api/sandboxes/post_sandboxes_sandbox_id_pause.py +187 -0
- loopix/api/client/api/sandboxes/post_sandboxes_sandbox_id_refreshes.py +181 -0
- loopix/api/client/api/sandboxes/post_sandboxes_sandbox_id_resume.py +189 -0
- loopix/api/client/api/sandboxes/post_sandboxes_sandbox_id_snapshots.py +195 -0
- loopix/api/client/api/sandboxes/post_sandboxes_sandbox_id_timeout.py +193 -0
- loopix/api/client/api/sandboxes/put_sandboxes_sandbox_id_network.py +199 -0
- loopix/api/client/api/snapshots/__init__.py +1 -0
- loopix/api/client/api/snapshots/get_snapshots.py +202 -0
- loopix/api/client/api/tags/__init__.py +1 -0
- loopix/api/client/api/tags/delete_templates_tags.py +174 -0
- loopix/api/client/api/tags/get_templates_template_id_tags.py +172 -0
- loopix/api/client/api/tags/post_templates_tags.py +176 -0
- loopix/api/client/api/templates/__init__.py +1 -0
- loopix/api/client/api/templates/delete_templates_template_id.py +157 -0
- loopix/api/client/api/templates/get_templates.py +172 -0
- loopix/api/client/api/templates/get_templates_aliases_alias.py +167 -0
- loopix/api/client/api/templates/get_templates_template_id.py +195 -0
- loopix/api/client/api/templates/get_templates_template_id_builds_build_id_logs.py +272 -0
- loopix/api/client/api/templates/get_templates_template_id_builds_build_id_status.py +232 -0
- loopix/api/client/api/templates/get_templates_template_id_files_hash.py +180 -0
- loopix/api/client/api/templates/patch_templates_template_id.py +183 -0
- loopix/api/client/api/templates/patch_v_2_templates_template_id.py +185 -0
- loopix/api/client/api/templates/post_templates.py +172 -0
- loopix/api/client/api/templates/post_templates_template_id.py +181 -0
- loopix/api/client/api/templates/post_templates_template_id_builds_build_id.py +170 -0
- loopix/api/client/api/templates/post_v2_templates.py +172 -0
- loopix/api/client/api/templates/post_v3_templates.py +176 -0
- loopix/api/client/api/templates/post_v_2_templates_template_id_builds_build_id.py +192 -0
- loopix/api/client/api/volumes/__init__.py +1 -0
- loopix/api/client/api/volumes/delete_volumes_volume_id.py +161 -0
- loopix/api/client/api/volumes/get_volumes.py +140 -0
- loopix/api/client/api/volumes/get_volumes_volume_id.py +163 -0
- loopix/api/client/api/volumes/post_volumes.py +172 -0
- loopix/api/client/client.py +286 -0
- loopix/api/client/errors.py +16 -0
- loopix/api/client/models/__init__.py +185 -0
- loopix/api/client/models/admin_build_cancel_result.py +67 -0
- loopix/api/client/models/admin_sandbox_kill_result.py +67 -0
- loopix/api/client/models/assign_template_tags_request.py +67 -0
- loopix/api/client/models/assigned_template_tags.py +68 -0
- loopix/api/client/models/aws_registry.py +85 -0
- loopix/api/client/models/aws_registry_type.py +8 -0
- loopix/api/client/models/build_log_entry.py +89 -0
- loopix/api/client/models/build_status_reason.py +95 -0
- loopix/api/client/models/connect_sandbox.py +59 -0
- loopix/api/client/models/created_access_token.py +100 -0
- loopix/api/client/models/created_team_api_key.py +166 -0
- loopix/api/client/models/delete_template_tags_request.py +67 -0
- loopix/api/client/models/disk_metrics.py +91 -0
- loopix/api/client/models/error.py +67 -0
- loopix/api/client/models/gcp_registry.py +69 -0
- loopix/api/client/models/gcp_registry_type.py +8 -0
- loopix/api/client/models/general_registry.py +77 -0
- loopix/api/client/models/general_registry_type.py +8 -0
- loopix/api/client/models/identifier_masking_details.py +83 -0
- loopix/api/client/models/listed_sandbox.py +179 -0
- loopix/api/client/models/log_level.py +11 -0
- loopix/api/client/models/logs_direction.py +9 -0
- loopix/api/client/models/logs_source.py +9 -0
- loopix/api/client/models/machine_info.py +83 -0
- loopix/api/client/models/max_team_metric.py +78 -0
- loopix/api/client/models/mcp_type_0.py +44 -0
- loopix/api/client/models/new_access_token.py +59 -0
- loopix/api/client/models/new_sandbox.py +224 -0
- loopix/api/client/models/new_team_api_key.py +59 -0
- loopix/api/client/models/new_volume.py +59 -0
- loopix/api/client/models/node.py +160 -0
- loopix/api/client/models/node_detail.py +160 -0
- loopix/api/client/models/node_metrics.py +122 -0
- loopix/api/client/models/node_status.py +12 -0
- loopix/api/client/models/node_status_change.py +82 -0
- loopix/api/client/models/post_sandboxes_sandbox_id_refreshes_body.py +59 -0
- loopix/api/client/models/post_sandboxes_sandbox_id_snapshots_body.py +60 -0
- loopix/api/client/models/post_sandboxes_sandbox_id_timeout_body.py +59 -0
- loopix/api/client/models/resumed_sandbox.py +68 -0
- loopix/api/client/models/sandbox.py +145 -0
- loopix/api/client/models/sandbox_auto_resume_config.py +60 -0
- loopix/api/client/models/sandbox_detail.py +267 -0
- loopix/api/client/models/sandbox_lifecycle.py +70 -0
- loopix/api/client/models/sandbox_log.py +70 -0
- loopix/api/client/models/sandbox_log_entry.py +93 -0
- loopix/api/client/models/sandbox_log_entry_fields.py +44 -0
- loopix/api/client/models/sandbox_logs.py +91 -0
- loopix/api/client/models/sandbox_logs_v2_response.py +73 -0
- loopix/api/client/models/sandbox_metric.py +126 -0
- loopix/api/client/models/sandbox_network_config.py +118 -0
- loopix/api/client/models/sandbox_network_config_rules.py +72 -0
- loopix/api/client/models/sandbox_network_rule.py +74 -0
- loopix/api/client/models/sandbox_network_transform.py +79 -0
- loopix/api/client/models/sandbox_network_transform_headers.py +47 -0
- loopix/api/client/models/sandbox_network_update_config.py +114 -0
- loopix/api/client/models/sandbox_network_update_config_rules.py +71 -0
- loopix/api/client/models/sandbox_on_timeout.py +9 -0
- loopix/api/client/models/sandbox_pause_request.py +62 -0
- loopix/api/client/models/sandbox_state.py +9 -0
- loopix/api/client/models/sandbox_volume_mount.py +67 -0
- loopix/api/client/models/sandboxes_with_metrics.py +59 -0
- loopix/api/client/models/snapshot_info.py +70 -0
- loopix/api/client/models/team.py +83 -0
- loopix/api/client/models/team_api_key.py +158 -0
- loopix/api/client/models/team_metric.py +86 -0
- loopix/api/client/models/team_user.py +75 -0
- loopix/api/client/models/template.py +225 -0
- loopix/api/client/models/template_alias_response.py +67 -0
- loopix/api/client/models/template_build.py +139 -0
- loopix/api/client/models/template_build_file_upload.py +70 -0
- loopix/api/client/models/template_build_info.py +126 -0
- loopix/api/client/models/template_build_logs_response.py +73 -0
- loopix/api/client/models/template_build_request.py +115 -0
- loopix/api/client/models/template_build_request_v2.py +88 -0
- loopix/api/client/models/template_build_request_v3.py +107 -0
- loopix/api/client/models/template_build_start_v2.py +184 -0
- loopix/api/client/models/template_build_status.py +11 -0
- loopix/api/client/models/template_legacy.py +207 -0
- loopix/api/client/models/template_request_response_v3.py +99 -0
- loopix/api/client/models/template_step.py +91 -0
- loopix/api/client/models/template_tag.py +78 -0
- loopix/api/client/models/template_update_request.py +59 -0
- loopix/api/client/models/template_update_response.py +59 -0
- loopix/api/client/models/template_with_builds.py +156 -0
- loopix/api/client/models/update_team_api_key.py +59 -0
- loopix/api/client/models/volume.py +67 -0
- loopix/api/client/models/volume_and_token.py +75 -0
- loopix/api/client/models/volume_token.py +59 -0
- loopix/api/client/py.typed +1 -0
- loopix/api/client/types.py +54 -0
- loopix/api/client_async/__init__.py +74 -0
- loopix/api/client_sync/__init__.py +73 -0
- loopix/api/metadata.py +14 -0
- loopix/connection_config.py +309 -0
- loopix/envd/api.py +170 -0
- loopix/envd/filesystem/filesystem_connect.py +193 -0
- loopix/envd/filesystem/filesystem_pb2.py +80 -0
- loopix/envd/filesystem/filesystem_pb2.pyi +272 -0
- loopix/envd/process/process_connect.py +174 -0
- loopix/envd/process/process_pb2.py +96 -0
- loopix/envd/process/process_pb2.pyi +316 -0
- loopix/envd/rpc.py +139 -0
- loopix/envd/versions.py +11 -0
- loopix/exceptions.py +133 -0
- loopix/io_utils.py +57 -0
- loopix/paginator.py +52 -0
- loopix/py.typed +0 -0
- loopix/sandbox/_git/__init__.py +85 -0
- loopix/sandbox/_git/args.py +363 -0
- loopix/sandbox/_git/auth.py +132 -0
- loopix/sandbox/_git/config.py +32 -0
- loopix/sandbox/_git/parse.py +222 -0
- loopix/sandbox/_git/types.py +149 -0
- loopix/sandbox/commands/command_handle.py +69 -0
- loopix/sandbox/commands/main.py +39 -0
- loopix/sandbox/filesystem/filesystem.py +337 -0
- loopix/sandbox/filesystem/watch_handle.py +70 -0
- loopix/sandbox/main.py +227 -0
- loopix/sandbox/mcp.py +1949 -0
- loopix/sandbox/network.py +8 -0
- loopix/sandbox/sandbox_api.py +624 -0
- loopix/sandbox/signature.py +47 -0
- loopix/sandbox/utils.py +34 -0
- loopix/sandbox_async/commands/command.py +396 -0
- loopix/sandbox_async/commands/command_handle.py +298 -0
- loopix/sandbox_async/commands/pty.py +257 -0
- loopix/sandbox_async/filesystem/filesystem.py +720 -0
- loopix/sandbox_async/filesystem/watch_handle.py +97 -0
- loopix/sandbox_async/git.py +1100 -0
- loopix/sandbox_async/main.py +987 -0
- loopix/sandbox_async/paginator.py +140 -0
- loopix/sandbox_async/sandbox_api.py +504 -0
- loopix/sandbox_async/utils.py +7 -0
- loopix/sandbox_domains.py +5 -0
- loopix/sandbox_sync/commands/command.py +420 -0
- loopix/sandbox_sync/commands/command_handle.py +239 -0
- loopix/sandbox_sync/commands/pty.py +279 -0
- loopix/sandbox_sync/filesystem/filesystem.py +710 -0
- loopix/sandbox_sync/filesystem/watch_handle.py +102 -0
- loopix/sandbox_sync/git.py +1077 -0
- loopix/sandbox_sync/main.py +975 -0
- loopix/sandbox_sync/paginator.py +140 -0
- loopix/sandbox_sync/sandbox_api.py +491 -0
- loopix/template/consts.py +45 -0
- loopix/template/dockerfile_parser.py +286 -0
- loopix/template/logger.py +232 -0
- loopix/template/main.py +1368 -0
- loopix/template/readycmd.py +144 -0
- loopix/template/types.py +194 -0
- loopix/template/utils.py +426 -0
- loopix/template_async/build_api.py +419 -0
- loopix/template_async/main.py +528 -0
- loopix/template_sync/build_api.py +409 -0
- loopix/template_sync/main.py +529 -0
- loopix/volume/client/__init__.py +8 -0
- loopix/volume/client/api/__init__.py +1 -0
- loopix/volume/client/api/volumes/__init__.py +1 -0
- loopix/volume/client/api/volumes/delete_volumecontent_volume_id_path.py +174 -0
- loopix/volume/client/api/volumes/get_volumecontent_volume_id_dir.py +204 -0
- loopix/volume/client/api/volumes/get_volumecontent_volume_id_file.py +179 -0
- loopix/volume/client/api/volumes/get_volumecontent_volume_id_path.py +176 -0
- loopix/volume/client/api/volumes/patch_volumecontent_volume_id_path.py +203 -0
- loopix/volume/client/api/volumes/post_volumecontent_volume_id_dir.py +239 -0
- loopix/volume/client/api/volumes/put_volumecontent_volume_id_file.py +259 -0
- loopix/volume/client/client.py +286 -0
- loopix/volume/client/errors.py +16 -0
- loopix/volume/client/models/__init__.py +13 -0
- loopix/volume/client/models/error.py +67 -0
- loopix/volume/client/models/patch_volumecontent_volume_id_path_body.py +77 -0
- loopix/volume/client/models/volume_entry_stat.py +145 -0
- loopix/volume/client/models/volume_entry_stat_type.py +11 -0
- loopix/volume/client/py.typed +1 -0
- loopix/volume/client/types.py +54 -0
- loopix/volume/client_async/__init__.py +88 -0
- loopix/volume/client_sync/__init__.py +80 -0
- loopix/volume/connection_config.py +145 -0
- loopix/volume/types.py +62 -0
- loopix/volume/utils.py +52 -0
- loopix/volume/volume_async.py +639 -0
- loopix/volume/volume_sync.py +639 -0
- loopix_connect/__init__.py +1 -0
- loopix_connect/client.py +534 -0
- loopix_connect/py.typed +0 -0
- loopix_sdk-2.30.0.dist-info/METADATA +98 -0
- loopix_sdk-2.30.0.dist-info/RECORD +238 -0
- loopix_sdk-2.30.0.dist-info/WHEEL +4 -0
- loopix_sdk-2.30.0.dist-info/licenses/LICENSE +9 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from ..models.disk_metrics import DiskMetrics
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="NodeMetrics")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class NodeMetrics:
|
|
16
|
+
"""Node metrics
|
|
17
|
+
|
|
18
|
+
Attributes:
|
|
19
|
+
allocated_cpu (int): Number of allocated CPU cores
|
|
20
|
+
allocated_memory_bytes (int): Amount of allocated memory in bytes
|
|
21
|
+
cpu_count (int): Total number of CPU cores on the node
|
|
22
|
+
cpu_percent (int): Node CPU usage percentage
|
|
23
|
+
disks (list['DiskMetrics']): Detailed metrics for each disk/mount point
|
|
24
|
+
memory_total_bytes (int): Total node memory in bytes
|
|
25
|
+
memory_used_bytes (int): Node memory used in bytes
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
allocated_cpu: int
|
|
29
|
+
allocated_memory_bytes: int
|
|
30
|
+
cpu_count: int
|
|
31
|
+
cpu_percent: int
|
|
32
|
+
disks: list["DiskMetrics"]
|
|
33
|
+
memory_total_bytes: int
|
|
34
|
+
memory_used_bytes: int
|
|
35
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
36
|
+
|
|
37
|
+
def to_dict(self) -> dict[str, Any]:
|
|
38
|
+
allocated_cpu = self.allocated_cpu
|
|
39
|
+
|
|
40
|
+
allocated_memory_bytes = self.allocated_memory_bytes
|
|
41
|
+
|
|
42
|
+
cpu_count = self.cpu_count
|
|
43
|
+
|
|
44
|
+
cpu_percent = self.cpu_percent
|
|
45
|
+
|
|
46
|
+
disks = []
|
|
47
|
+
for disks_item_data in self.disks:
|
|
48
|
+
disks_item = disks_item_data.to_dict()
|
|
49
|
+
disks.append(disks_item)
|
|
50
|
+
|
|
51
|
+
memory_total_bytes = self.memory_total_bytes
|
|
52
|
+
|
|
53
|
+
memory_used_bytes = self.memory_used_bytes
|
|
54
|
+
|
|
55
|
+
field_dict: dict[str, Any] = {}
|
|
56
|
+
field_dict.update(self.additional_properties)
|
|
57
|
+
field_dict.update(
|
|
58
|
+
{
|
|
59
|
+
"allocatedCPU": allocated_cpu,
|
|
60
|
+
"allocatedMemoryBytes": allocated_memory_bytes,
|
|
61
|
+
"cpuCount": cpu_count,
|
|
62
|
+
"cpuPercent": cpu_percent,
|
|
63
|
+
"disks": disks,
|
|
64
|
+
"memoryTotalBytes": memory_total_bytes,
|
|
65
|
+
"memoryUsedBytes": memory_used_bytes,
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
return field_dict
|
|
70
|
+
|
|
71
|
+
@classmethod
|
|
72
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
73
|
+
from ..models.disk_metrics import DiskMetrics
|
|
74
|
+
|
|
75
|
+
d = dict(src_dict)
|
|
76
|
+
allocated_cpu = d.pop("allocatedCPU")
|
|
77
|
+
|
|
78
|
+
allocated_memory_bytes = d.pop("allocatedMemoryBytes")
|
|
79
|
+
|
|
80
|
+
cpu_count = d.pop("cpuCount")
|
|
81
|
+
|
|
82
|
+
cpu_percent = d.pop("cpuPercent")
|
|
83
|
+
|
|
84
|
+
disks = []
|
|
85
|
+
_disks = d.pop("disks")
|
|
86
|
+
for disks_item_data in _disks:
|
|
87
|
+
disks_item = DiskMetrics.from_dict(disks_item_data)
|
|
88
|
+
|
|
89
|
+
disks.append(disks_item)
|
|
90
|
+
|
|
91
|
+
memory_total_bytes = d.pop("memoryTotalBytes")
|
|
92
|
+
|
|
93
|
+
memory_used_bytes = d.pop("memoryUsedBytes")
|
|
94
|
+
|
|
95
|
+
node_metrics = cls(
|
|
96
|
+
allocated_cpu=allocated_cpu,
|
|
97
|
+
allocated_memory_bytes=allocated_memory_bytes,
|
|
98
|
+
cpu_count=cpu_count,
|
|
99
|
+
cpu_percent=cpu_percent,
|
|
100
|
+
disks=disks,
|
|
101
|
+
memory_total_bytes=memory_total_bytes,
|
|
102
|
+
memory_used_bytes=memory_used_bytes,
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
node_metrics.additional_properties = d
|
|
106
|
+
return node_metrics
|
|
107
|
+
|
|
108
|
+
@property
|
|
109
|
+
def additional_keys(self) -> list[str]:
|
|
110
|
+
return list(self.additional_properties.keys())
|
|
111
|
+
|
|
112
|
+
def __getitem__(self, key: str) -> Any:
|
|
113
|
+
return self.additional_properties[key]
|
|
114
|
+
|
|
115
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
116
|
+
self.additional_properties[key] = value
|
|
117
|
+
|
|
118
|
+
def __delitem__(self, key: str) -> None:
|
|
119
|
+
del self.additional_properties[key]
|
|
120
|
+
|
|
121
|
+
def __contains__(self, key: str) -> bool:
|
|
122
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar, Union
|
|
3
|
+
from uuid import UUID
|
|
4
|
+
|
|
5
|
+
from attrs import define as _attrs_define
|
|
6
|
+
from attrs import field as _attrs_field
|
|
7
|
+
|
|
8
|
+
from ..models.node_status import NodeStatus
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="NodeStatusChange")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class NodeStatusChange:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
status (NodeStatus): Status of the node.
|
|
19
|
+
- draining: the node is bound to be shut down. It will not accept new sandboxes and will stop once all existing
|
|
20
|
+
sandboxes are done.
|
|
21
|
+
- standby: the node is not actively used, but it can return to ready and continue serving traffic.
|
|
22
|
+
cluster_id (Union[Unset, UUID]): Identifier of the cluster
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
status: NodeStatus
|
|
26
|
+
cluster_id: Union[Unset, UUID] = UNSET
|
|
27
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
28
|
+
|
|
29
|
+
def to_dict(self) -> dict[str, Any]:
|
|
30
|
+
status = self.status.value
|
|
31
|
+
|
|
32
|
+
cluster_id: Union[Unset, str] = UNSET
|
|
33
|
+
if not isinstance(self.cluster_id, Unset):
|
|
34
|
+
cluster_id = str(self.cluster_id)
|
|
35
|
+
|
|
36
|
+
field_dict: dict[str, Any] = {}
|
|
37
|
+
field_dict.update(self.additional_properties)
|
|
38
|
+
field_dict.update(
|
|
39
|
+
{
|
|
40
|
+
"status": status,
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
if cluster_id is not UNSET:
|
|
44
|
+
field_dict["clusterID"] = cluster_id
|
|
45
|
+
|
|
46
|
+
return field_dict
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
50
|
+
d = dict(src_dict)
|
|
51
|
+
status = NodeStatus(d.pop("status"))
|
|
52
|
+
|
|
53
|
+
_cluster_id = d.pop("clusterID", UNSET)
|
|
54
|
+
cluster_id: Union[Unset, UUID]
|
|
55
|
+
if isinstance(_cluster_id, Unset):
|
|
56
|
+
cluster_id = UNSET
|
|
57
|
+
else:
|
|
58
|
+
cluster_id = UUID(_cluster_id)
|
|
59
|
+
|
|
60
|
+
node_status_change = cls(
|
|
61
|
+
status=status,
|
|
62
|
+
cluster_id=cluster_id,
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
node_status_change.additional_properties = d
|
|
66
|
+
return node_status_change
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def additional_keys(self) -> list[str]:
|
|
70
|
+
return list(self.additional_properties.keys())
|
|
71
|
+
|
|
72
|
+
def __getitem__(self, key: str) -> Any:
|
|
73
|
+
return self.additional_properties[key]
|
|
74
|
+
|
|
75
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
76
|
+
self.additional_properties[key] = value
|
|
77
|
+
|
|
78
|
+
def __delitem__(self, key: str) -> None:
|
|
79
|
+
del self.additional_properties[key]
|
|
80
|
+
|
|
81
|
+
def __contains__(self, key: str) -> bool:
|
|
82
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar, Union
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="PostSandboxesSandboxIDRefreshesBody")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class PostSandboxesSandboxIDRefreshesBody:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
duration (Union[Unset, int]): Duration for which the sandbox should be kept alive in seconds
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
duration: Union[Unset, int] = UNSET
|
|
20
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
21
|
+
|
|
22
|
+
def to_dict(self) -> dict[str, Any]:
|
|
23
|
+
duration = self.duration
|
|
24
|
+
|
|
25
|
+
field_dict: dict[str, Any] = {}
|
|
26
|
+
field_dict.update(self.additional_properties)
|
|
27
|
+
field_dict.update({})
|
|
28
|
+
if duration is not UNSET:
|
|
29
|
+
field_dict["duration"] = duration
|
|
30
|
+
|
|
31
|
+
return field_dict
|
|
32
|
+
|
|
33
|
+
@classmethod
|
|
34
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
35
|
+
d = dict(src_dict)
|
|
36
|
+
duration = d.pop("duration", UNSET)
|
|
37
|
+
|
|
38
|
+
post_sandboxes_sandbox_id_refreshes_body = cls(
|
|
39
|
+
duration=duration,
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
post_sandboxes_sandbox_id_refreshes_body.additional_properties = d
|
|
43
|
+
return post_sandboxes_sandbox_id_refreshes_body
|
|
44
|
+
|
|
45
|
+
@property
|
|
46
|
+
def additional_keys(self) -> list[str]:
|
|
47
|
+
return list(self.additional_properties.keys())
|
|
48
|
+
|
|
49
|
+
def __getitem__(self, key: str) -> Any:
|
|
50
|
+
return self.additional_properties[key]
|
|
51
|
+
|
|
52
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
53
|
+
self.additional_properties[key] = value
|
|
54
|
+
|
|
55
|
+
def __delitem__(self, key: str) -> None:
|
|
56
|
+
del self.additional_properties[key]
|
|
57
|
+
|
|
58
|
+
def __contains__(self, key: str) -> bool:
|
|
59
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar, Union
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="PostSandboxesSandboxIDSnapshotsBody")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class PostSandboxesSandboxIDSnapshotsBody:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
name (Union[Unset, str]): Optional name for the snapshot template. If a snapshot template with this name already
|
|
17
|
+
exists, a new build will be assigned to the existing template instead of creating a new one.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
name: Union[Unset, str] = UNSET
|
|
21
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
22
|
+
|
|
23
|
+
def to_dict(self) -> dict[str, Any]:
|
|
24
|
+
name = self.name
|
|
25
|
+
|
|
26
|
+
field_dict: dict[str, Any] = {}
|
|
27
|
+
field_dict.update(self.additional_properties)
|
|
28
|
+
field_dict.update({})
|
|
29
|
+
if name is not UNSET:
|
|
30
|
+
field_dict["name"] = name
|
|
31
|
+
|
|
32
|
+
return field_dict
|
|
33
|
+
|
|
34
|
+
@classmethod
|
|
35
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
36
|
+
d = dict(src_dict)
|
|
37
|
+
name = d.pop("name", UNSET)
|
|
38
|
+
|
|
39
|
+
post_sandboxes_sandbox_id_snapshots_body = cls(
|
|
40
|
+
name=name,
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
post_sandboxes_sandbox_id_snapshots_body.additional_properties = d
|
|
44
|
+
return post_sandboxes_sandbox_id_snapshots_body
|
|
45
|
+
|
|
46
|
+
@property
|
|
47
|
+
def additional_keys(self) -> list[str]:
|
|
48
|
+
return list(self.additional_properties.keys())
|
|
49
|
+
|
|
50
|
+
def __getitem__(self, key: str) -> Any:
|
|
51
|
+
return self.additional_properties[key]
|
|
52
|
+
|
|
53
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
54
|
+
self.additional_properties[key] = value
|
|
55
|
+
|
|
56
|
+
def __delitem__(self, key: str) -> None:
|
|
57
|
+
del self.additional_properties[key]
|
|
58
|
+
|
|
59
|
+
def __contains__(self, key: str) -> bool:
|
|
60
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
T = TypeVar("T", bound="PostSandboxesSandboxIDTimeoutBody")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class PostSandboxesSandboxIDTimeoutBody:
|
|
12
|
+
"""
|
|
13
|
+
Attributes:
|
|
14
|
+
timeout (int): Timeout in seconds from the current time after which the sandbox should expire
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
timeout: int
|
|
18
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
19
|
+
|
|
20
|
+
def to_dict(self) -> dict[str, Any]:
|
|
21
|
+
timeout = self.timeout
|
|
22
|
+
|
|
23
|
+
field_dict: dict[str, Any] = {}
|
|
24
|
+
field_dict.update(self.additional_properties)
|
|
25
|
+
field_dict.update(
|
|
26
|
+
{
|
|
27
|
+
"timeout": timeout,
|
|
28
|
+
}
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
return field_dict
|
|
32
|
+
|
|
33
|
+
@classmethod
|
|
34
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
35
|
+
d = dict(src_dict)
|
|
36
|
+
timeout = d.pop("timeout")
|
|
37
|
+
|
|
38
|
+
post_sandboxes_sandbox_id_timeout_body = cls(
|
|
39
|
+
timeout=timeout,
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
post_sandboxes_sandbox_id_timeout_body.additional_properties = d
|
|
43
|
+
return post_sandboxes_sandbox_id_timeout_body
|
|
44
|
+
|
|
45
|
+
@property
|
|
46
|
+
def additional_keys(self) -> list[str]:
|
|
47
|
+
return list(self.additional_properties.keys())
|
|
48
|
+
|
|
49
|
+
def __getitem__(self, key: str) -> Any:
|
|
50
|
+
return self.additional_properties[key]
|
|
51
|
+
|
|
52
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
53
|
+
self.additional_properties[key] = value
|
|
54
|
+
|
|
55
|
+
def __delitem__(self, key: str) -> None:
|
|
56
|
+
del self.additional_properties[key]
|
|
57
|
+
|
|
58
|
+
def __contains__(self, key: str) -> bool:
|
|
59
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar, Union
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="ResumedSandbox")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class ResumedSandbox:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
auto_pause (Union[Unset, bool]): Automatically pauses the sandbox after the timeout
|
|
17
|
+
timeout (Union[Unset, int]): Time to live for the sandbox in seconds. Default: 15.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
auto_pause: Union[Unset, bool] = UNSET
|
|
21
|
+
timeout: Union[Unset, int] = 15
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
auto_pause = self.auto_pause
|
|
26
|
+
|
|
27
|
+
timeout = self.timeout
|
|
28
|
+
|
|
29
|
+
field_dict: dict[str, Any] = {}
|
|
30
|
+
field_dict.update(self.additional_properties)
|
|
31
|
+
field_dict.update({})
|
|
32
|
+
if auto_pause is not UNSET:
|
|
33
|
+
field_dict["autoPause"] = auto_pause
|
|
34
|
+
if timeout is not UNSET:
|
|
35
|
+
field_dict["timeout"] = timeout
|
|
36
|
+
|
|
37
|
+
return field_dict
|
|
38
|
+
|
|
39
|
+
@classmethod
|
|
40
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
41
|
+
d = dict(src_dict)
|
|
42
|
+
auto_pause = d.pop("autoPause", UNSET)
|
|
43
|
+
|
|
44
|
+
timeout = d.pop("timeout", UNSET)
|
|
45
|
+
|
|
46
|
+
resumed_sandbox = cls(
|
|
47
|
+
auto_pause=auto_pause,
|
|
48
|
+
timeout=timeout,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
resumed_sandbox.additional_properties = d
|
|
52
|
+
return resumed_sandbox
|
|
53
|
+
|
|
54
|
+
@property
|
|
55
|
+
def additional_keys(self) -> list[str]:
|
|
56
|
+
return list(self.additional_properties.keys())
|
|
57
|
+
|
|
58
|
+
def __getitem__(self, key: str) -> Any:
|
|
59
|
+
return self.additional_properties[key]
|
|
60
|
+
|
|
61
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
62
|
+
self.additional_properties[key] = value
|
|
63
|
+
|
|
64
|
+
def __delitem__(self, key: str) -> None:
|
|
65
|
+
del self.additional_properties[key]
|
|
66
|
+
|
|
67
|
+
def __contains__(self, key: str) -> bool:
|
|
68
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar, Union, cast
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="Sandbox")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class Sandbox:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
client_id (str): Identifier of the client
|
|
17
|
+
envd_version (str): Version of the envd running in the sandbox
|
|
18
|
+
sandbox_id (str): Identifier of the sandbox
|
|
19
|
+
template_id (str): Identifier of the template from which is the sandbox created
|
|
20
|
+
alias (Union[Unset, str]): Alias of the template
|
|
21
|
+
domain (Union[None, Unset, str]): Base domain where the sandbox traffic is accessible
|
|
22
|
+
envd_access_token (Union[Unset, str]): Access token used for envd communication
|
|
23
|
+
traffic_access_token (Union[None, Unset, str]): Token required for accessing sandbox via proxy.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
client_id: str
|
|
27
|
+
envd_version: str
|
|
28
|
+
sandbox_id: str
|
|
29
|
+
template_id: str
|
|
30
|
+
alias: Union[Unset, str] = UNSET
|
|
31
|
+
domain: Union[None, Unset, str] = UNSET
|
|
32
|
+
envd_access_token: Union[Unset, str] = UNSET
|
|
33
|
+
traffic_access_token: Union[None, Unset, str] = UNSET
|
|
34
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
35
|
+
|
|
36
|
+
def to_dict(self) -> dict[str, Any]:
|
|
37
|
+
client_id = self.client_id
|
|
38
|
+
|
|
39
|
+
envd_version = self.envd_version
|
|
40
|
+
|
|
41
|
+
sandbox_id = self.sandbox_id
|
|
42
|
+
|
|
43
|
+
template_id = self.template_id
|
|
44
|
+
|
|
45
|
+
alias = self.alias
|
|
46
|
+
|
|
47
|
+
domain: Union[None, Unset, str]
|
|
48
|
+
if isinstance(self.domain, Unset):
|
|
49
|
+
domain = UNSET
|
|
50
|
+
else:
|
|
51
|
+
domain = self.domain
|
|
52
|
+
|
|
53
|
+
envd_access_token = self.envd_access_token
|
|
54
|
+
|
|
55
|
+
traffic_access_token: Union[None, Unset, str]
|
|
56
|
+
if isinstance(self.traffic_access_token, Unset):
|
|
57
|
+
traffic_access_token = UNSET
|
|
58
|
+
else:
|
|
59
|
+
traffic_access_token = self.traffic_access_token
|
|
60
|
+
|
|
61
|
+
field_dict: dict[str, Any] = {}
|
|
62
|
+
field_dict.update(self.additional_properties)
|
|
63
|
+
field_dict.update(
|
|
64
|
+
{
|
|
65
|
+
"clientID": client_id,
|
|
66
|
+
"envdVersion": envd_version,
|
|
67
|
+
"sandboxID": sandbox_id,
|
|
68
|
+
"templateID": template_id,
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
if alias is not UNSET:
|
|
72
|
+
field_dict["alias"] = alias
|
|
73
|
+
if domain is not UNSET:
|
|
74
|
+
field_dict["domain"] = domain
|
|
75
|
+
if envd_access_token is not UNSET:
|
|
76
|
+
field_dict["envdAccessToken"] = envd_access_token
|
|
77
|
+
if traffic_access_token is not UNSET:
|
|
78
|
+
field_dict["trafficAccessToken"] = traffic_access_token
|
|
79
|
+
|
|
80
|
+
return field_dict
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
84
|
+
d = dict(src_dict)
|
|
85
|
+
client_id = d.pop("clientID")
|
|
86
|
+
|
|
87
|
+
envd_version = d.pop("envdVersion")
|
|
88
|
+
|
|
89
|
+
sandbox_id = d.pop("sandboxID")
|
|
90
|
+
|
|
91
|
+
template_id = d.pop("templateID")
|
|
92
|
+
|
|
93
|
+
alias = d.pop("alias", UNSET)
|
|
94
|
+
|
|
95
|
+
def _parse_domain(data: object) -> Union[None, Unset, str]:
|
|
96
|
+
if data is None:
|
|
97
|
+
return data
|
|
98
|
+
if isinstance(data, Unset):
|
|
99
|
+
return data
|
|
100
|
+
return cast(Union[None, Unset, str], data)
|
|
101
|
+
|
|
102
|
+
domain = _parse_domain(d.pop("domain", UNSET))
|
|
103
|
+
|
|
104
|
+
envd_access_token = d.pop("envdAccessToken", UNSET)
|
|
105
|
+
|
|
106
|
+
def _parse_traffic_access_token(data: object) -> Union[None, Unset, str]:
|
|
107
|
+
if data is None:
|
|
108
|
+
return data
|
|
109
|
+
if isinstance(data, Unset):
|
|
110
|
+
return data
|
|
111
|
+
return cast(Union[None, Unset, str], data)
|
|
112
|
+
|
|
113
|
+
traffic_access_token = _parse_traffic_access_token(
|
|
114
|
+
d.pop("trafficAccessToken", UNSET)
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
sandbox = cls(
|
|
118
|
+
client_id=client_id,
|
|
119
|
+
envd_version=envd_version,
|
|
120
|
+
sandbox_id=sandbox_id,
|
|
121
|
+
template_id=template_id,
|
|
122
|
+
alias=alias,
|
|
123
|
+
domain=domain,
|
|
124
|
+
envd_access_token=envd_access_token,
|
|
125
|
+
traffic_access_token=traffic_access_token,
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
sandbox.additional_properties = d
|
|
129
|
+
return sandbox
|
|
130
|
+
|
|
131
|
+
@property
|
|
132
|
+
def additional_keys(self) -> list[str]:
|
|
133
|
+
return list(self.additional_properties.keys())
|
|
134
|
+
|
|
135
|
+
def __getitem__(self, key: str) -> Any:
|
|
136
|
+
return self.additional_properties[key]
|
|
137
|
+
|
|
138
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
139
|
+
self.additional_properties[key] = value
|
|
140
|
+
|
|
141
|
+
def __delitem__(self, key: str) -> None:
|
|
142
|
+
del self.additional_properties[key]
|
|
143
|
+
|
|
144
|
+
def __contains__(self, key: str) -> bool:
|
|
145
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
T = TypeVar("T", bound="SandboxAutoResumeConfig")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class SandboxAutoResumeConfig:
|
|
12
|
+
"""Auto-resume configuration for paused sandboxes.
|
|
13
|
+
|
|
14
|
+
Attributes:
|
|
15
|
+
enabled (bool): Auto-resume enabled flag for paused sandboxes. Default false.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
enabled: bool
|
|
19
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
20
|
+
|
|
21
|
+
def to_dict(self) -> dict[str, Any]:
|
|
22
|
+
enabled = self.enabled
|
|
23
|
+
|
|
24
|
+
field_dict: dict[str, Any] = {}
|
|
25
|
+
field_dict.update(self.additional_properties)
|
|
26
|
+
field_dict.update(
|
|
27
|
+
{
|
|
28
|
+
"enabled": enabled,
|
|
29
|
+
}
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
return field_dict
|
|
33
|
+
|
|
34
|
+
@classmethod
|
|
35
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
36
|
+
d = dict(src_dict)
|
|
37
|
+
enabled = d.pop("enabled")
|
|
38
|
+
|
|
39
|
+
sandbox_auto_resume_config = cls(
|
|
40
|
+
enabled=enabled,
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
sandbox_auto_resume_config.additional_properties = d
|
|
44
|
+
return sandbox_auto_resume_config
|
|
45
|
+
|
|
46
|
+
@property
|
|
47
|
+
def additional_keys(self) -> list[str]:
|
|
48
|
+
return list(self.additional_properties.keys())
|
|
49
|
+
|
|
50
|
+
def __getitem__(self, key: str) -> Any:
|
|
51
|
+
return self.additional_properties[key]
|
|
52
|
+
|
|
53
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
54
|
+
self.additional_properties[key] = value
|
|
55
|
+
|
|
56
|
+
def __delitem__(self, key: str) -> None:
|
|
57
|
+
del self.additional_properties[key]
|
|
58
|
+
|
|
59
|
+
def __contains__(self, key: str) -> bool:
|
|
60
|
+
return key in self.additional_properties
|