034a6b063fc4017946e5421fb89d41ea8edd4924
[ccsdk/cds.git] / docs / modelingconcepts / node-type.rst
1 .. This work is a derivative of https://wiki.onap.org/display/DW/Modeling+Concepts#Concepts-703799064
2 .. This work is licensed under a Creative Commons Attribution 4.0
3 .. International License. http://creativecommons.org/licenses/by/4.0
4 .. Copyright (C) 2020 Deutsche Telekom AG.
5
6 .. _node_type:
7
8 Node type
9 ---------
10
11 `TOSCA definition
12 <http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.2/csd01/TOSCA-Simple-Profile-YAML-v1.2-csd01.html#_Toc494454215>`_
13
14 In CDS, we have mainly two distinct types: components and source. We have some other type as well,
15 listed in the other section.
16
17 .. tabs::
18
19    .. tab:: Component
20
21       **Component:**
22
23       Used to represent a **functionality** along with its **contract**, such as **inputs**, **ouputs**, and **attributes**
24
25       `Here <https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.Component.json>`_
26       is the root component TOSCA node type from which other node type will derive:
27
28       .. code-block:: json
29          :caption: **tosca.nodes.Component**
30
31          {
32            "description": "This is default Component Node",
33            "version": "1.0.0",
34            "derived_from": "tosca.nodes.Root"
35          }
36
37       **Bellow is a list of supported components**
38
39       .. tabs::
40
41          .. tab:: resource-resolution
42
43             **component-resource-resolution:**
44
45             Used to perform resolution of **resources**.
46
47             Requires as many as artifact-mapping-resource (see :ref:`artifact_type` -> Mapping) AND
48             artifact-template-velocity (see :ref:`artifact_type` -> Jinja) as needed.
49
50             **Output result:**
51
52             Will put the resolution result as an **attribute** in the workflow context called **assignment-params**.
53
54             Using the :ref:`undefined <get_attribute expression>`, this attribute can be retrieve to be
55             provided as workflow output (see :ref:`workflow`).
56
57             **Specify which template to resolve:**
58
59             Currently, resolution is bounded to a template. To specify which template to use, you
60             need to fill in the `artifact-prefix-names` field.
61
62             See :ref:`template` to understand what the artifact prefix name is.
63
64             **Storing the result:**
65
66             To store each resource being resolved, along with their status, and the resolved template, `store-result` should be set to `true`.
67
68             Also, when storing the data, it must be in the context of either a `resource-id` and `resource-type`, or based on a given `resolution-key`
69
70
71             The concept of resource-id / resource-type, or resolution-key, is to uniquely identify a specific resolution that
72             has been performed for a given action. Hence the resolution-key has to be unique for a given blueprint name, blueprint version, action name.
73
74             Through the combination of the fields mentioned previously, one could retrieved what has been resolved. This is useful to manage the life-cycle of the resolved resource, the life-cycle of the template, along with sharing with external systems the outcome of a given resolution.
75
76             The resource-id / resource-type combo is more geared to uniquely identify a resource in AAI, or external system. For example, for a given AAI resource, say a PNF, you can trigger a given CDS action, and then you will be able to manage all the resolved resources bound to this PNF. Even we could have a history of what has been assigned, unassigned for this given AAI resource.
77
78             .. warning:: Important not to confuse and AAI resource (e.g. a topology element,
79                          or service related element) with the resources resolved by CDS, which can be seen
80                          as parameters required to derived a network configuration.
81
82             **Run the resolution multiple time:**
83
84             If you need to run the same resolution component multiple times, use the field `occurence`.
85             This will add the notion of occurrence to the resolution, and if storing the results, resources
86             and templates, they will be accessible for each occurrence.
87
88             Occurrence is a number between 1 and N; when retrieving information
89             for a given occurrence, the first iteration starts at 1.
90
91             This feature is useful when you need to apply the same configuration accross network elements.
92
93             `Here <https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/node_type/component-resource-resolution.json>`_
94             is the definition:
95
96             .. code-block:: json
97               :caption: **component-resource-resolution**
98
99               {
100                 "description": "This is Resource Assignment Component API",
101                 "version": "1.0.0",
102                 "attributes": {
103                   "assignment-params": {
104                     "required": true,
105                     "type": "string"
106                   }
107                 },
108                 "capabilities": {
109                   "component-node": {
110                     "type": "tosca.capabilities.Node"
111                   }
112                 },
113                 "interfaces": {
114                   "ResourceResolutionComponent": {
115                     "operations": {
116                       "process": {
117                         "inputs": {
118                           "resolution-key": {
119                             "description": "Key for service instance related correlation.",
120                             "required": false,
121                             "type": "string"
122                           },
123                           "occurrence": {
124                             "description": "Number of time to perform the resolution.",
125                             "required": false,
126                             "default": 1,
127                             "type": "integer"
128                           },
129                           "store-result": {
130                             "description": "Whether or not to store the output.",
131                             "required": false,
132                             "type": "boolean"
133                           },
134                           "resource-type": {
135                             "description": "Request type.",
136                             "required": false,
137                             "type": "string"
138                           },
139                           "artifact-prefix-names": {
140                             "required": true,
141                             "description": "Template , Resource Assignment Artifact Prefix names",
142                             "type": "list",
143                             "entry_schema": {
144                               "type": "string"
145                             }
146                           },
147                           "request-id": {
148                             "description": "Request Id, Unique Id for the request.",
149                             "required": true,
150                             "type": "string"
151                           },
152                           "resource-id": {
153                             "description": "Resource Id.",
154                             "required": false,
155                             "type": "string"
156                           },
157                           "action-name": {
158                             "description": "Action Name of the process",
159                             "required": false,
160                             "type": "string"
161                           },
162                           "dynamic-properties": {
163                             "description": "Dynamic Json Content or DSL Json reference.",
164                             "required": false,
165                             "type": "json"
166                           }
167                         },
168                         "outputs": {
169                           "resource-assignment-params": {
170                             "required": true,
171                             "type": "string"
172                           },
173                           "status": {
174                             "required": true,
175                             "type": "string"
176                           }
177                         }
178                       }
179                     }
180                   }
181                 },
182                 "derived_from": "tosca.nodes.Component"
183               }
184
185          .. tab:: script-executor
186
187             **component-script-executor:**
188
189             Used to **execute** a script to perform **NETCONF, RESTCONF, SSH commands**
190             from within the runtime container of CDS.
191
192             Two type of scripts are supported:
193
194             * Kotlin: offer a way more integrated scripting framework, along
195               with a way faster processing capability. See more about Kotlin script: https://github.com/Kotlin/KEEP/blob/master/proposals/scripting-support.md
196             * Python: uses Jython which is bound to Python 2.7, end of life Januray 2020.
197               See more about Jython: https://www.jython.org/
198
199             The `script-class-reference` field need to reference
200
201             * for kotlin: the package name up to the class. e.g. com.example.Bob
202             * for python: it has to be the path from the Scripts folder, e.g. Scripts/python/Bob.py
203
204             `Here <https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/node_type/component-script-executor.json>`_
205             is the definition
206
207             .. _test_test_test:
208
209             .. code-block:: json
210               :caption: **component-script-executor**
211
212                 {
213                   "description": "This is Netconf Transaction Configuration Component API",
214                   "version": "1.0.0",
215                   "interfaces": {
216                     "ComponentScriptExecutor": {
217                       "operations": {
218                         "process": {
219                           "inputs": {
220                             "script-type": {
221                               "description": "Script type, kotlin type is supported",
222                               "required": true,
223                               "type": "string",
224                               "default": "internal",
225                               "constraints": [
226                                 {
227                                   "valid_values": [
228                                     "kotlin",
229                                     "jython",
230                                     "internal"
231                                   ]
232                                 }
233                               ]
234                             },
235                             "script-class-reference": {
236                               "description": "Kotlin Script class name with full package or jython script name.",
237                               "required": true,
238                               "type": "string"
239                             },
240                             "dynamic-properties": {
241                               "description": "Dynamic Json Content or DSL Json reference.",
242                               "required": false,
243                               "type": "json"
244                             }
245                           },
246                           "outputs": {
247                             "response-data": {
248                               "description": "Execution Response Data in JSON format.",
249                               "required": false,
250                               "type": "string"
251                             },
252                             "status": {
253                               "description": "Status of the Component Execution ( success or failure )",
254                               "required": true,
255                               "type": "string"
256                             }
257                           }
258                         }
259                       }
260                     }
261                   },
262                   "derived_from": "tosca.nodes.Component"
263                 }
264
265          .. tab:: remote-script-executor
266
267             **component-remote-script-executor:**
268
269             Used to **execute** a python script in a dedicated micro-service, providing a Python 3.6 environment.
270
271             **Output result:**
272
273             prepare-environment-logs: will contain the logs for all the pip install of ansible_galaxy setup
274
275             execute-command-logs: will contain the execution logs of the script, that were printed into stdout
276
277             Using the get_attribute expression (see :ref:`expression` -> get_attribute),
278             this attribute can be retrieve to be provided as workflow output (see :ref:`workflow`).
279
280             **Params:**
281
282             The `command` field need to reference the path from the Scripts folder of the
283             scripts to execute, e.g. Scripts/python/Bob.py
284
285             The `packages` field allow to provide a list of **PIP package** to install in the target environment,
286             or a requirements.txt file. Also, it supports **Ansible role**.
287
288             If **requirements.txt** is specified, then it should be **provided** as
289             part of the **Environment** folder of the CBA.
290
291             .. code-block:: json
292                :caption: **Example**
293
294                "packages": [
295                  {
296                    "type": "pip",
297                    "package": [
298                      "requirements.txt"
299                    ]
300                  },
301                  {
302                    "type": "ansible_galaxy",
303                    "package": [
304                      "juniper.junos"
305                    ]
306                  }
307                ]
308
309             The `argument-properties` allows to specified input argument to the script to execute. They should be
310             expressed in a DSL, and they will be ordered as specified.
311
312             .. code-block:: json
313                :caption: **Example**
314
315                "ansible-argument-properties": {
316                  "arg0": "-i",
317                  "arg1": "Scripts/ansible/inventory.yaml",
318                  "arg2": "--extra-vars",
319                  "arg3": {
320                    "get_attribute": [
321                      "resolve-ansible-vars",
322                      "",
323                      "assignment-params",
324                      "ansible-vars"
325                    ]
326                  }
327                }
328
329             The `dynamic-properties` can be anything that needs to be passed to the
330             script that couldn't be passed as an argument, such as JSON object, etc... If used, they will be passed
331             in as the last argument of the Python script.
332
333             `Here <https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/node_type/component-remote-python-executor.json>`_
334             is the definition
335
336             .. code-block:: json
337                :caption: **component-remote-script-executor**
338
339                {
340                  "description": "This is Remote Python Execution Component.",
341                  "version": "1.0.0",
342                  "attributes": {
343                    "prepare-environment-logs": {
344                      "required": false,
345                      "type": "string"
346                    },
347                    "execute-command-logs": {
348                      "required": false,
349                      "type": "list",
350                      "entry_schema": {
351                        "type": "string"
352                      }
353                    },
354                    "response-data": {
355                      "required": false,
356                      "type": "json"
357                    }
358                  },
359                  "capabilities": {
360                    "component-node": {
361                      "type": "tosca.capabilities.Node"
362                    }
363                  },
364                  "interfaces": {
365                    "ComponentRemotePythonExecutor": {
366                      "operations": {
367                        "process": {
368                          "inputs": {
369                            "endpoint-selector": {
370                              "description": "Remote Container or Server selector name.",
371                              "required": false,
372                              "type": "string",
373                              "default": "remote-python"
374                            },
375                            "dynamic-properties": {
376                              "description": "Dynamic Json Content or DSL Json reference.",
377                              "required": false,
378                              "type": "json"
379                            },
380                            "argument-properties": {
381                              "description": "Argument Json Content or DSL Json reference.",
382                              "required": false,
383                              "type": "json"
384                            },
385                            "command": {
386                              "description": "Command to execute.",
387                              "required": true,
388                              "type": "string"
389                            },
390                            "packages": {
391                              "description": "Packages to install based on type.",
392                              "required": false,
393                              "type" : "list",
394                              "entry_schema" : {
395                                "type" : "dt-system-packages"
396                              }
397                            }
398                          }
399                        }
400                      }
401                    }
402                  },
403                  "derived_from": "tosca.nodes.Component"
404                }
405
406          .. tab:: remote-ansible-executor
407
408             **component-remote-ansible-executor:**
409
410             Used to **execute** an ansible playbook hosted in AWX/Anisble Tower.
411
412             **Ouput result:**
413
414             ansible-command-status: status of the command
415
416             ansible-command-logs: will contain the execution logs of the playbook
417
418             Using the get_attribute expression, this attribute can be retrieve to be provided as workflow output (see Workflow).
419
420             **Param:**
421
422             TBD
423
424             `Here <https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/node_type/component-remote-ansible-executor.json>`_
425             is the definition
426
427             .. code-block:: json
428                :caption: **component-remote-script-executor**
429
430                 {
431                   "description": "This is Remote Ansible Playbook (AWX) Execution Component.",
432                   "version": "1.0.0",
433                   "attributes": {
434                     "ansible-command-status": {
435                       "required": true,
436                       "type": "string"
437                     },
438                     "ansible-command-logs": {
439                       "required": true,
440                       "type": "string"
441                     }
442                   },
443                   "capabilities": {
444                     "component-node": {
445                       "type": "tosca.capabilities.Node"
446                     }
447                   },
448                   "interfaces": {
449                     "ComponentRemoteAnsibleExecutor": {
450                       "operations": {
451                         "process": {
452                           "inputs": {
453                             "job-template-name": {
454                               "description": "Primary key or name of the job template to launch new job.",
455                               "required": true,
456                               "type": "string"
457                             },
458                             "limit": {
459                               "description": "Specify host limit for job template to run.",
460                               "required": false,
461                               "type": "string"
462                             },
463                             "inventory": {
464                               "description": "Specify inventory for job template to run.",
465                               "required": false,
466                               "type": "string"
467                             },
468                             "extra-vars": {
469                               "required": false,
470                               "type": "json",
471                               "description": "json formatted text that contains extra variables to pass on."
472                             },
473                             "tags": {
474                               "description": "Specify tagged actions in the playbook to run.",
475                               "required": false,
476                               "type": "string"
477                             },
478                             "skip-tags": {
479                               "description": "Specify tagged actions in the playbook to omit.",
480                               "required": false,
481                               "type": "string"
482                             },
483                             "endpoint-selector": {
484                               "description": "Remote AWX Server selector name.",
485                               "required": true,
486                               "type": "string"
487                             }
488                           }
489                         }
490                       }
491                     }
492                   },
493                   "derived_from": "tosca.nodes.Component"
494                 }
495
496    .. tab:: Source
497
498       **Source:**
499
500       Used to represent a **type of source** to **resolve** a **resource**, along with the expected **properties**
501
502       Defines the **contract** to resolve a resource.
503
504       `Here <https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.ResourceSource.json>`_
505       is the root component TOSCA node type from which other node type will derive:
506
507       .. code-block::
508          :caption: **tosca.nodes.Component**
509
510          {
511            "description": "TOSCA base type for Resource Sources",
512            "version": "1.0.0",
513            "derived_from": "tosca.nodes.Root"
514          }
515
516       **Bellow is a list of supported sources**
517
518       .. tabs::
519
520          .. tab:: input
521
522             **Input:**
523
524             Expects the **value to be provided as input** to the request.
525
526             `Here <https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/node_type/source-input.json>`_
527             is the Definition
528
529             .. code-block::
530                :caption: **source-input**
531
532                {
533                  "description": "This is Input Resource Source Node Type",
534                  "version": "1.0.0",
535                  "properties": {},
536                  "derived_from": "tosca.nodes.ResourceSource"
537                }
538
539          .. tab:: default
540
541             **Default:**
542
543             Expects the **value to be defaulted** in the model itself.
544
545             `Here <https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/node_type/source-default.json>`_
546             is the Definition
547
548             .. code-block:: json
549                :caption: **source-default**
550
551                {
552                  "description": "This is Default Resource Source Node Type",
553                  "version": "1.0.0",
554                  "properties": {},
555                  "derived_from": "tosca.nodes.ResourceSource"
556                }
557
558          .. tab:: rest
559
560             **REST**
561
562             Expects the **URI along with the VERB and the payload**, if needed.
563
564             CDS is currently deployed along the side of SDNC, hence the **default** rest
565             **connection** provided by the framework is to **SDNC MDSAL**.
566
567             .. list-table::
568                :widths: 25 50 25
569                :header-rows: 1
570
571                * - Property
572                  - Description
573                  - Scope
574                * - type
575                  - Expected output value, only JSON supported for now
576                  - Optional
577                * - verb
578                  - HTTP verb for the request - default value is GET
579                  - Optional
580                * - payload
581                  - Payload to sent
582                  - Optional
583                * - endpoint-selector
584                  - **Specific REST system** to interact with to (see **Dynamic Endpoint**)
585                  - Optional
586                * - url-path
587                  - URI
588                  - Mandatory
589                * - path
590                  - JSON path to the value to fetch from the response
591                  - Mandatory
592                * - expression-type
593                  - Path expression type - default value is JSON_PATH
594                  - Optional
595
596             `Here <https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/node_type/source-rest.json>`_
597             is the definition:
598
599             .. code-block:: json
600                :caption: **source-rest**
601
602                 {
603                   "description": "This is Rest Resource Source Node Type",
604                   "version": "1.0.0",
605                   "properties": {
606                     "type": {
607                       "required": false,
608                       "type": "string",
609                       "default": "JSON",
610                       "constraints": [
611                         {
612                           "valid_values": [
613                             "JSON"
614                           ]
615                         }
616                       ]
617                     },
618                     "verb": {
619                       "required": false,
620                       "type": "string",
621                       "default": "GET",
622                       "constraints": [
623                         {
624                           "valid_values": [
625                             "GET",
626                             "POST",
627                             "DELETE",
628                             "PUT"
629                           ]
630                         }
631                       ]
632                     },
633                     "payload": {
634                       "required": false,
635                       "type": "string",
636                       "default": ""
637                     },
638                     "endpoint-selector": {
639                       "required": false,
640                       "type": "string"
641                     },
642                     "url-path": {
643                       "required": true,
644                       "type": "string"
645                     },
646                     "path": {
647                       "required": true,
648                       "type": "string"
649                     },
650                     "expression-type": {
651                       "required": false,
652                       "type": "string",
653                       "default": "JSON_PATH",
654                       "constraints": [
655                         {
656                           "valid_values": [
657                             "JSON_PATH",
658                             "JSON_POINTER"
659                           ]
660                         }
661                       ]
662                     },
663                     "input-key-mapping": {
664                       "required": false,
665                       "type": "map",
666                       "entry_schema": {
667                         "type": "string"
668                       }
669                     },
670                     "output-key-mapping": {
671                       "required": false,
672                       "type": "map",
673                       "entry_schema": {
674                         "type": "string"
675                       }
676                     },
677                     "key-dependencies": {
678                       "required": true,
679                       "type": "list",
680                       "entry_schema": {
681                         "type": "string"
682                       }
683                     }
684                   },
685                   "derived_from": "tosca.nodes.ResourceSource"
686                 }
687          .. tab:: sql
688
689             **SQL**
690
691             Expects the **SQL query** to be modeled; that SQL query can be parameterized,
692             and the parameters be other resources resolved through other means.
693             If that's the case, this data dictionary definition will have to define ``key-dependencies`` along with ``input-key-mapping``.
694
695             CDS is currently deployed along the side of SDNC, hence the **primary** database
696             **connection** provided by the framework is to **SDNC database**.
697
698             .. list-table::
699                :widths: 25 50 25
700
701                * - Property
702                  - Description
703                  - Scope
704                * - type
705                  - Database type, only SQL supported for now
706                  - Mandatory
707                * - endpoint-selector
708                  - Specific Database system to interact with to (see **Dynamic Endpoint**)
709                  - Optional
710                * - query
711                  - Statement to execute
712                  - Mandatory
713
714
715             `Here <https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/node_type/source-processor-db.json>`_
716             is the definition:
717
718             .. code-block:: json
719                :caption: **source-db**
720
721                 {
722                   "description": "This is Database Resource Source Node Type",
723                   "version": "1.0.0",
724                   "properties": {
725                     "type": {
726                       "required": true,
727                       "type": "string",
728                       "constraints": [
729                         {
730                           "valid_values": [
731                             "SQL"
732                           ]
733                         }
734                       ]
735                     },
736                     "endpoint-selector": {
737                       "required": false,
738                       "type": "string"
739                     },
740                     "query": {
741                       "required": true,
742                       "type": "string"
743                     },
744                     "input-key-mapping": {
745                       "required": false,
746                       "type": "map",
747                       "entry_schema": {
748                         "type": "string"
749                       }
750                     },
751                     "output-key-mapping": {
752                       "required": false,
753                       "type": "map",
754                       "entry_schema": {
755                         "type": "string"
756                       }
757                     },
758                     "key-dependencies": {
759                       "required": true,
760                       "type": "list",
761                       "entry_schema": {
762                         "type": "string"
763                       }
764                     }
765                   },
766                   "derived_from": "tosca.nodes.ResourceSource"
767                 }
768
769          .. tab:: capability
770
771                   **Capability:**
772
773                   Expects a **script** to be provided.
774
775                   .. list-table::
776                      :widths: 25 50 25
777                      :header-rows: 1
778
779                      * - Property
780                        - Description
781                        - Scope
782                      * - script-type
783                        - The type of the script - default value is Koltin
784                        - Optional
785                      * - script-class-reference
786                        - The name of the class to use to create an instance of the script
787                        - Mandatory
788
789             `Here <https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/node_type/source-capability.json>`_
790             is the definition:
791
792             .. code-block:: json
793                :caption: **source-capability**
794
795                 {
796                   "description": "This is Component Resource Source Node Type",
797                   "version": "1.0.0",
798                   "properties": {
799                     "script-type": {
800                       "required": true,
801                       "type": "string",
802                       "default": "kotlin",
803                       "constraints": [
804                         {
805                           "valid_values": [
806                             "internal",
807                             "kotlin",
808                             "jython"
809                           ]
810                         }
811                       ]
812                     },
813                     "script-class-reference": {
814                       "description": "Capability reference name for internal and kotlin, for jython script file path",
815                       "required": true,
816                       "type": "string"
817                     },
818                     "key-dependencies": {
819                       "description": "Resource Resolution dependency dictionary names.",
820                       "required": true,
821                       "type": "list",
822                       "entry_schema": {
823                         "type": "string"
824                       }
825                     }
826                   },
827                   "derived_from": "tosca.nodes.ResourceSource"
828                 }
829
830    .. tab:: Other
831
832       **Other:**
833
834       .. tabs::
835
836          .. tab:: DG
837
838             **dg-generic:**
839
840             Identifies a Directed Graph used as **imperative workflow**.
841
842             .. list-table::
843                :widths: 40 40 20
844                :header-rows: 1
845
846                * - Property
847                  - Description
848                  - Scope
849                * - dependency-node-templates
850                  - The node template the workflow depends on
851                  - Required
852
853             `Here <https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/node_type/dg-generic.json>`_
854             is the definition:
855
856             .. code-block:: json
857                :caption: **dg-generic**
858
859                 {
860                   "description": "This is Generic Directed Graph Type",
861                   "version": "1.0.0",
862                   "properties": {
863                     "content": {
864                       "required": true,
865                       "type": "string"
866                     },
867                     "dependency-node-templates": {
868                       "required": true,
869                       "description": "Dependent Step Components NodeTemplate name.",
870                       "type": "list",
871                       "entry_schema": {
872                         "type": "string"
873                       }
874                     }
875                   },
876                   "derived_from": "tosca.nodes.DG"
877                 }
878
879             A node_template of this type always provide one artifact, of type artifact-directed-graph,
880             which will be located under the Plans/ folder within the CBA.
881
882             .. code-block:: json
883                :caption: **node_template example**
884
885                 {
886                   "config-deploy-process": {
887                     "type": "dg-generic",
888                     "properties": {
889                       "content": {
890                         "get_artifact": [
891                           "SELF",
892                           "dg-config-deploy-process"
893                         ]
894                       },
895                       "dependency-node-templates": [
896                         "nf-account-collection",
897                         "execute"
898                       ]
899                     },
900                     "artifacts": {
901                       "dg-config-deploy-process": {
902                         "type": "artifact-directed-graph",
903                         "file": "Plans/CONFIG_ConfigDeploy.xml"
904                       }
905                     }
906                   }
907                 }
908
909             In the DG bellow, the execute node refers to the node_template.
910
911             .. code-block:: xml
912                :caption: **Plans/CONFIG_ConfigDeploy.xml**
913
914                <service-logic
915                xmlns='http://www.onap.org/sdnc/svclogic'
916                xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
917                xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='CONFIG' version='1.0.0'>
918                   <method rpc='ConfigDeploy' mode='sync'>
919                      <block atomic="true">
920                         <execute plugin="nf-account-collection" method="process">
921                            <outcome value='failure'>
922                               <return status="failure">
923                               </return>
924                            </outcome>
925                            <outcome value='success'>
926                               <execute plugin="execute" method="process">
927                                  <outcome value='failure'>
928                                     <return status="failure">
929                                     </return>
930                                  </outcome>
931                                  <outcome value='success'>
932                                     <return status='success'>
933                                     </return>
934                                  </outcome>
935                               </execute>
936                            </outcome>
937                         </execute>
938                      </block>
939                   </method>
940                </service-logic>
941
942          .. tab:: VNF
943
944             **tosca.nodes.VNF**
945
946             Identifies a VNF, can be used to **correlate** any type of **VNF** related **information**.
947
948             https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.Vnf.json
949
950             .. code-block:: json
951                :caption: **tosca.nodes.vnf**
952
953                {
954                  "description": "This is VNF Node Type",
955                  "version": "1.0.0",
956                  "derived_from": "tosca.nodes.Root"
957                }
958
959             **vnf-netconf-device**
960
961             Represents the VNF information to **establish** a **NETCONF communication**.
962
963             https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/node_type/vnf-netconf-device.json
964
965             .. code-block:: json
966                :caption: **vnf-netconf-device**
967
968                {
969                  "description": "This is VNF Device with Netconf  Capability",
970                  "version": "1.0.0",
971                  "capabilities": {
972                    "netconf": {
973                      "type": "tosca.capabilities.Netconf",
974                      "properties": {
975                        "login-key": {
976                          "required": true,
977                          "type": "string",
978                          "default": "sdnc"
979                        },
980                        "login-account": {
981                          "required": true,
982                          "type": "string",
983                          "default": "sdnc-tacacs"
984                        },
985                        "source": {
986                          "required": false,
987                          "type": "string",
988                          "default": "npm"
989                        },
990                        "target-ip-address": {
991                          "required": true,
992                          "type": "string"
993                        },
994                        "port-number": {
995                          "required": true,
996                          "type": "integer",
997                          "default": 830
998                        },
999                        "connection-time-out": {
1000                          "required": false,
1001                          "type": "integer",
1002                          "default": 30
1003                        }
1004                      }
1005                    }
1006                  },
1007                  "derived_from": "tosca.nodes.Vnf"
1008                }