aboutsummaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/data_types.json2
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/node_types.json8
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/remote_scripts.json49
-rw-r--r--components/model-catalog/definition-type/starter-type/data_type/dt-system-packages.json4
-rw-r--r--components/model-catalog/definition-type/starter-type/node_type/component-remote-python-executor.json8
-rw-r--r--components/model-catalog/proto-definition/proto/CommandExecutor.proto4
-rw-r--r--components/model-catalog/proto-definition/proto/README11
7 files changed, 58 insertions, 28 deletions
diff --git a/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/data_types.json b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/data_types.json
index df594ab9e..25efb3656 100644
--- a/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/data_types.json
+++ b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/data_types.json
@@ -10,7 +10,7 @@
"constraints": [
{
"valid_values": [
- "ANSIBLE", "PYTHON"
+ "ansible_galaxy", "pip"
]
}
]
diff --git a/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/node_types.json b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/node_types.json
index 0ee00b3ba..640a4ebee 100644
--- a/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/node_types.json
+++ b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/node_types.json
@@ -4,8 +4,12 @@
"description": "This is Remote Python Execution Component.",
"version": "1.0.0",
"attributes": {
- "execution-logs": {
- "required": true,
+ "prepare-environment-logs": {
+ "required": false,
+ "type": "string"
+ },
+ "execute-command-logs": {
+ "required": false,
"type": "string"
}
},
diff --git a/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/remote_scripts.json b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/remote_scripts.json
index 80ef02f4f..da09e4f39 100644
--- a/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/remote_scripts.json
+++ b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/remote_scripts.json
@@ -41,12 +41,21 @@
},
"inputs": {},
"outputs": {
- "logs": {
- "type": "json",
+ "prepare-environment-logs": {
+ "type": "string",
"value": {
"get_attribute": [
"execute-remote-python",
- "execution-logs"
+ "prepare-environment-logs"
+ ]
+ }
+ },
+ "execute-command-logs": {
+ "type": "string",
+ "value": {
+ "get_attribute": [
+ "execute-remote-python",
+ "execute-command-logs"
]
}
}
@@ -66,12 +75,21 @@
},
"inputs": {},
"outputs": {
- "logs": {
- "type": "json",
+ "prepare-environment-logs": {
+ "type": "string",
+ "value": {
+ "get_attribute": [
+ "execute-remote-ansible",
+ "prepare-environment-logs"
+ ]
+ }
+ },
+ "execute-command-logs": {
+ "type": "string",
"value": {
"get_attribute": [
"execute-remote-ansible",
- "execution-logs"
+ "execute-command-logs"
]
}
}
@@ -86,13 +104,18 @@
"operations": {
"process": {
"implementation": {
- "primary": "component-script",
- "dependencies": [
- "pyaml"
- ]
+ "primary": "component-script"
},
"inputs": {
- "command": "python SamplePython.py blah"
+ "command": "python SamplePython.py blah",
+ "packages": [
+ {
+ "type": "pip",
+ "package": [
+ "pyaml"
+ ]
+ }
+ ]
}
}
}
@@ -118,13 +141,13 @@
"command": "ansible-playbook first.yaml",
"packages": [
{
- "type": "PYTHON",
+ "type": "pip",
"package": [
"ansible"
]
},
{
- "type": "ANSIBLE",
+ "type": "ansible_galaxy",
"package": [
"juniper.junos"
]
diff --git a/components/model-catalog/definition-type/starter-type/data_type/dt-system-packages.json b/components/model-catalog/definition-type/starter-type/data_type/dt-system-packages.json
index 81bb030b4..e70aa5ec8 100644
--- a/components/model-catalog/definition-type/starter-type/data_type/dt-system-packages.json
+++ b/components/model-catalog/definition-type/starter-type/data_type/dt-system-packages.json
@@ -8,8 +8,8 @@
"constraints": [
{
"valid_values": [
- "ANSIBLE",
- "PYTHON"
+ "ansible_galaxy",
+ "pip"
]
}
]
diff --git a/components/model-catalog/definition-type/starter-type/node_type/component-remote-python-executor.json b/components/model-catalog/definition-type/starter-type/node_type/component-remote-python-executor.json
index 3eaee761f..5c9503fc3 100644
--- a/components/model-catalog/definition-type/starter-type/node_type/component-remote-python-executor.json
+++ b/components/model-catalog/definition-type/starter-type/node_type/component-remote-python-executor.json
@@ -2,8 +2,12 @@
"description": "This is Remote Python Execution Component.",
"version": "1.0.0",
"attributes": {
- "execution-logs": {
- "required": true,
+ "prepare-environment-logs": {
+ "required": false,
+ "type": "string"
+ },
+ "execute-command-logs": {
+ "required": false,
"type": "string"
}
},
diff --git a/components/model-catalog/proto-definition/proto/CommandExecutor.proto b/components/model-catalog/proto-definition/proto/CommandExecutor.proto
index 8f02b8aea..bc175dbc1 100644
--- a/components/model-catalog/proto-definition/proto/CommandExecutor.proto
+++ b/components/model-catalog/proto-definition/proto/CommandExecutor.proto
@@ -53,8 +53,8 @@ message Packages {
}
enum PackageType {
- PYTHON = 0;
- ANSIBLE = 1;
+ pip = 0;
+ ansible_galaxy = 1;
}
service CommandExecutorService {
diff --git a/components/model-catalog/proto-definition/proto/README b/components/model-catalog/proto-definition/proto/README
index 47bbf3f34..8cc9c485f 100644
--- a/components/model-catalog/proto-definition/proto/README
+++ b/components/model-catalog/proto-definition/proto/README
@@ -2,11 +2,10 @@ To create python bindings,
Prerequisites:
https://developers.google.com/protocol-buffers/docs/downloads
- https://github.com/dropbox/mypy-protobuf
-
+ or
+ https://grpc.io/docs/quickstart/python.html
Command:
- protoc -I=. --python_out=. --mypy_out=. CommandExecutor.proto
-
-
-
+ protoc -I=. --python_out=. --grpc_python_out=. CommandExecutor.proto
+ or
+ python -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. CommandExecutor.proto