e73f96dedc204c953f3e1d2a314f3f6ddeb1306f
[ccsdk/cds.git] /
1 {
2   "tosca_definitions_version": "controller_blueprint_1_0_0",
3   "metadata": {
4     "template_author": "Brinda Santh",
5     "author-email": "brindasanth@in.ibm.com",
6     "user-groups": "ADMIN, OPERATION",
7     "template_name": "capability-cli",
8     "template_version": "1.0.0",
9     "template_tags": "capability-cli-blueprint",
10     "template_type": "DEFAULT"
11   },
12   "imports": [
13     {
14       "file": "Definitions/data_types.json"
15     },
16     {
17       "file": "Definitions/relationship_types.json"
18     },
19     {
20       "file": "Definitions/artifact_types.json"
21     },
22     {
23       "file": "Definitions/node_types.json"
24     },
25     {
26       "file": "Definitions/policy_types.json"
27     }
28   ],
29   "dsl_definitions": {
30     "config-deploy-properties": {
31       "resolution-key": {
32         "get_input": "resolution-key"
33       }
34     },
35     "device-properties": {
36       "type": "basic-auth",
37       "host": {
38         "get_input": "hostname"
39       },
40       "username": {
41         "get_input": "username"
42       },
43       "password": {
44         "get_input": "password"
45       }
46     }
47   },
48   "topology_template": {
49     "workflows": {
50       "check": {
51         "steps": {
52           "activate-process": {
53             "description": "Check CLI",
54             "target": "check",
55             "activities": [
56               {
57                 "call_operation": "ComponentScriptExecutor.process"
58               }
59             ]
60           }
61         },
62         "inputs": {
63           "hostname": {
64             "required": true,
65             "type": "string"
66           },
67           "username": {
68             "required": true,
69             "type": "string"
70           },
71           "password": {
72             "required": true,
73             "type": "string"
74           },
75           "data": {
76             "required": true,
77             "type": "json"
78           }
79         }
80       }
81     },
82     "node_templates": {
83       "check": {
84         "type": "component-script-executor",
85         "interfaces": {
86           "ComponentScriptExecutor": {
87             "operations": {
88               "process": {
89                 "implementation": {
90                   "primary": "component-script",
91                   "timeout": 180,
92                   "operation_host": "SELF"
93                 },
94                 "inputs": {
95                   "script-type": "kotlin",
96                   "script-class-reference": "cba.capability.cli.Check"
97                 },
98                 "outputs": {
99                   "response-data": "",
100                   "status": "success"
101                 }
102               }
103             }
104           }
105         },
106         "artifacts": {
107           "command-template": {
108             "type": "artifact-template-velocity",
109             "file": "Templates/check-command-template.vtl"
110           }
111         }
112       }
113     },
114     "relationship_templates": {
115       "ssh-connection-config": {
116         "type": "tosca.relationships.ConnectsTo.SshClient",
117         "description": "Device connection config",
118         "properties": {
119           "connection-config": {
120             "password": {
121               "get_input": "password"
122             },
123             "host": {
124               "get_input": "hostname"
125             },
126             "type": "basic-auth",
127             "username": {
128               "get_input": "username"
129             }
130           }
131         }
132       }
133     }
134   }
135 }