lcr/0021-sandbox-sandbox-api-update.patch

135 lines
3.6 KiB
Diff
Raw Permalink Normal View History

From 85cca2ea57f44639fdd55e3f3eeada93e7548adc Mon Sep 17 00:00:00 2001
From: liuxu <liuxu156@huawei.com>
Date: Wed, 18 Sep 2024 11:55:24 +0800
Subject: [PATCH 21/25] sandbox:sandbox api update
Signed-off-by: liuxu <liuxu156@huawei.com>
---
src/json/schema/sandbox/mount.json | 19 ++++++++++++++++
src/json/schema/sandbox/process.json | 22 ++++++++++++++++++
src/json/schema/sandbox/task.json | 34 ++++++++++++++++++++++++++++
src/json/schema/sandbox/tasks.json | 12 ++++++++++
4 files changed, 87 insertions(+)
create mode 100644 src/json/schema/sandbox/mount.json
create mode 100644 src/json/schema/sandbox/process.json
create mode 100644 src/json/schema/sandbox/task.json
create mode 100644 src/json/schema/sandbox/tasks.json
diff --git a/src/json/schema/sandbox/mount.json b/src/json/schema/sandbox/mount.json
new file mode 100644
index 0000000..f8fcb73
--- /dev/null
+++ b/src/json/schema/sandbox/mount.json
@@ -0,0 +1,19 @@
+{
+ "_comment": "github.com/containerd/containerd/api/types/mount.proto",
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string"
+ },
+ "source": {
+ "type": "string"
+ },
+ "target": {
+ "type": "string"
+ },
+ "options": {
+ "$ref": "../defs.json#/definitions/ArrayOfStrings"
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/json/schema/sandbox/process.json b/src/json/schema/sandbox/process.json
new file mode 100644
index 0000000..c440236
--- /dev/null
+++ b/src/json/schema/sandbox/process.json
@@ -0,0 +1,22 @@
+{
+ "_comment": "sandbox api depend: update",
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "object",
+ "properties": {
+ "exec_id": {
+ "type": "string"
+ },
+ "spec": {
+ "$ref": "../defs.json#/definitions/process"
+ },
+ "stdin": {
+ "type": "string"
+ },
+ "stdout": {
+ "type": "string"
+ },
+ "stderr": {
+ "type": "string"
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/json/schema/sandbox/task.json b/src/json/schema/sandbox/task.json
new file mode 100644
index 0000000..ace8fad
--- /dev/null
+++ b/src/json/schema/sandbox/task.json
@@ -0,0 +1,34 @@
+{
+ "_comment": "sandbox api depend: update",
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "object",
+ "properties": {
+ "task_id": {
+ "type": "string"
+ },
+ "spec": {
+ "$ref": "../oci/runtime/spec.json"
+ },
+ "rootfs": {
+ "type": "array",
+ "items": {
+ "$ref": "mount.json"
+ }
+ },
+ "stdin": {
+ "type": "string"
+ },
+ "stdout": {
+ "type": "string"
+ },
+ "stderr": {
+ "type": "string"
+ },
+ "processes": {
+ "type": "array",
+ "items": {
+ "$ref": "process.json"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/json/schema/sandbox/tasks.json b/src/json/schema/sandbox/tasks.json
new file mode 100644
index 0000000..9924122
--- /dev/null
+++ b/src/json/schema/sandbox/tasks.json
@@ -0,0 +1,12 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "object",
+ "properties": {
+ "tasks": {
+ "type": "array",
+ "items": {
+ "$ref": "task.json"
+ }
+ }
+ }
+}
--
2.34.1