aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrinda Santh <brindasanth@in.ibm.com>2019-04-10 11:29:43 -0400
committerAlexis de Talhouƫt <adetalhouet89@gmail.com>2019-04-16 10:38:50 -0400
commit36912896599b4275960a0278f60857203bb41620 (patch)
treeb86d6af345a3c335ee86660a0c81218f272ae7cc
parentae9dbbcb771b824d03ec7efb896a918a4f520536 (diff)
Add command executor proto
Change-Id: I54bad33968131042118a028433d4fb1543289fd4 Issue-ID: CCSDK-1214 Signed-off-by: Brinda Santh <brindasanth@in.ibm.com>
-rw-r--r--components/model-catalog/proto-definition/proto/CommandExecutor.proto59
1 files changed, 59 insertions, 0 deletions
diff --git a/components/model-catalog/proto-definition/proto/CommandExecutor.proto b/components/model-catalog/proto-definition/proto/CommandExecutor.proto
new file mode 100644
index 000000000..e95e55521
--- /dev/null
+++ b/components/model-catalog/proto-definition/proto/CommandExecutor.proto
@@ -0,0 +1,59 @@
+syntax = "proto3";
+import "google/protobuf/struct.proto";
+import "google/protobuf/timestamp.proto";
+option java_multiple_files = true;
+package org.onap.ccsdk.cds.controllerblueprints.command.api;
+
+message ExecutionInput {
+ string requestId = 1;
+ // Optional Blueprint Information used to identify CBA content information in shared file structure environment.
+ Identifiers identifiers = 2;
+ ScriptType scriptType = 3;
+ // Actual Command to Execute in Scripting Environment
+ string command = 4;
+ int32 timeOut = 5;
+ // Extra Dynamic Properties for Command processing in JSON format
+ google.protobuf.Struct properties = 6;
+ // Request Time Stamp
+ google.protobuf.Timestamp timestamp = 7;
+}
+
+message PrepareEnvInput {
+ Identifiers identifiers = 1;
+ // Optional Id used to correlate multiple requests so that it can identify previous request information.
+ string correlationId = 2;
+ ScriptType scriptType = 3;
+ repeated string packages = 4;
+ int32 timeOut = 5;
+ google.protobuf.Struct properties = 6;
+ google.protobuf.Timestamp timestamp = 7;
+}
+
+message Identifiers {
+ string blueprintName = 1;
+ string blueprintVersion = 2;
+}
+
+message ExecutionOutput {
+ string requestId = 1;
+ string response = 2;
+ ResponseStatus status = 3;
+ google.protobuf.Timestamp timestamp = 4;
+}
+
+enum ResponseStatus {
+ SUCCESS = 0;
+ FAILURE = 1;
+}
+
+enum ScriptType {
+ PYTHON = 0;
+ ANSIBLE = 1;
+ KOTLIN = 2;
+ SH = 3;
+}
+
+service CommandExecutorService {
+ rpc prepareEnv (PrepareEnvInput) returns (ExecutionOutput);
+ rpc executeCommand (ExecutionInput) returns (ExecutionOutput);
+}