execution-plane-client 0.1.21__tar.gz → 0.1.22__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.
- {execution_plane_client-0.1.21 → execution_plane_client-0.1.22}/PKG-INFO +1 -1
- {execution_plane_client-0.1.21 → execution_plane_client-0.1.22}/_version.py +2 -2
- {execution_plane_client-0.1.21 → execution_plane_client-0.1.22}/catalog.py +2 -2
- {execution_plane_client-0.1.21 → execution_plane_client-0.1.22}/commands/credentials.py +3 -3
- {execution_plane_client-0.1.21 → execution_plane_client-0.1.22}/commands/results.py +28 -22
- {execution_plane_client-0.1.21 → execution_plane_client-0.1.22}/.gitignore +0 -0
- {execution_plane_client-0.1.21 → execution_plane_client-0.1.22}/LICENSE +0 -0
- {execution_plane_client-0.1.21 → execution_plane_client-0.1.22}/README.md +0 -0
- {execution_plane_client-0.1.21 → execution_plane_client-0.1.22}/__init__.py +0 -0
- {execution_plane_client-0.1.21 → execution_plane_client-0.1.22}/commands/__init__.py +0 -0
- {execution_plane_client-0.1.21 → execution_plane_client-0.1.22}/commands/base.py +0 -0
- {execution_plane_client-0.1.21 → execution_plane_client-0.1.22}/commands/clusters.py +0 -0
- {execution_plane_client-0.1.21 → execution_plane_client-0.1.22}/commands/control.py +0 -0
- {execution_plane_client-0.1.21 → execution_plane_client-0.1.22}/commands/targets.py +0 -0
- {execution_plane_client-0.1.21 → execution_plane_client-0.1.22}/commands/work.py +0 -0
- {execution_plane_client-0.1.21 → execution_plane_client-0.1.22}/errors.py +0 -0
- {execution_plane_client-0.1.21 → execution_plane_client-0.1.22}/handlers.py +0 -0
- {execution_plane_client-0.1.21 → execution_plane_client-0.1.22}/models/__init__.py +0 -0
- {execution_plane_client-0.1.21 → execution_plane_client-0.1.22}/models/cluster.py +0 -0
- {execution_plane_client-0.1.21 → execution_plane_client-0.1.22}/models/execution_target.py +0 -0
- {execution_plane_client-0.1.21 → execution_plane_client-0.1.22}/models/runtime_context.py +0 -0
- {execution_plane_client-0.1.21 → execution_plane_client-0.1.22}/models/shared.py +0 -0
- {execution_plane_client-0.1.21 → execution_plane_client-0.1.22}/models/work_item.py +0 -0
- {execution_plane_client-0.1.21 → execution_plane_client-0.1.22}/protocol.py +0 -0
- {execution_plane_client-0.1.21 → execution_plane_client-0.1.22}/py.typed +0 -0
- {execution_plane_client-0.1.21 → execution_plane_client-0.1.22}/pyproject.toml +0 -0
- {execution_plane_client-0.1.21 → execution_plane_client-0.1.22}/registry.py +0 -0
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.1.
|
|
22
|
-
__version_tuple__ = version_tuple = (0, 1,
|
|
21
|
+
__version__ = version = '0.1.22'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 1, 22)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -5,7 +5,7 @@ from dataclasses import dataclass
|
|
|
5
5
|
from execution_plane_client.commands.base import CommandPayload
|
|
6
6
|
from execution_plane_client.commands.clusters import ClusterDelete, ClusterRegister, ClusterUpdate
|
|
7
7
|
from execution_plane_client.commands.control import Completion, WorkCancel
|
|
8
|
-
from execution_plane_client.commands.credentials import
|
|
8
|
+
from execution_plane_client.commands.credentials import CredentialResolveCluster, CredentialResolveWorkload
|
|
9
9
|
from execution_plane_client.commands.targets import TargetDelete, TargetHealth, TargetRegister, TargetUpdate
|
|
10
10
|
from execution_plane_client.commands.work import WorkDelete, WorkExecute
|
|
11
11
|
from execution_plane_client.errors import UnsupportedCommand
|
|
@@ -30,7 +30,7 @@ class CommandCatalog:
|
|
|
30
30
|
WorkExecute,
|
|
31
31
|
WorkDelete,
|
|
32
32
|
Completion,
|
|
33
|
-
|
|
33
|
+
CredentialResolveCluster,
|
|
34
34
|
CredentialResolveWorkload,
|
|
35
35
|
ClusterRegister,
|
|
36
36
|
ClusterUpdate,
|
|
@@ -12,10 +12,10 @@ from execution_plane_client.commands.work import CredentialRecipeId, StepIdentit
|
|
|
12
12
|
from execution_plane_client.protocol import Identifier # noqa: TC001
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
class
|
|
16
|
-
"""Resolve an opaque credential reference into
|
|
15
|
+
class CredentialResolveCluster(CommandPayload):
|
|
16
|
+
"""Resolve an opaque cluster credential reference into its credential document."""
|
|
17
17
|
|
|
18
|
-
command_type: ClassVar[str] = "credential.resolve"
|
|
18
|
+
command_type: ClassVar[str] = "credential.resolve.cluster"
|
|
19
19
|
credential_ref: UUID = Field(
|
|
20
20
|
repr=False,
|
|
21
21
|
description="Opaque AO credential reference.",
|
|
@@ -10,16 +10,36 @@ from pydantic import Field, StrictBool, StrictStr, field_validator
|
|
|
10
10
|
|
|
11
11
|
from execution_plane_client.protocol import ResourceReference, WireModel
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
MAX_CREDENTIAL_FIELDS = 32
|
|
14
|
+
MAX_CREDENTIAL_BYTES = 32 * 1024
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
"""
|
|
17
|
+
def validate_credential_document(value: dict[str, str]) -> dict[str, str]:
|
|
18
|
+
"""Bound credential field count and encoded response size."""
|
|
19
|
+
if not value:
|
|
20
|
+
message = "Credential document must not be empty"
|
|
21
|
+
raise ValueError(message)
|
|
22
|
+
if len(value) > MAX_CREDENTIAL_FIELDS:
|
|
23
|
+
message = "Credential document must contain at most 32 fields"
|
|
24
|
+
raise ValueError(message)
|
|
25
|
+
encoded = json.dumps(value, ensure_ascii=False, separators=(",", ":")).encode("utf-8")
|
|
26
|
+
if len(encoded) > MAX_CREDENTIAL_BYTES:
|
|
27
|
+
message = "Credential document exceeds 32 KiB"
|
|
28
|
+
raise ValueError(message)
|
|
29
|
+
return value
|
|
19
30
|
|
|
20
|
-
|
|
31
|
+
|
|
32
|
+
class CredentialResolveClusterCommandResult(WireModel):
|
|
33
|
+
"""Typed result returned for a cluster credential-resolution command."""
|
|
34
|
+
|
|
35
|
+
command_type: Literal["credential.resolve.cluster"] = "credential.resolve.cluster"
|
|
21
36
|
command_revision: Literal[1] = 1
|
|
22
|
-
credential:
|
|
37
|
+
credential: dict[
|
|
38
|
+
Annotated[StrictStr, Field(min_length=1, max_length=128)],
|
|
39
|
+
Annotated[StrictStr, Field(min_length=1, max_length=8192)],
|
|
40
|
+
] = Field(repr=False)
|
|
41
|
+
|
|
42
|
+
check_document = field_validator("credential")(validate_credential_document)
|
|
23
43
|
|
|
24
44
|
|
|
25
45
|
class CredentialResolveWorkloadCommandResult(WireModel):
|
|
@@ -34,21 +54,7 @@ class CredentialResolveWorkloadCommandResult(WireModel):
|
|
|
34
54
|
Annotated[StrictStr, Field(min_length=1, max_length=8192)],
|
|
35
55
|
] = Field(repr=False)
|
|
36
56
|
|
|
37
|
-
|
|
38
|
-
@classmethod
|
|
39
|
-
def check_document(cls, value: dict[str, str]) -> dict[str, str]:
|
|
40
|
-
"""Bound credential field count and encoded response size."""
|
|
41
|
-
if not value:
|
|
42
|
-
message = "Credential document must not be empty"
|
|
43
|
-
raise ValueError(message)
|
|
44
|
-
if len(value) > MAX_WORKLOAD_CREDENTIAL_FIELDS:
|
|
45
|
-
message = "Credential document must contain at most 32 fields"
|
|
46
|
-
raise ValueError(message)
|
|
47
|
-
encoded = json.dumps(value, ensure_ascii=False, separators=(",", ":")).encode("utf-8")
|
|
48
|
-
if len(encoded) > MAX_WORKLOAD_CREDENTIAL_BYTES:
|
|
49
|
-
message = "Credential document exceeds 32 KiB"
|
|
50
|
-
raise ValueError(message)
|
|
51
|
-
return value
|
|
57
|
+
check_document = field_validator("credential")(validate_credential_document)
|
|
52
58
|
|
|
53
59
|
|
|
54
60
|
class TargetHealthCommandResult(WireModel):
|
|
@@ -62,7 +68,7 @@ class TargetHealthCommandResult(WireModel):
|
|
|
62
68
|
|
|
63
69
|
|
|
64
70
|
CommandResult = Annotated[
|
|
65
|
-
|
|
71
|
+
CredentialResolveClusterCommandResult | CredentialResolveWorkloadCommandResult | TargetHealthCommandResult,
|
|
66
72
|
Field(discriminator="command_type"),
|
|
67
73
|
]
|
|
68
74
|
|
|
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
|