80ef02f4fa0123d36bd57b6ca837150cf7166474
[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           "logs": {
45             "type": "json",
46             "value": {
47               "get_attribute": [
48                 "execute-remote-python",
49                 "execution-logs"
50               ]
51             }
52           }
53         }
54       },
55       "execute-remote-ansible": {
56         "steps": {
57           "execute-script": {
58             "description": "Execute Remote Ansible Script",
59             "target": "execute-remote-ansible",
60             "activities": [
61               {
62                 "call_operation": ""
63               }
64             ]
65           }
66         },
67         "inputs": {},
68         "outputs": {
69           "logs": {
70             "type": "json",
71             "value": {
72               "get_attribute": [
73                 "execute-remote-ansible",
74                 "execution-logs"
75               ]
76             }
77           }
78         }
79       }
80     },
81     "node_templates": {
82       "execute-remote-python": {
83         "type": "component-remote-python-executor",
84         "interfaces": {
85           "ComponentRemotePythonExecutor": {
86             "operations": {
87               "process": {
88                 "implementation": {
89                   "primary": "component-script",
90                   "dependencies": [
91                     "pyaml"
92                   ]
93                 },
94                 "inputs": {
95                   "command": "python SamplePython.py blah"
96                 }
97               }
98             }
99           }
100         },
101         "artifacts": {
102           "component-script": {
103             "type": "artifact-script-python",
104             "file": "Scripts/python/SamplePython.py"
105           }
106         }
107       },
108       "execute-remote-ansible": {
109         "type": "component-remote-python-executor",
110         "interfaces": {
111           "ComponentRemotePythonExecutor": {
112             "operations": {
113               "process": {
114                 "implementation": {
115                   "primary": "component-script"
116                 },
117                 "inputs": {
118                   "command": "ansible-playbook first.yaml",
119                   "packages": [
120                     {
121                       "type": "PYTHON",
122                       "package": [
123                         "ansible"
124                       ]
125                     },
126                     {
127                       "type": "ANSIBLE",
128                       "package": [
129                         "juniper.junos"
130                       ]
131                     }
132                   ]
133                 }
134               }
135             }
136           }
137         },
138         "artifacts": {
139           "component-script": {
140             "type": "artifact-script-ansible",
141             "file": "Scripts/ansible/first.yaml"
142           }
143         }
144       }
145     }
146   }
147 }