aboutsummaryrefslogtreecommitdiffstats
path: root/components/model-catalog/proto-definition/proto/CommandExecutor.proto
blob: fd2d4f30597c1646a921dc226ee81041610bf167 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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 Id used to correlate multiple requests so that it can identify previous request information.
    string correlationId = 2;
    // Optional Blueprint Information used to identify CBA content information in shared file structure environment.
    Identifiers identifiers = 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;
    string requestId = 2;
    // Optional Id used to correlate multiple requests so that it can identify previous request information.
    string correlationId = 3;
    repeated Packages 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;
    repeated string response = 2;
    ResponseStatus status = 3;
    google.protobuf.Timestamp timestamp = 4;
}

enum ResponseStatus {
    SUCCESS = 0;
    FAILURE = 1;
}

message Packages {
    PackageType type = 1;
    repeated string package = 2;
}

enum PackageType {
    pip = 0;
    ansible_galaxy = 1;
}

service CommandExecutorService {
    rpc prepareEnv (PrepareEnvInput) returns (ExecutionOutput);
    rpc executeCommand (ExecutionInput) returns (ExecutionOutput);
}