Fix: Run both sonar and clm scans in parallel
[ccsdk/cds.git] / components / model-catalog / proto-definition / proto / CommandExecutor.proto
index f488cc1..22aeacb 100644 (file)
@@ -10,14 +10,38 @@ message ExecutionInput {
     string correlationId = 2;
     // Optional Blueprint Information used to identify CBA content information in shared file structure environment.
     Identifiers identifiers = 3;
-    ScriptType scriptType = 4;
     // Actual Command to Execute in Scripting Environment
-    string command = 5;
-    int32 timeOut = 6;
+    string command = 4;
+    int32 timeOut = 5;
     // Extra Dynamic Properties for Command processing in JSON format
-    google.protobuf.Struct properties = 7;
+    google.protobuf.Struct properties = 6;
     // Request Time Stamp
+    google.protobuf.Timestamp timestamp = 7;
+    string subRequestId = 8;
+    string originatorId = 9;
+}
+
+// If a new version of blueprint (new UUID in DB) needs to be uploaded, then pass in the raw bytes data
+// properties should specify 'file_format' as either 'gzip' or 'zip'
+// TODO: archiveTYPE: should be enum {"CBA_ZIP", "CBA_GZIP"}
+message UploadBlueprintInput {
+    Identifiers identifiers = 1;
+    string requestId = 2;
+    string subRequestId = 3;
+    string originatorId = 4;
+    string correlationId = 5;
+    int32 timeOut = 6;
+    string archiveType = 7;
     google.protobuf.Timestamp timestamp = 8;
+    bytes binData = 9;
+}
+
+message UploadBlueprintOutput {
+   string requestId = 1;
+   string subRequestId = 2;
+   ResponseStatus status = 3;
+   google.protobuf.Timestamp timestamp = 4;
+   string payload = 5;
 }
 
 message PrepareEnvInput {
@@ -25,23 +49,27 @@ message PrepareEnvInput {
     string requestId = 2;
     // Optional Id used to correlate multiple requests so that it can identify previous request information.
     string correlationId = 3;
-    ScriptType scriptType = 4;
-    repeated string packages = 5;
-    int32 timeOut = 6;
-    google.protobuf.Struct properties = 7;
-    google.protobuf.Timestamp timestamp = 8;
+    repeated Packages packages = 4;
+    int32 timeOut = 5;
+    google.protobuf.Struct properties = 6;
+    google.protobuf.Timestamp timestamp = 7;
+    string subRequestId = 8;
+    string originatorId = 9;
 }
 
 message Identifiers {
     string blueprintName = 1;
     string blueprintVersion = 2;
+    string blueprintUUID = 3;
 }
 
 message ExecutionOutput {
     string requestId = 1;
-    string response = 2;
+    repeated string response = 2;
     ResponseStatus status = 3;
     google.protobuf.Timestamp timestamp = 4;
+    string payload = 5;
+    string errMsg = 6;
 }
 
 enum ResponseStatus {
@@ -49,14 +77,22 @@ enum ResponseStatus {
     FAILURE = 1;
 }
 
-enum ScriptType {
-    PYTHON = 0;
-    ANSIBLE = 1;
-    KOTLIN = 2;
-    SH = 3;
+message Packages {
+    PackageType type = 1;
+    repeated string package = 2;
+}
+
+enum PackageType {
+    pip = 0;
+    ansible_galaxy = 1;
+    utilities = 2;
 }
 
 service CommandExecutorService {
+    // rpc to upload the CBA
+    rpc uploadBlueprint (UploadBlueprintInput) returns (UploadBlueprintOutput);
+    // prepare Python environment
     rpc prepareEnv (PrepareEnvInput) returns (ExecutionOutput);
+    // execute the actual command.
     rpc executeCommand (ExecutionInput) returns (ExecutionOutput);
 }