Commit d97ab7a
committed
refactor(sandbox): migrate client and sandbox classes to object-based API parameters
This commit refactors the SandboxClient and Sandbox classes to use object-based
API parameters instead of the legacy string-based parameters. The changes include
updating method signatures, parameter handling, and maintaining backward
compatibility for deprecated APIs. Additionally, the template tests have been
updated to use direct SandboxControlAPI mocking instead of client mocking.
The parameter migration affects listTemplates, deleteSandbox, stopSandbox, and
listSandboxes methods to accept object parameters for better type safety and
flexibility while maintaining support for legacy string parameter usage.
refactor(sandbox): 将客户端和沙箱类迁移到基于对象的 API 参数
此提交重构了 SandboxClient 和 Sandbox 类,以使用基于对象的 API 参数,
而不是传统的基于字符串的参数。更改包括更新方法签名、参数处理,
并维护对已弃用 API 的向后兼容性。此外,模板测试已更新为直接使用
SandboxControlAPI 模拟,而不是客户端模拟。
参数迁移影响了 listTemplates、deleteSandbox、stopSandbox 和
listSandboxes 方法,使其接受对象参数以实现更好的类型安全性和灵活性,
同时保持对传统字符串参数用法的支持。
Change-Id: I9d1b8be721a41b38851d1280727b892590d085c5
Signed-off-by: OhYee <oyohyee@oyohyee.com>1 parent 67049cc commit d97ab7a
4 files changed
Lines changed: 256 additions & 499 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
31 | | - | |
32 | | - | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
271 | | - | |
| 271 | + | |
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
| |||
483 | 483 | | |
484 | 484 | | |
485 | 485 | | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
| 486 | + | |
| 487 | + | |
492 | 488 | | |
493 | | - | |
| 489 | + | |
494 | 490 | | |
495 | 491 | | |
496 | 492 | | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
| 493 | + | |
| 494 | + | |
502 | 495 | | |
503 | 496 | | |
| 497 | + | |
| 498 | + | |
504 | 499 | | |
505 | 500 | | |
506 | 501 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
| |||
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
130 | | - | |
| 129 | + | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
195 | 200 | | |
196 | 201 | | |
197 | 202 | | |
| |||
204 | 209 | | |
205 | 210 | | |
206 | 211 | | |
207 | | - | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
208 | 218 | | |
209 | 219 | | |
210 | 220 | | |
| |||
330 | 340 | | |
331 | 341 | | |
332 | 342 | | |
333 | | - | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
334 | 362 | | |
335 | 363 | | |
336 | 364 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
192 | | - | |
| 191 | + | |
193 | 192 | | |
194 | 193 | | |
195 | 194 | | |
| |||
216 | 215 | | |
217 | 216 | | |
218 | 217 | | |
219 | | - | |
220 | | - | |
| 218 | + | |
221 | 219 | | |
222 | 220 | | |
223 | 221 | | |
| |||
0 commit comments