4c3ece3811182bc3fe7239c54e8d26ef6d43f57f
[ccsdk/cds.git] /
1 {
2   "tosca_definitions_version": "controller_blueprint_1_0_0",
3   "metadata": {
4     "template_author": "Brinda Santh Muthuramalingam",
5     "author-email": "brindasanth@in.ibm.com",
6     "user-groups": "ADMIN, OPERATION",
7     "template_name": "remote_scripts",
8     "template_version": "1.0.0",
9     "template_tags": "brinda, tosca"
10   },
11   "imports": [
12     {
13       "file": "Definitions/data_types.json"
14     },
15     {
16       "file": "Definitions/relationship_types.json"
17     },
18     {
19       "file": "Definitions/artifact_types.json"
20     },
21     {
22       "file": "Definitions/node_types.json"
23     },
24     {
25       "file": "Definitions/policy_types.json"
26     }
27   ],
28   "dsl_definitions": {
29     "execute-argument-properties": {
30       "input": "data"
31     },
32     "remote-argument-properties": {
33       "arg-0": "-a",
34       "arg-1": "sample-data 1",
35       "arg-4": "sample-data 4",
36       "arg-3": "sample-data 3",
37       "arg-2": "-b"
38     }
39   },
40   "topology_template": {
41     "workflows": {
42       "execute-remote-python": {
43         "steps": {
44           "execute-script": {
45             "description": "Execute Remote Python Script",
46             "target": "execute-remote-python",
47             "activities": [
48               {
49                 "call_operation": ""
50               }
51             ]
52           }
53         },
54         "inputs": {
55           "input": {
56             "required": false,
57             "type": "string"
58           }
59         },
60         "outputs": {
61           "prepare-environment-logs": {
62             "type": "string",
63             "value": {
64               "get_attribute": [
65                 "execute-remote-python",
66                 "prepare-environment-logs"
67               ]
68             }
69           },
70           "execute-command-logs": {
71             "type": "string",
72             "value": {
73               "get_attribute": [
74                 "execute-remote-python",
75                 "execute-command-logs"
76               ]
77             }
78           }
79         }
80       },
81       "execute-remote-ansible": {
82         "steps": {
83           "execute-script": {
84             "description": "Execute Remote Ansible Script",
85             "target": "execute-remote-ansible",
86             "activities": [
87               {
88                 "call_operation": ""
89               }
90             ]
91           }
92         },
93         "inputs": {},
94         "outputs": {
95           "prepare-environment-logs": {
96             "type": "string",
97             "value": {
98               "get_attribute": [
99                 "execute-remote-ansible",
100                 "prepare-environment-logs"
101               ]
102             }
103           },
104           "execute-command-logs": {
105             "type": "string",
106             "value": {
107               "get_attribute": [
108                 "execute-remote-ansible",
109                 "execute-command-logs"
110               ]
111             }
112           }
113         }
114       }
115     },
116     "node_templates": {
117       "execute-remote-python": {
118         "type": "component-remote-python-executor",
119         "interfaces": {
120           "ComponentRemotePythonExecutor": {
121             "operations": {
122               "process": {
123                 "implementation": {
124                   "primary": "component-script"
125                 },
126                 "inputs": {
127                   "command": "python SamplePython.py",
128                   "packages": [
129                     {
130                       "type": "pip",
131                       "package": [
132                         "pyaml"
133                       ]
134                     }
135                   ],
136                   "argument-properties": "*remote-argument-properties",
137                   "dynamic-properties": "*execute-argument-properties"
138                 }
139               }
140             }
141           }
142         },
143         "artifacts": {
144           "component-script": {
145             "type": "artifact-script-python",
146             "file": "Scripts/python/SamplePython.py"
147           }
148         }
149       },
150       "execute-remote-ansible": {
151         "type": "component-remote-python-executor",
152         "interfaces": {
153           "ComponentRemotePythonExecutor": {
154             "operations": {
155               "process": {
156                 "implementation": {
157                   "primary": "component-script"
158                 },
159                 "inputs": {
160                   "command": "ansible-playbook first.yaml",
161                   "packages": [
162                     {
163                       "type": "pip",
164                       "package": [
165                         "requirements.txt"
166                       ]
167                     },
168                     {
169                       "type": "ansible_galaxy",
170                       "package": [
171                         "juniper.junos"
172                       ]
173                     }
174                   ]
175                 }
176               }
177             }
178           }
179         },
180         "artifacts": {
181           "component-script": {
182             "type": "artifact-script-ansible",
183             "file": "Scripts/ansible/first.yaml"
184           }
185         }
186       }
187     }
188   }
189 }