Simplify PNF-DEMO CBA
[ccsdk/cds.git] / components / model-catalog / blueprint-model / service-blueprint / PNF_DEMO / Definitions / pnf_netconf.json
1 {
2   "tosca_definitions_version" : "controller_blueprint_1_0_0",
3   "metadata" : {
4     "template_author" : "Aarna Services",
5     "author_email" : "aarna_services@aarnanetworks.com",
6     "user_groups" : "ADMIN, OPERATION",
7     "template_name" : "pnf_netconf",
8     "template_version" : "1.0.0",
9     "template_tags" : "pnf_netconf",
10     "template_type" : "DEFAULT"
11   },
12   "imports" : [ {
13     "file" : "Definitions/data_types.json"
14   }, {
15     "file" : "Definitions/relationship_types.json"
16   }, {
17     "file" : "Definitions/artifact_types.json"
18   }, {
19     "file" : "Definitions/node_types.json"
20   }, {
21     "file" : "Definitions/policy_types.json"
22   } ],
23   "dsl_definitions" : {
24     "config-deploy-properties" : {
25       "resolution-key" : {
26         "get_input" : "resolution-key"
27       }
28     }
29   },
30   "topology_template" : {
31     "workflows" : {
32       "config-assign" : {
33         "steps" : {
34           "assign" : {
35             "description" : "Assign values to payload",
36             "target" : "resolve-data"
37           }
38         },
39         "inputs" : {
40           "resolution-key" : {
41             "required" : true,
42             "type" : "string"
43           },
44           "config-assign-properties" : {
45             "description" : "Dynamic PropertyDefinition for workflow(config-assign).",
46             "required" : true,
47             "type" : "dt-config-assign-properties"
48           }
49         },
50         "outputs" : {
51           "resolved-payload" : {
52             "type" : "string",
53             "value" : {
54               "get_attribute" : [ "resolve-data", "assignment-params" ]
55             }
56           }
57         }
58       },
59       "config-deploy" : {
60         "steps" : {
61           "deploy" : {
62             "description" : "deploy stored payload to pnf",
63             "target" : "execute-netconf"
64           }
65         },
66         "inputs" : {
67           "resolution-key" : {
68             "required" : true,
69             "type" : "string"
70           },
71           "netconf-password" : {
72             "required" : true,
73             "type" : "string"
74           },
75           "netconf-username" : {
76             "required" : true,
77             "type" : "string"
78           },
79           "pnf-ipv4-address" : {
80             "required" : true,
81             "type" : "string"
82           }
83         },
84         "outputs" : {
85           "pnf-response" : {
86             "type" : "string",
87             "value" : {
88               "get_attribute" : [ "execute-netconf", "response-data" ]
89             }
90           }
91         }
92       }
93     },
94     "node_templates" : {
95       "netconf-device" : {
96         "type" : "vnf-netconf-device",
97         "capabilities" : {
98           "netconf" : {
99             "properties" : {
100               "login-key" : {
101                 "get_input" : "netconf-password"
102               },
103               "login-account" : {
104                 "get_input" : "netconf-username"
105               },
106               "target-ip-address" : {
107                 "get_input" : "pnf-ipv4-address"
108               },
109               "port-number" : 830,
110               "connection-time-out" : 5
111             }
112           }
113         }
114       },
115       "resolve-data" : {
116         "type" : "component-resource-resolution",
117         "interfaces" : {
118           "ResourceResolutionComponent" : {
119             "operations" : {
120               "process" : {
121                 "inputs" : {
122                   "resolution-key" : {
123                     "get_input" : "resolution-key"
124                   },
125                   "store-result" : true,
126                   "artifact-prefix-names" : [ "netconfrpc" ]
127                 }
128               }
129             }
130           }
131         },
132         "artifacts" : {
133           "netconfrpc-template" : {
134             "type" : "artifact-template-velocity",
135             "file" : "Templates/netconfrpc-template.vtl"
136           },
137           "netconfrpc-mapping" : {
138             "type" : "artifact-mapping-resource",
139             "file" : "Templates/netconfrpc-mapping.json"
140           }
141         }
142       },
143       "execute-netconf" : {
144         "type" : "component-netconf-executor",
145         "requirements" : {
146           "netconf-connection" : {
147             "capability" : "netconf",
148             "node" : "netconf-device",
149             "relationship" : "tosca.relationships.ConnectsTo"
150           }
151         },
152         "interfaces" : {
153           "ComponentNetconfExecutor" : {
154             "operations" : {
155               "process" : {
156                 "inputs" : {
157                   "script-type" : "kotlin",
158                   "script-class-reference" : "org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.ConfigDeploy",
159                   "instance-dependencies" : [ ],
160                   "dynamic-properties" : "*config-deploy-properties"
161                 }
162               }
163             }
164           }
165         }
166       }
167     }
168   }
169 }