lcr: sync from upstream
Signed-off-by: liuxu <liuxu156@huawei.com> (cherry picked from commit a31b7e00909a434144979f31851b3040b5881ac3)
This commit is contained in:
parent
3d953d2658
commit
afb705c076
134
0021-sandbox-sandbox-api-update.patch
Normal file
134
0021-sandbox-sandbox-api-update.patch
Normal file
@ -0,0 +1,134 @@
|
||||
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
|
||||
|
||||
475
0022-json-schema-for-sandbox-api.patch
Normal file
475
0022-json-schema-for-sandbox-api.patch
Normal file
@ -0,0 +1,475 @@
|
||||
From 20e71717d730f65b2f922477e4aaf7fef9f6dcb4 Mon Sep 17 00:00:00 2001
|
||||
From: xuxuepeng <xuxuepeng1@huawei.com>
|
||||
Date: Tue, 5 Nov 2024 23:10:59 +0800
|
||||
Subject: [PATCH 22/25] json schema for sandbox api
|
||||
|
||||
Signed-off-by: xuxuepeng <xuxuepeng1@huawei.com>
|
||||
---
|
||||
src/json/schema/defs.json | 16 +++++++
|
||||
src/json/schema/sandbox/create-request.json | 33 ++++++++++++++
|
||||
src/json/schema/sandbox/create-response.json | 9 ++++
|
||||
src/json/schema/sandbox/metrics-request.json | 12 +++++
|
||||
src/json/schema/sandbox/metrics-response.json | 18 ++++++++
|
||||
src/json/schema/sandbox/platform-request.json | 12 +++++
|
||||
.../schema/sandbox/platform-response.json | 15 +++++++
|
||||
src/json/schema/sandbox/sandbox.json | 44 +++++++++++++++++++
|
||||
src/json/schema/sandbox/shutdown-request.json | 12 +++++
|
||||
src/json/schema/sandbox/start-request.json | 12 +++++
|
||||
src/json/schema/sandbox/start-response.json | 24 ++++++++++
|
||||
src/json/schema/sandbox/status-request.json | 15 +++++++
|
||||
src/json/schema/sandbox/status-response.json | 36 +++++++++++++++
|
||||
src/json/schema/sandbox/stop-request.json | 15 +++++++
|
||||
src/json/schema/sandbox/update-request.json | 21 +++++++++
|
||||
src/json/schema/sandbox/wait-request.json | 12 +++++
|
||||
src/json/schema/sandbox/wait-response.json | 15 +++++++
|
||||
17 files changed, 321 insertions(+)
|
||||
create mode 100644 src/json/schema/sandbox/create-request.json
|
||||
create mode 100644 src/json/schema/sandbox/create-response.json
|
||||
create mode 100644 src/json/schema/sandbox/metrics-request.json
|
||||
create mode 100644 src/json/schema/sandbox/metrics-response.json
|
||||
create mode 100644 src/json/schema/sandbox/platform-request.json
|
||||
create mode 100644 src/json/schema/sandbox/platform-response.json
|
||||
create mode 100644 src/json/schema/sandbox/sandbox.json
|
||||
create mode 100644 src/json/schema/sandbox/shutdown-request.json
|
||||
create mode 100644 src/json/schema/sandbox/start-request.json
|
||||
create mode 100644 src/json/schema/sandbox/start-response.json
|
||||
create mode 100644 src/json/schema/sandbox/status-request.json
|
||||
create mode 100644 src/json/schema/sandbox/status-response.json
|
||||
create mode 100644 src/json/schema/sandbox/stop-request.json
|
||||
create mode 100644 src/json/schema/sandbox/update-request.json
|
||||
create mode 100644 src/json/schema/sandbox/wait-request.json
|
||||
create mode 100644 src/json/schema/sandbox/wait-response.json
|
||||
|
||||
diff --git a/src/json/schema/defs.json b/src/json/schema/defs.json
|
||||
index 22683c2..854a816 100644
|
||||
--- a/src/json/schema/defs.json
|
||||
+++ b/src/json/schema/defs.json
|
||||
@@ -406,6 +406,22 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
+ "mapStringObjectByteArray": {
|
||||
+ "type": "object",
|
||||
+ "patternProperties": {
|
||||
+ ".{1,}": {
|
||||
+ "type": "object",
|
||||
+ "properties": {
|
||||
+ "Element": {
|
||||
+ "type": "array",
|
||||
+ "items": {
|
||||
+ "type": "byte"
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ },
|
||||
"digest": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9]+(?:[+._-][a-z0-9]+)*:[a-zA-Z0-9=_-]+$"
|
||||
diff --git a/src/json/schema/sandbox/create-request.json b/src/json/schema/sandbox/create-request.json
|
||||
new file mode 100644
|
||||
index 0000000..2e5a06d
|
||||
--- /dev/null
|
||||
+++ b/src/json/schema/sandbox/create-request.json
|
||||
@@ -0,0 +1,33 @@
|
||||
+{
|
||||
+ "$schema": "http://json-schema.org/draft-04/schema#",
|
||||
+ "type": "object",
|
||||
+ "properties": {
|
||||
+ "sandbox_id": {
|
||||
+ "type": "string"
|
||||
+ },
|
||||
+ "rootfs": {
|
||||
+ "type": "array",
|
||||
+ "items": {
|
||||
+ "$ref": "mount.json"
|
||||
+ }
|
||||
+ },
|
||||
+ "options": {
|
||||
+ "type": "array",
|
||||
+ "items": {
|
||||
+ "type": "byte"
|
||||
+ }
|
||||
+ },
|
||||
+ "netns_path": {
|
||||
+ "type": "string"
|
||||
+ },
|
||||
+ "annotations": {
|
||||
+ "$ref": "../defs.json#/definitions/mapStringString"
|
||||
+ },
|
||||
+ "sandbox":{
|
||||
+ "$ref": "sandbox.json"
|
||||
+ },
|
||||
+ "sandboxer": {
|
||||
+ "type": "string"
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/json/schema/sandbox/create-response.json b/src/json/schema/sandbox/create-response.json
|
||||
new file mode 100644
|
||||
index 0000000..54d0eae
|
||||
--- /dev/null
|
||||
+++ b/src/json/schema/sandbox/create-response.json
|
||||
@@ -0,0 +1,9 @@
|
||||
+{
|
||||
+ "$schema": "http://json-schema.org/draft-04/schema#",
|
||||
+ "type": "object",
|
||||
+ "properties": {
|
||||
+ "sandbox_id": {
|
||||
+ "type": "string"
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/json/schema/sandbox/metrics-request.json b/src/json/schema/sandbox/metrics-request.json
|
||||
new file mode 100644
|
||||
index 0000000..c54006b
|
||||
--- /dev/null
|
||||
+++ b/src/json/schema/sandbox/metrics-request.json
|
||||
@@ -0,0 +1,12 @@
|
||||
+{
|
||||
+ "$schema": "http://json-schema.org/draft-04/schema#",
|
||||
+ "type": "object",
|
||||
+ "properties": {
|
||||
+ "sandbox_id": {
|
||||
+ "type": "string"
|
||||
+ },
|
||||
+ "sandboxer": {
|
||||
+ "type": "string"
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/json/schema/sandbox/metrics-response.json b/src/json/schema/sandbox/metrics-response.json
|
||||
new file mode 100644
|
||||
index 0000000..b0a255d
|
||||
--- /dev/null
|
||||
+++ b/src/json/schema/sandbox/metrics-response.json
|
||||
@@ -0,0 +1,18 @@
|
||||
+{
|
||||
+ "$schema": "http://json-schema.org/draft-04/schema#",
|
||||
+ "type": "object",
|
||||
+ "properties": {
|
||||
+ "timestamp": {
|
||||
+ "type": "uint64"
|
||||
+ },
|
||||
+ "id": {
|
||||
+ "type": "string"
|
||||
+ },
|
||||
+ "data": {
|
||||
+ "type": "array",
|
||||
+ "items": {
|
||||
+ "type": "byte"
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/json/schema/sandbox/platform-request.json b/src/json/schema/sandbox/platform-request.json
|
||||
new file mode 100644
|
||||
index 0000000..c54006b
|
||||
--- /dev/null
|
||||
+++ b/src/json/schema/sandbox/platform-request.json
|
||||
@@ -0,0 +1,12 @@
|
||||
+{
|
||||
+ "$schema": "http://json-schema.org/draft-04/schema#",
|
||||
+ "type": "object",
|
||||
+ "properties": {
|
||||
+ "sandbox_id": {
|
||||
+ "type": "string"
|
||||
+ },
|
||||
+ "sandboxer": {
|
||||
+ "type": "string"
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/json/schema/sandbox/platform-response.json b/src/json/schema/sandbox/platform-response.json
|
||||
new file mode 100644
|
||||
index 0000000..c469d8d
|
||||
--- /dev/null
|
||||
+++ b/src/json/schema/sandbox/platform-response.json
|
||||
@@ -0,0 +1,15 @@
|
||||
+{
|
||||
+ "$schema": "http://json-schema.org/draft-04/schema#",
|
||||
+ "type": "object",
|
||||
+ "properties": {
|
||||
+ "os": {
|
||||
+ "type": "string"
|
||||
+ },
|
||||
+ "architecture": {
|
||||
+ "type": "string"
|
||||
+ },
|
||||
+ "variant": {
|
||||
+ "type": "string"
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/json/schema/sandbox/sandbox.json b/src/json/schema/sandbox/sandbox.json
|
||||
new file mode 100644
|
||||
index 0000000..786ac1f
|
||||
--- /dev/null
|
||||
+++ b/src/json/schema/sandbox/sandbox.json
|
||||
@@ -0,0 +1,44 @@
|
||||
+{
|
||||
+ "$schema": "http://json-schema.org/draft-04/schema#",
|
||||
+ "type": "object",
|
||||
+ "properties": {
|
||||
+ "sandbox_id": {
|
||||
+ "type": "string"
|
||||
+ },
|
||||
+ "runtime": {
|
||||
+ "type": "object",
|
||||
+ "properties": {
|
||||
+ "name": {
|
||||
+ "type": "string"
|
||||
+ },
|
||||
+ "options": {
|
||||
+ "type": "array",
|
||||
+ "items": {
|
||||
+ "type": "byte"
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ },
|
||||
+ "spec": {
|
||||
+ "type": "array",
|
||||
+ "items": {
|
||||
+ "type": "byte"
|
||||
+ }
|
||||
+ },
|
||||
+ "labels": {
|
||||
+ "$ref": "../defs.json#/definitions/mapStringString"
|
||||
+ },
|
||||
+ "created_at": {
|
||||
+ "type": "uint64"
|
||||
+ },
|
||||
+ "updated_at": {
|
||||
+ "type": "uint64"
|
||||
+ },
|
||||
+ "extensions": {
|
||||
+ "$ref": "../defs.json#/definitions/mapStringObjectByteArray"
|
||||
+ },
|
||||
+ "sandboxer": {
|
||||
+ "type": "string"
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/json/schema/sandbox/shutdown-request.json b/src/json/schema/sandbox/shutdown-request.json
|
||||
new file mode 100644
|
||||
index 0000000..c54006b
|
||||
--- /dev/null
|
||||
+++ b/src/json/schema/sandbox/shutdown-request.json
|
||||
@@ -0,0 +1,12 @@
|
||||
+{
|
||||
+ "$schema": "http://json-schema.org/draft-04/schema#",
|
||||
+ "type": "object",
|
||||
+ "properties": {
|
||||
+ "sandbox_id": {
|
||||
+ "type": "string"
|
||||
+ },
|
||||
+ "sandboxer": {
|
||||
+ "type": "string"
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/json/schema/sandbox/start-request.json b/src/json/schema/sandbox/start-request.json
|
||||
new file mode 100644
|
||||
index 0000000..c54006b
|
||||
--- /dev/null
|
||||
+++ b/src/json/schema/sandbox/start-request.json
|
||||
@@ -0,0 +1,12 @@
|
||||
+{
|
||||
+ "$schema": "http://json-schema.org/draft-04/schema#",
|
||||
+ "type": "object",
|
||||
+ "properties": {
|
||||
+ "sandbox_id": {
|
||||
+ "type": "string"
|
||||
+ },
|
||||
+ "sandboxer": {
|
||||
+ "type": "string"
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/json/schema/sandbox/start-response.json b/src/json/schema/sandbox/start-response.json
|
||||
new file mode 100644
|
||||
index 0000000..19d94de
|
||||
--- /dev/null
|
||||
+++ b/src/json/schema/sandbox/start-response.json
|
||||
@@ -0,0 +1,24 @@
|
||||
+{
|
||||
+ "$schema": "http://json-schema.org/draft-04/schema#",
|
||||
+ "type": "object",
|
||||
+ "properties": {
|
||||
+ "sandbox_id": {
|
||||
+ "type": "string"
|
||||
+ },
|
||||
+ "pid": {
|
||||
+ "type": "uint32"
|
||||
+ },
|
||||
+ "created_at": {
|
||||
+ "type": "uint64"
|
||||
+ },
|
||||
+ "labels": {
|
||||
+ "$ref": "../defs.json#/definitions/mapStringString"
|
||||
+ },
|
||||
+ "address": {
|
||||
+ "type": "string"
|
||||
+ },
|
||||
+ "version": {
|
||||
+ "type": "uint32"
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
\ No newline at end of file
|
||||
diff --git a/src/json/schema/sandbox/status-request.json b/src/json/schema/sandbox/status-request.json
|
||||
new file mode 100644
|
||||
index 0000000..023abe8
|
||||
--- /dev/null
|
||||
+++ b/src/json/schema/sandbox/status-request.json
|
||||
@@ -0,0 +1,15 @@
|
||||
+{
|
||||
+ "$schema": "http://json-schema.org/draft-04/schema#",
|
||||
+ "type": "object",
|
||||
+ "properties": {
|
||||
+ "sandbox_id": {
|
||||
+ "type": "string"
|
||||
+ },
|
||||
+ "verbose": {
|
||||
+ "type": "boolean"
|
||||
+ },
|
||||
+ "sandboxer": {
|
||||
+ "type": "string"
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/json/schema/sandbox/status-response.json b/src/json/schema/sandbox/status-response.json
|
||||
new file mode 100644
|
||||
index 0000000..779a35d
|
||||
--- /dev/null
|
||||
+++ b/src/json/schema/sandbox/status-response.json
|
||||
@@ -0,0 +1,36 @@
|
||||
+{
|
||||
+ "$schema": "http://json-schema.org/draft-04/schema#",
|
||||
+ "type": "object",
|
||||
+ "properties": {
|
||||
+ "sandbox_id": {
|
||||
+ "type": "string"
|
||||
+ },
|
||||
+ "pid": {
|
||||
+ "type": "uint32"
|
||||
+ },
|
||||
+ "state": {
|
||||
+ "type": "string"
|
||||
+ },
|
||||
+ "info": {
|
||||
+ "$ref": "../defs.json#/definitions/mapStringString"
|
||||
+ },
|
||||
+ "created_at": {
|
||||
+ "type": "uint64"
|
||||
+ },
|
||||
+ "exited_at": {
|
||||
+ "type": "uint64"
|
||||
+ },
|
||||
+ "extra": {
|
||||
+ "type": "array",
|
||||
+ "items": {
|
||||
+ "type": "byte"
|
||||
+ }
|
||||
+ },
|
||||
+ "address": {
|
||||
+ "type": "string"
|
||||
+ },
|
||||
+ "version": {
|
||||
+ "type": "uint32"
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/json/schema/sandbox/stop-request.json b/src/json/schema/sandbox/stop-request.json
|
||||
new file mode 100644
|
||||
index 0000000..ee7c8ac
|
||||
--- /dev/null
|
||||
+++ b/src/json/schema/sandbox/stop-request.json
|
||||
@@ -0,0 +1,15 @@
|
||||
+{
|
||||
+ "$schema": "http://json-schema.org/draft-04/schema#",
|
||||
+ "type": "object",
|
||||
+ "properties": {
|
||||
+ "sandbox_id": {
|
||||
+ "type": "string"
|
||||
+ },
|
||||
+ "timeout_secs": {
|
||||
+ "type": "uint32"
|
||||
+ },
|
||||
+ "sandboxer": {
|
||||
+ "type": "string"
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/json/schema/sandbox/update-request.json b/src/json/schema/sandbox/update-request.json
|
||||
new file mode 100644
|
||||
index 0000000..60c44a2
|
||||
--- /dev/null
|
||||
+++ b/src/json/schema/sandbox/update-request.json
|
||||
@@ -0,0 +1,21 @@
|
||||
+{
|
||||
+ "$schema": "http://json-schema.org/draft-04/schema#",
|
||||
+ "type": "object",
|
||||
+ "properties": {
|
||||
+ "sandbox_id": {
|
||||
+ "type": "string"
|
||||
+ },
|
||||
+ "sandboxer": {
|
||||
+ "type": "string"
|
||||
+ },
|
||||
+ "sandbox": {
|
||||
+ "$ref": "sandbox.json"
|
||||
+ },
|
||||
+ "fields": {
|
||||
+ "type": "array",
|
||||
+ "items": {
|
||||
+ "type": "string"
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/json/schema/sandbox/wait-request.json b/src/json/schema/sandbox/wait-request.json
|
||||
new file mode 100644
|
||||
index 0000000..3b77d39
|
||||
--- /dev/null
|
||||
+++ b/src/json/schema/sandbox/wait-request.json
|
||||
@@ -0,0 +1,12 @@
|
||||
+{
|
||||
+ "$schema": "http://json-schema.org/draft-04/schema#",
|
||||
+ "type": "object",
|
||||
+ "properties": {
|
||||
+ "sandbox_id": {
|
||||
+ "type": "string"
|
||||
+ },
|
||||
+ "sandboxer": {
|
||||
+ "type": "string"
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
\ No newline at end of file
|
||||
diff --git a/src/json/schema/sandbox/wait-response.json b/src/json/schema/sandbox/wait-response.json
|
||||
new file mode 100644
|
||||
index 0000000..49a42f1
|
||||
--- /dev/null
|
||||
+++ b/src/json/schema/sandbox/wait-response.json
|
||||
@@ -0,0 +1,15 @@
|
||||
+{
|
||||
+ "$schema": "http://json-schema.org/draft-04/schema#",
|
||||
+ "type": "object",
|
||||
+ "properties": {
|
||||
+ "sandbox_id": {
|
||||
+ "type": "string"
|
||||
+ },
|
||||
+ "exit_status": {
|
||||
+ "type": "uint32"
|
||||
+ },
|
||||
+ "exited_at": {
|
||||
+ "type": "uint64"
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
2.34.1
|
||||
|
||||
41
0023-add-no-pivot-root-config.patch
Normal file
41
0023-add-no-pivot-root-config.patch
Normal file
@ -0,0 +1,41 @@
|
||||
From 80037cd8257e5b5702c729953a6c9ef56b4354f4 Mon Sep 17 00:00:00 2001
|
||||
From: zhongtao <zhongtao17@huawei.com>
|
||||
Date: Wed, 6 Nov 2024 15:35:02 +0800
|
||||
Subject: [PATCH 23/25] add no pivot root config
|
||||
|
||||
Signed-off-by: zhongtao <zhongtao17@huawei.com>
|
||||
---
|
||||
src/json/schema/host-config.json | 3 +++
|
||||
src/json/schema/shim/client/process-state.json | 2 +-
|
||||
2 files changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/json/schema/host-config.json b/src/json/schema/host-config.json
|
||||
index a9679bd..f9e2d4c 100644
|
||||
--- a/src/json/schema/host-config.json
|
||||
+++ b/src/json/schema/host-config.json
|
||||
@@ -306,6 +306,9 @@
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
+ "NoPivotRoot": {
|
||||
+ "type": "boolean"
|
||||
+ },
|
||||
"CdiRequestedDevices": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
diff --git a/src/json/schema/shim/client/process-state.json b/src/json/schema/shim/client/process-state.json
|
||||
index bfa8416..f35ee6a 100644
|
||||
--- a/src/json/schema/shim/client/process-state.json
|
||||
+++ b/src/json/schema/shim/client/process-state.json
|
||||
@@ -188,7 +188,7 @@
|
||||
}
|
||||
},
|
||||
"noPivotRoot": {
|
||||
- "tyoe": "boolean"
|
||||
+ "type": "boolean"
|
||||
},
|
||||
"checkpoint": {
|
||||
"type": "string"
|
||||
--
|
||||
2.34.1
|
||||
|
||||
165
0024-Use-any-type-instead-of-bytearray.patch
Normal file
165
0024-Use-any-type-instead-of-bytearray.patch
Normal file
@ -0,0 +1,165 @@
|
||||
From d47d27c70b7bdb4f2d63d260daa05b20c85c4117 Mon Sep 17 00:00:00 2001
|
||||
From: xuxuepeng <xuxuepeng1@huawei.com>
|
||||
Date: Thu, 7 Nov 2024 14:46:01 +0800
|
||||
Subject: [PATCH 24/25] Use any type instead of bytearray
|
||||
|
||||
Signed-off-by: xuxuepeng <xuxuepeng1@huawei.com>
|
||||
---
|
||||
src/json/schema/defs.json | 35 +++++++++----------
|
||||
src/json/schema/sandbox/create-request.json | 5 +--
|
||||
src/json/schema/sandbox/metrics-response.json | 5 +--
|
||||
src/json/schema/sandbox/sandbox.json | 12 ++-----
|
||||
src/json/schema/sandbox/status-response.json | 5 +--
|
||||
5 files changed, 22 insertions(+), 40 deletions(-)
|
||||
|
||||
diff --git a/src/json/schema/defs.json b/src/json/schema/defs.json
|
||||
index 854a816..b313103 100644
|
||||
--- a/src/json/schema/defs.json
|
||||
+++ b/src/json/schema/defs.json
|
||||
@@ -226,6 +226,20 @@
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
+ "any": {
|
||||
+ "type": "object",
|
||||
+ "properties": {
|
||||
+ "type_url": {
|
||||
+ "type": "string"
|
||||
+ },
|
||||
+ "value": {
|
||||
+ "type": "array",
|
||||
+ "items": {
|
||||
+ "type": "byte"
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ },
|
||||
"mapStringString": {
|
||||
"type": "object",
|
||||
"patternProperties": {
|
||||
@@ -406,17 +420,14 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
- "mapStringObjectByteArray": {
|
||||
+ "mapStringObjectAny": {
|
||||
"type": "object",
|
||||
"patternProperties": {
|
||||
".{1,}": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Element": {
|
||||
- "type": "array",
|
||||
- "items": {
|
||||
- "type": "byte"
|
||||
- }
|
||||
+ "$ref": "#/definitions/any"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -498,20 +509,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
- "any": {
|
||||
- "type": "object",
|
||||
- "properties": {
|
||||
- "type_url": {
|
||||
- "type": "string"
|
||||
- },
|
||||
- "value": {
|
||||
- "type": "array",
|
||||
- "items": {
|
||||
- "type": "byte"
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- },
|
||||
"zone": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
diff --git a/src/json/schema/sandbox/create-request.json b/src/json/schema/sandbox/create-request.json
|
||||
index 2e5a06d..27accf6 100644
|
||||
--- a/src/json/schema/sandbox/create-request.json
|
||||
+++ b/src/json/schema/sandbox/create-request.json
|
||||
@@ -12,10 +12,7 @@
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
- "type": "array",
|
||||
- "items": {
|
||||
- "type": "byte"
|
||||
- }
|
||||
+ "$ref": "../defs.json#/definitions/any"
|
||||
},
|
||||
"netns_path": {
|
||||
"type": "string"
|
||||
diff --git a/src/json/schema/sandbox/metrics-response.json b/src/json/schema/sandbox/metrics-response.json
|
||||
index b0a255d..53afd1f 100644
|
||||
--- a/src/json/schema/sandbox/metrics-response.json
|
||||
+++ b/src/json/schema/sandbox/metrics-response.json
|
||||
@@ -9,10 +9,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"data": {
|
||||
- "type": "array",
|
||||
- "items": {
|
||||
- "type": "byte"
|
||||
- }
|
||||
+ "$ref": "../defs.json#/definitions/any"
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/src/json/schema/sandbox/sandbox.json b/src/json/schema/sandbox/sandbox.json
|
||||
index 786ac1f..9725a30 100644
|
||||
--- a/src/json/schema/sandbox/sandbox.json
|
||||
+++ b/src/json/schema/sandbox/sandbox.json
|
||||
@@ -12,18 +12,12 @@
|
||||
"type": "string"
|
||||
},
|
||||
"options": {
|
||||
- "type": "array",
|
||||
- "items": {
|
||||
- "type": "byte"
|
||||
- }
|
||||
+ "$ref": "../defs.json#/definitions/any"
|
||||
}
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
- "type": "array",
|
||||
- "items": {
|
||||
- "type": "byte"
|
||||
- }
|
||||
+ "$ref": "../defs.json#/definitions/any"
|
||||
},
|
||||
"labels": {
|
||||
"$ref": "../defs.json#/definitions/mapStringString"
|
||||
@@ -35,7 +29,7 @@
|
||||
"type": "uint64"
|
||||
},
|
||||
"extensions": {
|
||||
- "$ref": "../defs.json#/definitions/mapStringObjectByteArray"
|
||||
+ "$ref": "../defs.json#/definitions/mapStringObjectAny"
|
||||
},
|
||||
"sandboxer": {
|
||||
"type": "string"
|
||||
diff --git a/src/json/schema/sandbox/status-response.json b/src/json/schema/sandbox/status-response.json
|
||||
index 779a35d..efac831 100644
|
||||
--- a/src/json/schema/sandbox/status-response.json
|
||||
+++ b/src/json/schema/sandbox/status-response.json
|
||||
@@ -21,10 +21,7 @@
|
||||
"type": "uint64"
|
||||
},
|
||||
"extra": {
|
||||
- "type": "array",
|
||||
- "items": {
|
||||
- "type": "byte"
|
||||
- }
|
||||
+ "$ref": "../defs.json#/definitions/any"
|
||||
},
|
||||
"address": {
|
||||
"type": "string"
|
||||
--
|
||||
2.34.1
|
||||
|
||||
26
0025-fix-issues-Isula-ps-cannot-display-port-mapping.patch
Normal file
26
0025-fix-issues-Isula-ps-cannot-display-port-mapping.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From 8b481b47c915a495397f4a6f1cb04bf2518280b4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=E6=AD=A6=E7=A7=AF=E8=B6=85?= <wujichao1@huawei.com>
|
||||
Date: Thu, 7 Nov 2024 20:15:03 +0800
|
||||
Subject: [PATCH 25/25] fix issues: Isula ps cannot display port mapping
|
||||
|
||||
---
|
||||
src/json/schema/container/container.json | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/src/json/schema/container/container.json b/src/json/schema/container/container.json
|
||||
index 7d59826..05b27e9 100644
|
||||
--- a/src/json/schema/container/container.json
|
||||
+++ b/src/json/schema/container/container.json
|
||||
@@ -23,6 +23,9 @@
|
||||
"command": {
|
||||
"type": "string"
|
||||
},
|
||||
+ "ports": {
|
||||
+ "type": "string"
|
||||
+ },
|
||||
"ram": {
|
||||
"type": "double"
|
||||
},
|
||||
--
|
||||
2.34.1
|
||||
|
||||
13
lcr.spec
13
lcr.spec
@ -1,5 +1,5 @@
|
||||
%global _version 2.1.4
|
||||
%global _release 12
|
||||
%global _release 13
|
||||
%global _inner_name isula_libutils
|
||||
%global enable_lxc 1
|
||||
|
||||
@ -33,6 +33,11 @@ Patch0017: 0017-add-struct-for-nri.patch
|
||||
Patch0018: 0018-add-nri-def-in-host-config.patch
|
||||
Patch0019: 0019-fix-invalid-usage-of-arrtibute-visibility.patch
|
||||
Patch0020: 0020-unify-nri-variable-format.patch
|
||||
Patch0021: 0021-sandbox-sandbox-api-update.patch
|
||||
Patch0022: 0022-json-schema-for-sandbox-api.patch
|
||||
Patch0023: 0023-add-no-pivot-root-config.patch
|
||||
Patch0024: 0024-Use-any-type-instead-of-bytearray.patch
|
||||
Patch0025: 0025-fix-issues-Isula-ps-cannot-display-port-mapping.patch
|
||||
|
||||
%define lxcver_lower 4.0.3-2022102400
|
||||
%define lxcver_upper 5.0.3
|
||||
@ -154,6 +159,12 @@ rm -rf %{buildroot}
|
||||
%{_includedir}/lcr/utils_compile.h
|
||||
|
||||
%changelog
|
||||
* Mon Nov 25 2024 liuxu<liuxu156@huawei.com> - 2.1.4-13
|
||||
- Type:enhancement
|
||||
- CVE:NA
|
||||
- SUG:NA
|
||||
- DESC:sync from upstream
|
||||
|
||||
* Thu Oct 17 2024 wujichao<wujichao1@huawei.com> - 2.1.4-12
|
||||
- Type:enhancement
|
||||
- CVE:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user