summaryrefslogtreecommitdiffstats
path: root/schema
diff options
context:
space:
mode:
authorAndrew Christian <andrew.christian@nokia.com>2012-02-16 15:18:02 -0500
committerChris Craig <ext-chris.craig@nokia.com>2012-02-17 19:23:21 +0100
commit55db246f84514d42e211156c8e7fa28ff4d1b8d4 (patch)
tree2a3716276b992e3c21fc576c6855bc5cee741b53 /schema
parent7140c90c4c771f9e027b1922fea167ff102026a9 (diff)
Schema validation for remote socket protocol.
Change-Id: Ia4981187fb35edde82540042ff60688b8066f725 Reviewed-by: Chris Craig <ext-chris.craig@nokia.com>
Diffstat (limited to 'schema')
-rw-r--r--schema/remote/inbound/set.json19
-rw-r--r--schema/remote/inbound/start.json9
-rw-r--r--schema/remote/inbound/stop.json9
-rw-r--r--schema/remote/inbound/write.json13
-rw-r--r--schema/remote/outbound/error.json10
-rw-r--r--schema/remote/outbound/finished.json10
-rw-r--r--schema/remote/outbound/output.json10
-rw-r--r--schema/remote/outbound/started.json9
-rw-r--r--schema/remote/outbound/statechanged.json9
9 files changed, 98 insertions, 0 deletions
diff --git a/schema/remote/inbound/set.json b/schema/remote/inbound/set.json
new file mode 100644
index 0000000..da29b4e
--- /dev/null
+++ b/schema/remote/inbound/set.json
@@ -0,0 +1,19 @@
+{
+ "title": "Set schema",
+ "description": "The client would like to change a setting on an existing process",
+ "properties": {
+ "command": { "type": "string", "pattern": "set", "required": true },
+ "id": { "type": "integer", "required": true },
+
+ "key": {
+ "type": "string",
+ "enum": ["priority", "oomAdjustment"],
+ "required": true
+ },
+
+ "value": {
+ "type": "integer",
+ "required": true
+ }
+ }
+}
diff --git a/schema/remote/inbound/start.json b/schema/remote/inbound/start.json
new file mode 100644
index 0000000..378e171
--- /dev/null
+++ b/schema/remote/inbound/start.json
@@ -0,0 +1,9 @@
+{
+ "title": "Start schema",
+ "description": "The client request a new process to be started",
+ "properties": {
+ "command": { "type": "string", "pattern": "start", "required": true },
+ "id": { "type": "integer", "required": true },
+ "info": { "type": "object", "required": true }
+ }
+}
diff --git a/schema/remote/inbound/stop.json b/schema/remote/inbound/stop.json
new file mode 100644
index 0000000..7a9e6c3
--- /dev/null
+++ b/schema/remote/inbound/stop.json
@@ -0,0 +1,9 @@
+{
+ "title": "Stop schema",
+ "description": "The client request a process to be stopped",
+ "properties": {
+ "command": { "type": "string", "pattern": "stop", "required": true },
+ "id": { "type": "integer", "required": true },
+ "timeout": { "type": "integer", "required": true }
+ }
+}
diff --git a/schema/remote/inbound/write.json b/schema/remote/inbound/write.json
new file mode 100644
index 0000000..22e8595
--- /dev/null
+++ b/schema/remote/inbound/write.json
@@ -0,0 +1,13 @@
+{
+ "title": "Write schema",
+ "description": "The client is writing data to the stdin of an existing process",
+ "properties": {
+ "command": { "type": "string", "pattern": "write", "required": true },
+ "id": { "type": "integer", "required": true },
+
+ "data": {
+ "type": "string",
+ "required": true
+ }
+ }
+}
diff --git a/schema/remote/outbound/error.json b/schema/remote/outbound/error.json
new file mode 100644
index 0000000..1544070
--- /dev/null
+++ b/schema/remote/outbound/error.json
@@ -0,0 +1,10 @@
+{
+ "title": "Error schema",
+ "description": "Signal the client that a process has sent the error() signal",
+ "properties": {
+ "event": { "type": "string", "pattern": "error", "required": true },
+ "id": { "type": "integer", "required": true },
+ "error": { "type": "integer", "required": true },
+ "errorString": { "type": "string", "required": true }
+ }
+}
diff --git a/schema/remote/outbound/finished.json b/schema/remote/outbound/finished.json
new file mode 100644
index 0000000..4f53729
--- /dev/null
+++ b/schema/remote/outbound/finished.json
@@ -0,0 +1,10 @@
+{
+ "title": "Finished schema",
+ "description": "Signal the client that a process has sent the finished() signal",
+ "properties": {
+ "event": { "type": "string", "pattern": "finished", "required": true },
+ "id": { "type": "integer", "required": true },
+ "exitCode": { "type": "integer", "required": true },
+ "exitStatus": { "type": "integer", "required": true }
+ }
+}
diff --git a/schema/remote/outbound/output.json b/schema/remote/outbound/output.json
new file mode 100644
index 0000000..ee70cf2
--- /dev/null
+++ b/schema/remote/outbound/output.json
@@ -0,0 +1,10 @@
+{
+ "title": "Output schema",
+ "description": "Signal the client that a process has written data on stdout or stderr",
+ "properties": {
+ "event": { "type": "string", "pattern": "output", "required": true },
+ "id": { "type": "integer", "required": true },
+ "stdout": { "type": "string" },
+ "stderr": { "type": "string" }
+ }
+}
diff --git a/schema/remote/outbound/started.json b/schema/remote/outbound/started.json
new file mode 100644
index 0000000..cef861a
--- /dev/null
+++ b/schema/remote/outbound/started.json
@@ -0,0 +1,9 @@
+{
+ "title": "Started schema",
+ "description": "Signal the client that a process has sent the started() signal",
+ "properties": {
+ "event": { "type": "string", "pattern": "started", "required": true },
+ "id": { "type": "integer", "required": true },
+ "pid": { "type": "integer", "required": true }
+ }
+}
diff --git a/schema/remote/outbound/statechanged.json b/schema/remote/outbound/statechanged.json
new file mode 100644
index 0000000..acdddf8
--- /dev/null
+++ b/schema/remote/outbound/statechanged.json
@@ -0,0 +1,9 @@
+{
+ "title": "State Changed schema",
+ "description": "Signal the client that a process has sent the stateChanged() signal",
+ "properties": {
+ "event": { "type": "string", "pattern": "stateChanged", "required": true },
+ "id": { "type": "integer", "required": true },
+ "stateChanged": { "type": "integer", "required": true },
+ }
+}