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