From cc96f30a504aa32030eafefdba69d635869c7949 Mon Sep 17 00:00:00 2001 From: Alexis de Talhouët Date: Thu, 18 Apr 2019 16:27:20 -0400 Subject: Add support for Ansible packages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - rework how to provide packages - support proxy as parameters Change-Id: I1d10d921ead0837aa0f74b965cadf985424ceedc Issue-ID: CCCSDK-1215 Signed-off-by: Alexis de Talhouët --- .../proto-definition/proto/CommandExecutor.proto | 27 +++++++++++----------- .../model-catalog/proto-definition/proto/README | 12 ++++++++++ 2 files changed, 26 insertions(+), 13 deletions(-) create mode 100644 components/model-catalog/proto-definition/proto/README (limited to 'components/model-catalog/proto-definition/proto') diff --git a/components/model-catalog/proto-definition/proto/CommandExecutor.proto b/components/model-catalog/proto-definition/proto/CommandExecutor.proto index f488cc1b4..8f02b8aea 100644 --- a/components/model-catalog/proto-definition/proto/CommandExecutor.proto +++ b/components/model-catalog/proto-definition/proto/CommandExecutor.proto @@ -10,14 +10,13 @@ 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 = 8; + google.protobuf.Timestamp timestamp = 7; } message PrepareEnvInput { @@ -25,11 +24,10 @@ 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; } message Identifiers { @@ -49,11 +47,14 @@ enum ResponseStatus { FAILURE = 1; } -enum ScriptType { +message Packages { + PackageType type = 1; + repeated string package = 2; +} + +enum PackageType { PYTHON = 0; ANSIBLE = 1; - KOTLIN = 2; - SH = 3; } service CommandExecutorService { diff --git a/components/model-catalog/proto-definition/proto/README b/components/model-catalog/proto-definition/proto/README new file mode 100644 index 000000000..47bbf3f34 --- /dev/null +++ b/components/model-catalog/proto-definition/proto/README @@ -0,0 +1,12 @@ +To create python bindings, + +Prerequisites: + https://developers.google.com/protocol-buffers/docs/downloads + https://github.com/dropbox/mypy-protobuf + + +Command: + protoc -I=. --python_out=. --mypy_out=. CommandExecutor.proto + + + -- cgit 1.2.3-korg