summaryrefslogtreecommitdiffstats
path: root/components/model-catalog/blueprint-model
diff options
context:
space:
mode:
Diffstat (limited to 'components/model-catalog/blueprint-model')
-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.json13
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/remote_scripts.json66
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Environments/requirements.txt1
4 files changed, 64 insertions, 18 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..e5b8b3062 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"
}
},
@@ -30,6 +34,11 @@
"required": false,
"type": "json"
},
+ "argument-properties": {
+ "description": "Argument Json Content or DSL Json reference.",
+ "required": false,
+ "type": "json"
+ },
"command": {
"description": "Command to execute.",
"required": true,
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..48992bd72 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
@@ -25,6 +25,13 @@
"file": "Definitions/policy_types.json"
}
],
+ "dsl_definitions": {
+ "execute-argument-properties": {
+ "input": {
+ "get_input": "input"
+ }
+ }
+ },
"topology_template": {
"workflows": {
"execute-remote-python": {
@@ -39,14 +46,28 @@
]
}
},
- "inputs": {},
+ "inputs": {
+ "input": {
+ "required": false,
+ "type": "string"
+ }
+ },
"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 +87,21 @@
},
"inputs": {},
"outputs": {
- "logs": {
- "type": "json",
+ "prepare-environment-logs": {
+ "type": "string",
"value": {
"get_attribute": [
"execute-remote-ansible",
- "execution-logs"
+ "prepare-environment-logs"
+ ]
+ }
+ },
+ "execute-command-logs": {
+ "type": "string",
+ "value": {
+ "get_attribute": [
+ "execute-remote-ansible",
+ "execute-command-logs"
]
}
}
@@ -86,13 +116,19 @@
"operations": {
"process": {
"implementation": {
- "primary": "component-script",
- "dependencies": [
- "pyaml"
- ]
+ "primary": "component-script"
},
"inputs": {
- "command": "python SamplePython.py blah"
+ "command": "python SamplePython.py $input",
+ "packages": [
+ {
+ "type": "pip",
+ "package": [
+ "pyaml"
+ ]
+ }
+ ],
+ "argument-properties": "*execute-argument-properties"
}
}
}
@@ -118,13 +154,13 @@
"command": "ansible-playbook first.yaml",
"packages": [
{
- "type": "PYTHON",
+ "type": "pip",
"package": [
- "ansible"
+ "requirements.txt"
]
},
{
- "type": "ANSIBLE",
+ "type": "ansible_galaxy",
"package": [
"juniper.junos"
]
diff --git a/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Environments/requirements.txt b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Environments/requirements.txt
new file mode 100644
index 000000000..cabb1f519
--- /dev/null
+++ b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Environments/requirements.txt
@@ -0,0 +1 @@
+ansible \ No newline at end of file