Skip to content

Commit 208055d

Browse files
ZhaoQing7892furykerry
authored andcommitted
update python sdk
1 parent 0298e10 commit 208055d

5 files changed

Lines changed: 33 additions & 3 deletions

File tree

clients/python/openkruise/agents/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,20 @@
55
SandboxTemplateRef,
66
SandboxCondition,
77
SandboxPodInfo,
8+
SandboxRuntime,
89
SandboxSet,
910
SandboxSetSpec,
1011
SandboxSetStatus,
1112
SandboxSetTemplateRef,
1213
SandboxSetCondition,
1314
SandboxSetScaleStrategy,
15+
SandboxSetRuntime,
1416
SandboxClaim,
1517
SandboxClaimSpec,
1618
SandboxClaimStatus,
1719
SandboxClaimCondition,
1820
SandboxClaimInplaceUpdate,
21+
SandboxClaimRuntime,
1922
)
2023
from .sandbox_client import SandboxClient
2124
from .sandboxset_client import SandboxSetClient

clients/python/openkruise/agents/models/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
TemplateRef as SandboxTemplateRef,
66
Condition as SandboxCondition,
77
PodInfo as SandboxPodInfo,
8+
Runtime as SandboxRuntime,
89
)
910
from .sandboxset import (
1011
SandboxSet,
@@ -13,11 +14,13 @@
1314
TemplateRef as SandboxSetTemplateRef,
1415
Condition as SandboxSetCondition,
1516
ScaleStrategy as SandboxSetScaleStrategy,
17+
Runtime as SandboxSetRuntime,
1618
)
1719
from .sandboxclaim import (
1820
SandboxClaim,
1921
Spec as SandboxClaimSpec,
2022
Status as SandboxClaimStatus,
2123
Condition as SandboxClaimCondition,
2224
InplaceUpdate as SandboxClaimInplaceUpdate,
25+
Runtime as SandboxClaimRuntime,
2326
)

clients/python/openkruise/agents/models/sandbox.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: sandbox_schema.json
3-
# timestamp: 2026-03-31T05:34:14+00:00
3+
# timestamp: 2026-04-03T09:19:07+00:00
44

55
from __future__ import annotations
66

@@ -87,6 +87,10 @@ class PodInfo(BaseModel):
8787
"""
8888

8989

90+
class Runtime(BaseModel):
91+
name: str
92+
93+
9094
class Sandbox(BaseModel):
9195
model_config = ConfigDict(arbitrary_types_allowed=True)
9296
"""
@@ -137,6 +141,10 @@ class Spec(BaseModel):
137141
"""
138142
PersistentContents indicates resume pod with persistent content, Enum: ip, memory, filesystem
139143
"""
144+
runtimes: list[Runtime] | None = None
145+
"""
146+
Runtimes - Runtime configuration for sandbox object
147+
"""
140148
shutdownTime: datetime | None = None
141149
"""
142150
ShutdownTime - Absolute time when the sandbox is deleted.

clients/python/openkruise/agents/models/sandboxclaim.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: sandboxclaim_schema.json
3-
# timestamp: 2026-03-31T05:34:11+00:00
3+
# timestamp: 2026-04-03T09:19:02+00:00
44

55
from __future__ import annotations
66

@@ -79,6 +79,10 @@ class InplaceUpdate(BaseModel):
7979
"""
8080

8181

82+
class Runtime(BaseModel):
83+
name: str
84+
85+
8286
class SandboxClaim(BaseModel):
8387
model_config = ConfigDict(arbitrary_types_allowed=True)
8488
"""
@@ -160,6 +164,10 @@ class Spec(BaseModel):
160164
"""
161165
Set ReserveFailedSandbox to true to reserve failed sandboxes
162166
"""
167+
runtimes: list[Runtime] | None = None
168+
"""
169+
Runtimes - Runtime configuration for sandbox object
170+
"""
163171
shutdownTime: datetime | None = None
164172
"""
165173
ShutdownTime specifies the absolute time when the sandbox should be shut down

clients/python/openkruise/agents/models/sandboxset.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: sandboxset_schema.json
3-
# timestamp: 2026-03-31T05:34:16+00:00
3+
# timestamp: 2026-04-03T09:19:12+00:00
44

55
from __future__ import annotations
66

@@ -60,6 +60,10 @@ class Condition(BaseModel):
6060
"""
6161

6262

63+
class Runtime(BaseModel):
64+
name: str
65+
66+
6367
class SandboxSet(BaseModel):
6468
model_config = ConfigDict(arbitrary_types_allowed=True)
6569
"""
@@ -121,6 +125,10 @@ class Spec(BaseModel):
121125
"""
122126
Replicas is the number of unused sandboxes, including available and creating ones.
123127
"""
128+
runtimes: list[Runtime] | None = None
129+
"""
130+
Runtimes - Runtime configuration for sandbox object
131+
"""
124132
scaleStrategy: ScaleStrategy | None = None
125133
"""
126134
ScaleStrategy indicates the ScaleStrategy that will be employed to

0 commit comments

Comments
 (0)