48992bd72a9943862646c149a342c847927613fd
[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": {
31         "get_input": "input"
32       }
33     }
34   },
35   "topology_template": {
36     "workflows": {
37       "execute-remote-python": {
38         "steps": {
39           "execute-script": {
40             "description": "Execute Remote Python Script",
41             "target": "execute-remote-python",
42             "activities": [
43               {
44                 "call_operation": ""
45               }
46             ]
47           }
48         },
49         "inputs": {
50           "input": {
51             "required": false,
52             "type": "string"
53           }
54         },
55         "outputs": {
56           "prepare-environment-logs": {
57             "type": "string",
58             "value": {
59               "get_attribute": [
60                 "execute-remote-python",
61                 "prepare-environment-logs"
62               ]
63             }
64           },
65           "execute-command-logs": {
66             "type": "string",
67             "value": {
68               "get_attribute": [
69                 "execute-remote-python",
70                 "execute-command-logs"
71               ]
72             }
73           }
74         }
75       },
76       "execute-remote-ansible": {
77         "steps": {
78           "execute-script": {
79             "description": "Execute Remote Ansible Script",
80             "target": "execute-remote-ansible",
81             "activities": [
82               {
83                 "call_operation": ""
84               }
85             ]
86           }
87         },
88         "inputs": {},
89         "outputs": {
90           "prepare-environment-logs": {
91             "type": "string",
92             "value": {
93               "get_attribute": [
94                 "execute-remote-ansible",
95                 "prepare-environment-logs"
96               ]
97             }
98           },
99           "execute-command-logs": {
100             "type": "string",
101             "value": {
102               "get_attribute": [
103                 "execute-remote-ansible",
104                 "execute-command-logs"
105               ]
106             }
107           }
108         }
109       }
110     },
111     "node_templates": {
112       "execute-remote-python": {
113         "type": "component-remote-python-executor",
114         "interfaces": {
115           "ComponentRemotePythonExecutor": {
116             "operations": {
117               "process": {
118                 "implementation": {
119                   "primary": "component-script"
120                 },
121                 "inputs": {
122                   "command": "python SamplePython.py $input",
123                   "packages": [
124                     {
125                       "type": "pip",
126                       "package": [
127                         "pyaml"
128                       ]
129                     }
130                   ],
131                   "argument-properties": "*execute-argument-properties"
132                 }
133               }
134             }
135           }
136         },
137         "artifacts": {
138           "component-script": {
139             "type": "artifact-script-python",
140             "file": "Scripts/python/SamplePython.py"
141           }
142         }
143       },
144       "execute-remote-ansible": {
145         "type": "component-remote-python-executor",
146         "interfaces": {
147           "ComponentRemotePythonExecutor": {
148             "operations": {
149               "process": {
150                 "implementation": {
151                   "primary": "component-script"
152                 },
153                 "inputs": {
154                   "command": "ansible-playbook first.yaml",
155                   "packages": [
156                     {
157                       "type": "pip",
158                       "package": [
159                         "requirements.txt"
160                       ]
161                     },
162                     {
163                       "type": "ansible_galaxy",
164                       "package": [
165                         "juniper.junos"
166                       ]
167                     }
168                   ]
169                 }
170               }
171             }
172           }
173         },
174         "artifacts": {
175           "component-script": {
176             "type": "artifact-script-ansible",
177             "file": "Scripts/ansible/first.yaml"
178           }
179         }
180       }
181     }
182   }
183 }