aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/robot/resources
diff options
context:
space:
mode:
authorguillaume.lambert <guillaume.lambert@orange.com>2021-12-08 10:14:09 +0100
committerguillaume.lambert <guillaume.lambert@orange.com>2021-12-08 13:59:05 +0100
commit0daad9993ff4d1ea146e0100e78708964c6a9921 (patch)
treea0306173a248f712529c6042b6195e5e4c67fce9 /kubernetes/robot/resources
parentf657a816b9074f5bf2b3d300d93266269c1f05a5 (diff)
[COMMON] Fix & add to bashisms CI failover scripts
Issue-ID: OOM-2643 Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com> Change-Id: Icf139e50d44aed0315d0e4cb21c59ad05a5a3bdb
Diffstat (limited to 'kubernetes/robot/resources')
0 files changed, 0 insertions, 0 deletions
2'>172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008
.. This work is a derivative of https://wiki.onap.org/display/DW/Modeling+Concepts#Concepts-703799064
.. This work is licensed under a Creative Commons Attribution 4.0
.. International License. http://creativecommons.org/licenses/by/4.0
.. Copyright (C) 2020 Deutsche Telekom AG.

.. _node_type:

Node type
---------

`TOSCA definition
<http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.2/csd01/TOSCA-Simple-Profile-YAML-v1.2-csd01.html#_Toc494454215>`_

In CDS, we have mainly two distinct types: components and source. We have some other type as well,
listed in the other section.

.. tabs::

   .. tab:: Component

      **Component:**

      Used to represent a **functionality** along with its **contract**, such as **inputs**, **ouputs**, and **attributes**

      `Here <https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.Component.json>`_
      is the root component TOSCA node type from which other node type will derive:

      .. code-block:: json
         :caption: **tosca.nodes.Component**

         {
           "description": "This is default Component Node",
           "version": "1.0.0",
           "derived_from": "tosca.nodes.Root"
         }

      **Bellow is a list of supported components**

      .. tabs::

         .. tab:: resource-resolution

            **component-resource-resolution:**

            Used to perform resolution of **resources**.

            Requires as many as artifact-mapping-resource (see :ref:`artifact_type` -> Mapping) AND
            artifact-template-velocity (see :ref:`artifact_type` -> Jinja) as needed.

            **Output result:**

            Will put the resolution result as an **attribute** in the workflow context called **assignment-params**.

            Using the :ref:`undefined <get_attribute expression>`, this attribute can be retrieve to be
            provided as workflow output (see :ref:`workflow`).

            **Specify which template to resolve:**

            Currently, resolution is bounded to a template. To specify which template to use, you
            need to fill in the `artifact-prefix-names` field.

            See :ref:`template` to understand what the artifact prefix name is.

            **Storing the result:**

            To store each resource being resolved, along with their status, and the resolved template, `store-result` should be set to `true`.

            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`


            The concept of resource-id / resource-type, or resolution-key, is to uniquely identify a specific resolution that
            has been performed for a given action. Hence the resolution-key has to be unique for a given blueprint name, blueprint version, action name.

            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.

            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.

            .. warning:: Important not to confuse and AAI resource (e.g. a topology element,
                         or service related element) with the resources resolved by CDS, which can be seen
                         as parameters required to derived a network configuration.

            **Run the resolution multiple time:**

            If you need to run the same resolution component multiple times, use the field `occurence`.
            This will add the notion of occurrence to the resolution, and if storing the results, resources
            and templates, they will be accessible for each occurrence.

            Occurrence is a number between 1 and N; when retrieving information
            for a given occurrence, the first iteration starts at 1.

            This feature is useful when you need to apply the same configuration accross network elements.

            `Here <https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/node_type/component-resource-resolution.json>`_
            is the definition:

            .. code-block:: json
              :caption: **component-resource-resolution**

              {
                "description": "This is Resource Assignment Component API",
                "version": "1.0.0",
                "attributes": {
                  "assignment-params": {
                    "required": true,
                    "type": "string"
                  }
                },
                "capabilities": {
                  "component-node": {
                    "type": "tosca.capabilities.Node"
                  }
                },
                "interfaces": {
                  "ResourceResolutionComponent": {
                    "operations": {
                      "process": {
                        "inputs": {
                          "resolution-key": {
                            "description": "Key for service instance related correlation.",
                            "required": false,
                            "type": "string"
                          },
                          "occurrence": {
                            "description": "Number of time to perform the resolution.",
                            "required": false,
                            "default": 1,
                            "type": "integer"
                          },
                          "store-result": {
                            "description": "Whether or not to store the output.",
                            "required": false,
                            "type": "boolean"
                          },
                          "resource-type": {
                            "description": "Request type.",
                            "required": false,
                            "type": "string"
                          },
                          "artifact-prefix-names": {
                            "required": true,
                            "description": "Template , Resource Assignment Artifact Prefix names",
                            "type": "list",
                            "entry_schema": {
                              "type": "string"
                            }
                          },
                          "request-id": {
                            "description": "Request Id, Unique Id for the request.",
                            "required": true,
                            "type": "string"
                          },
                          "resource-id": {
                            "description": "Resource Id.",
                            "required": false,
                            "type": "string"
                          },
                          "action-name": {
                            "description": "Action Name of the process",
                            "required": false,
                            "type": "string"
                          },
                          "dynamic-properties": {
                            "description": "Dynamic Json Content or DSL Json reference.",
                            "required": false,
                            "type": "json"
                          }
                        },
                        "outputs": {
                          "resource-assignment-params": {
                            "required": true,
                            "type": "string"
                          },
                          "status": {
                            "required": true,
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "derived_from": "tosca.nodes.Component"
              }

         .. tab:: script-executor

            **component-script-executor:**

            Used to **execute** a script to perform **NETCONF, RESTCONF, SSH commands**
            from within the runtime container of CDS.

            Two type of scripts are supported:

            * Kotlin: offer a way more integrated scripting framework, along
              with a way faster processing capability. See more about Kotlin script: https://github.com/Kotlin/KEEP/blob/master/proposals/scripting-support.md
            * Python: uses Jython which is bound to Python 2.7, end of life Januray 2020.
              See more about Jython: https://www.jython.org/

            The `script-class-reference` field need to reference

            * for kotlin: the package name up to the class. e.g. com.example.Bob
            * for python: it has to be the path from the Scripts folder, e.g. Scripts/python/Bob.py

            `Here <https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/node_type/component-script-executor.json>`_
            is the definition

            .. _test_test_test:

            .. code-block:: json
              :caption: **component-script-executor**

                {
                  "description": "This is Netconf Transaction Configuration Component API",
                  "version": "1.0.0",
                  "interfaces": {
                    "ComponentScriptExecutor": {
                      "operations": {
                        "process": {
                          "inputs": {
                            "script-type": {
                              "description": "Script type, kotlin type is supported",
                              "required": true,
                              "type": "string",
                              "default": "internal",
                              "constraints": [
                                {
                                  "valid_values": [
                                    "kotlin",
                                    "jython",
                                    "internal"
                                  ]
                                }
                              ]
                            },
                            "script-class-reference": {
                              "description": "Kotlin Script class name with full package or jython script name.",
                              "required": true,
                              "type": "string"
                            },
                            "dynamic-properties": {
                              "description": "Dynamic Json Content or DSL Json reference.",
                              "required": false,
                              "type": "json"
                            }
                          },
                          "outputs": {
                            "response-data": {
                              "description": "Execution Response Data in JSON format.",
                              "required": false,
                              "type": "string"
                            },
                            "status": {
                              "description": "Status of the Component Execution ( success or failure )",
                              "required": true,
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  },
                  "derived_from": "tosca.nodes.Component"
                }

         .. tab:: remote-script-executor

            **component-remote-script-executor:**

            Used to **execute** a python script in a dedicated micro-service, providing a Python 3.6 environment.

            **Output result:**

            prepare-environment-logs: will contain the logs for all the pip install of ansible_galaxy setup

            execute-command-logs: will contain the execution logs of the script, that were printed into stdout

            Using the get_attribute expression (see :ref:`expression` -> get_attribute),
            this attribute can be retrieve to be provided as workflow output (see :ref:`workflow`).

            **Params:**

            The `command` field need to reference the path from the Scripts folder of the
            scripts to execute, e.g. Scripts/python/Bob.py

            The `packages` field allow to provide a list of **PIP package** to install in the target environment,
            or a requirements.txt file. Also, it supports **Ansible role**.

            If **requirements.txt** is specified, then it should be **provided** as
            part of the **Environment** folder of the CBA.

            .. code-block:: json
               :caption: **Example**

               "packages": [
                 {
                   "type": "pip",
                   "package": [
                     "requirements.txt"
                   ]
                 },
                 {
                   "type": "ansible_galaxy",
                   "package": [
                     "juniper.junos"
                   ]
                 }
               ]

            The `argument-properties` allows to specified input argument to the script to execute. They should be
            expressed in a DSL, and they will be ordered as specified.

            .. code-block:: json
               :caption: **Example**

               "ansible-argument-properties": {
                 "arg0": "-i",
                 "arg1": "Scripts/ansible/inventory.yaml",
                 "arg2": "--extra-vars",
                 "arg3": {
                   "get_attribute": [
                     "resolve-ansible-vars",
                     "",
                     "assignment-params",
                     "ansible-vars"
                   ]
                 }
               }

            The `dynamic-properties` can be anything that needs to be passed to the
            script that couldn't be passed as an argument, such as JSON object, etc... If used, they will be passed
            in as the last argument of the Python script.

            `Here <https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/node_type/component-remote-python-executor.json>`_
            is the definition

            .. code-block:: json
               :caption: **component-remote-script-executor**

               {
                 "description": "This is Remote Python Execution Component.",
                 "version": "1.0.0",
                 "attributes": {
                   "prepare-environment-logs": {
                     "required": false,
                     "type": "string"
                   },
                   "execute-command-logs": {
                     "required": false,
                     "type": "list",
                     "entry_schema": {
                       "type": "string"
                     }
                   },
                   "response-data": {
                     "required": false,
                     "type": "json"
                   }
                 },
                 "capabilities": {
                   "component-node": {
                     "type": "tosca.capabilities.Node"
                   }
                 },
                 "interfaces": {
                   "ComponentRemotePythonExecutor": {
                     "operations": {
                       "process": {
                         "inputs": {
                           "endpoint-selector": {
                             "description": "Remote Container or Server selector name.",
                             "required": false,
                             "type": "string",
                             "default": "remote-python"
                           },
                           "dynamic-properties": {
                             "description": "Dynamic Json Content or DSL Json reference.",
                             "required": false,
                             "type": "json"
                           },
                           "argument-properties": {
                             "description": "Argument Json Content or DSL Json reference.",
                             "required": false,
                             "type": "json"
                           },
                           "command": {
                             "description": "Command to execute.",
                             "required": true,
                             "type": "string"
                           },
                           "packages": {
                             "description": "Packages to install based on type.",
                             "required": false,
                             "type" : "list",
                             "entry_schema" : {
                               "type" : "dt-system-packages"
                             }
                           }
                         }
                       }
                     }
                   }
                 },
                 "derived_from": "tosca.nodes.Component"
               }

         .. tab:: remote-ansible-executor

            **component-remote-ansible-executor:**

            Used to **execute** an ansible playbook hosted in AWX/Anisble Tower.

            **Ouput result:**

            ansible-command-status: status of the command

            ansible-command-logs: will contain the execution logs of the playbook

            Using the get_attribute expression, this attribute can be retrieve to be provided as workflow output (see Workflow).

            **Param:**

            TBD

            `Here <https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/node_type/component-remote-ansible-executor.json>`_
            is the definition

            .. code-block:: json
               :caption: **component-remote-script-executor**

                {
                  "description": "This is Remote Ansible Playbook (AWX) Execution Component.",
                  "version": "1.0.0",
                  "attributes": {
                    "ansible-command-status": {
                      "required": true,
                      "type": "string"
                    },
                    "ansible-command-logs": {
                      "required": true,
                      "type": "string"
                    }
                  },
                  "capabilities": {
                    "component-node": {
                      "type": "tosca.capabilities.Node"
                    }
                  },
                  "interfaces": {
                    "ComponentRemoteAnsibleExecutor": {
                      "operations": {
                        "process": {
                          "inputs": {
                            "job-template-name": {
                              "description": "Primary key or name of the job template to launch new job.",
                              "required": true,
                              "type": "string"
                            },
                            "limit": {
                              "description": "Specify host limit for job template to run.",
                              "required": false,
                              "type": "string"
                            },
                            "inventory": {
                              "description": "Specify inventory for job template to run.",
                              "required": false,
                              "type": "string"
                            },
                            "extra-vars": {
                              "required": false,
                              "type": "json",
                              "description": "json formatted text that contains extra variables to pass on."
                            },
                            "tags": {
                              "description": "Specify tagged actions in the playbook to run.",
                              "required": false,
                              "type": "string"
                            },
                            "skip-tags": {
                              "description": "Specify tagged actions in the playbook to omit.",
                              "required": false,
                              "type": "string"
                            },
                            "endpoint-selector": {
                              "description": "Remote AWX Server selector name.",
                              "required": true,
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  },
                  "derived_from": "tosca.nodes.Component"
                }

   .. tab:: Source

      **Source:**

      Used to represent a **type of source** to **resolve** a **resource**, along with the expected **properties**

      Defines the **contract** to resolve a resource.

      `Here <https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.ResourceSource.json>`_
      is the root component TOSCA node type from which other node type will derive:

      .. code-block::
         :caption: **tosca.nodes.Component**

         {
           "description": "TOSCA base type for Resource Sources",
           "version": "1.0.0",
           "derived_from": "tosca.nodes.Root"
         }

      **Bellow is a list of supported sources**

      .. tabs::

         .. tab:: input

            **Input:**

            Expects the **value to be provided as input** to the request.

            `Here <https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/node_type/source-input.json>`_
            is the Definition

            .. code-block::
               :caption: **source-input**

               {
                 "description": "This is Input Resource Source Node Type",
                 "version": "1.0.0",
                 "properties": {},
                 "derived_from": "tosca.nodes.ResourceSource"
               }

         .. tab:: default

            **Default:**

            Expects the **value to be defaulted** in the model itself.

            `Here <https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/node_type/source-default.json>`_
            is the Definition

            .. code-block:: json
               :caption: **source-default**

               {
                 "description": "This is Default Resource Source Node Type",
                 "version": "1.0.0",
                 "properties": {},
                 "derived_from": "tosca.nodes.ResourceSource"
               }

         .. tab:: rest

            **REST**

            Expects the **URI along with the VERB and the payload**, if needed.

            CDS is currently deployed along the side of SDNC, hence the **default** rest
            **connection** provided by the framework is to **SDNC MDSAL**.

            .. list-table::
               :widths: 25 50 25
               :header-rows: 1

               * - Property
                 - Description
                 - Scope
               * - type
                 - Expected output value, only JSON supported for now
                 - Optional
               * - verb
                 - HTTP verb for the request - default value is GET
                 - Optional
               * - payload
                 - Payload to sent
                 - Optional
               * - endpoint-selector
                 - **Specific REST system** to interact with to (see **Dynamic Endpoint**)
                 - Optional
               * - url-path
                 - URI
                 - Mandatory
               * - path
                 - JSON path to the value to fetch from the response
                 - Mandatory
               * - expression-type
                 - Path expression type - default value is JSON_PATH
                 - Optional

            `Here <https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/node_type/source-rest.json>`_
            is the definition:

            .. code-block:: json
               :caption: **source-rest**

                {
                  "description": "This is Rest Resource Source Node Type",
                  "version": "1.0.0",
                  "properties": {
                    "type": {
                      "required": false,
                      "type": "string",
                      "default": "JSON",
                      "constraints": [
                        {
                          "valid_values": [
                            "JSON"
                          ]
                        }
                      ]
                    },
                    "verb": {
                      "required": false,
                      "type": "string",
                      "default": "GET",
                      "constraints": [
                        {
                          "valid_values": [
                            "GET",
                            "POST",
                            "DELETE",
                            "PUT"
                          ]
                        }
                      ]
                    },
                    "payload": {
                      "required": false,
                      "type": "string",
                      "default": ""
                    },
                    "endpoint-selector": {
                      "required": false,
                      "type": "string"
                    },
                    "url-path": {
                      "required": true,
                      "type": "string"
                    },
                    "path": {
                      "required": true,
                      "type": "string"
                    },
                    "expression-type": {
                      "required": false,
                      "type": "string",
                      "default": "JSON_PATH",
                      "constraints": [
                        {
                          "valid_values": [
                            "JSON_PATH",
                            "JSON_POINTER"
                          ]
                        }
                      ]
                    },
                    "input-key-mapping": {
                      "required": false,
                      "type": "map",
                      "entry_schema": {
                        "type": "string"
                      }
                    },
                    "output-key-mapping": {
                      "required": false,
                      "type": "map",
                      "entry_schema": {
                        "type": "string"
                      }
                    },
                    "key-dependencies": {
                      "required": true,
                      "type": "list",
                      "entry_schema": {
                        "type": "string"
                      }
                    }
                  },
                  "derived_from": "tosca.nodes.ResourceSource"
                }
         .. tab:: sql

            **SQL**

            Expects the **SQL query** to be modeled; that SQL query can be parameterized,
            and the parameters be other resources resolved through other means.
            If that's the case, this data dictionary definition will have to define ``key-dependencies`` along with ``input-key-mapping``.

            CDS is currently deployed along the side of SDNC, hence the **primary** database
            **connection** provided by the framework is to **SDNC database**.

            .. list-table::
               :widths: 25 50 25

               * - Property
                 - Description
                 - Scope
               * - type
                 - Database type, only SQL supported for now
                 - Mandatory
               * - endpoint-selector
                 - Specific Database system to interact with to (see **Dynamic Endpoint**)
                 - Optional
               * - query
                 - Statement to execute
                 - Mandatory


            `Here <https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/node_type/source-processor-db.json>`_
            is the definition:

            .. code-block:: json
               :caption: **source-db**

                {
                  "description": "This is Database Resource Source Node Type",
                  "version": "1.0.0",
                  "properties": {
                    "type": {
                      "required": true,
                      "type": "string",
                      "constraints": [
                        {
                          "valid_values": [
                            "SQL"
                          ]
                        }
                      ]
                    },
                    "endpoint-selector": {
                      "required": false,
                      "type": "string"
                    },
                    "query": {
                      "required": true,
                      "type": "string"
                    },
                    "input-key-mapping": {
                      "required": false,
                      "type": "map",
                      "entry_schema": {
                        "type": "string"
                      }
                    },
                    "output-key-mapping": {
                      "required": false,
                      "type": "map",
                      "entry_schema": {
                        "type": "string"
                      }
                    },
                    "key-dependencies": {
                      "required": true,
                      "type": "list",
                      "entry_schema": {
                        "type": "string"
                      }
                    }
                  },
                  "derived_from": "tosca.nodes.ResourceSource"
                }

         .. tab:: capability

                  **Capability:**

                  Expects a **script** to be provided.

                  .. list-table::
                     :widths: 25 50 25
                     :header-rows: 1

                     * - Property
                       - Description
                       - Scope
                     * - script-type
                       - The type of the script - default value is Koltin
                       - Optional
                     * - script-class-reference
                       - The name of the class to use to create an instance of the script
                       - Mandatory

            `Here <https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/node_type/source-capability.json>`_
            is the definition:

            .. code-block:: json
               :caption: **source-capability**

                {
                  "description": "This is Component Resource Source Node Type",
                  "version": "1.0.0",
                  "properties": {
                    "script-type": {
                      "required": true,
                      "type": "string",
                      "default": "kotlin",
                      "constraints": [
                        {
                          "valid_values": [
                            "internal",
                            "kotlin",
                            "jython"
                          ]
                        }
                      ]
                    },
                    "script-class-reference": {
                      "description": "Capability reference name for internal and kotlin, for jython script file path",
                      "required": true,
                      "type": "string"
                    },
                    "key-dependencies": {
                      "description": "Resource Resolution dependency dictionary names.",
                      "required": true,
                      "type": "list",
                      "entry_schema": {
                        "type": "string"
                      }
                    }
                  },
                  "derived_from": "tosca.nodes.ResourceSource"
                }

   .. tab:: Other

      **Other:**

      .. tabs::

         .. tab:: DG

            **dg-generic:**

            Identifies a Directed Graph used as **imperative workflow**.

            .. list-table::
               :widths: 40 40 20
               :header-rows: 1

               * - Property
                 - Description
                 - Scope
               * - dependency-node-templates
                 - The node template the workflow depends on
                 - Required

            `Here <https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/node_type/dg-generic.json>`_
            is the definition:

            .. code-block:: json
               :caption: **dg-generic**

                {
                  "description": "This is Generic Directed Graph Type",
                  "version": "1.0.0",
                  "properties": {
                    "content": {
                      "required": true,
                      "type": "string"
                    },
                    "dependency-node-templates": {
                      "required": true,
                      "description": "Dependent Step Components NodeTemplate name.",
                      "type": "list",
                      "entry_schema": {
                        "type": "string"
                      }
                    }
                  },
                  "derived_from": "tosca.nodes.DG"
                }

            A node_template of this type always provide one artifact, of type artifact-directed-graph,
            which will be located under the Plans/ folder within the CBA.

            .. code-block:: json
               :caption: **node_template example**

                {
                  "config-deploy-process": {
                    "type": "dg-generic",
                    "properties": {
                      "content": {
                        "get_artifact": [
                          "SELF",
                          "dg-config-deploy-process"
                        ]
                      },
                      "dependency-node-templates": [
                        "nf-account-collection",
                        "execute"
                      ]
                    },
                    "artifacts": {
                      "dg-config-deploy-process": {
                        "type": "artifact-directed-graph",
                        "file": "Plans/CONFIG_ConfigDeploy.xml"
                      }
                    }
                  }
                }

            In the DG bellow, the execute node refers to the node_template.

            .. code-block:: xml
               :caption: **Plans/CONFIG_ConfigDeploy.xml**

               <service-logic
               xmlns='http://www.onap.org/sdnc/svclogic'
               xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
               xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='CONFIG' version='1.0.0'>
                  <method rpc='ConfigDeploy' mode='sync'>
                     <block atomic="true">
                        <execute plugin="nf-account-collection" method="process">
                           <outcome value='failure'>
                              <return status="failure">
                              </return>
                           </outcome>
                           <outcome value='success'>
                              <execute plugin="execute" method="process">
                                 <outcome value='failure'>
                                    <return status="failure">
                                    </return>
                                 </outcome>
                                 <outcome value='success'>
                                    <return status='success'>
                                    </return>
                                 </outcome>
                              </execute>
                           </outcome>
                        </execute>
                     </block>
                  </method>
               </service-logic>

         .. tab:: VNF

            **tosca.nodes.VNF**

            Identifies a VNF, can be used to **correlate** any type of **VNF** related **information**.

            https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.Vnf.json

            .. code-block:: json
               :caption: **tosca.nodes.vnf**

               {
                 "description": "This is VNF Node Type",
                 "version": "1.0.0",
                 "derived_from": "tosca.nodes.Root"
               }

            **vnf-netconf-device**

            Represents the VNF information to **establish** a **NETCONF communication**.

            https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/node_type/vnf-netconf-device.json

            .. code-block:: json
               :caption: **vnf-netconf-device**

               {
                 "description": "This is VNF Device with Netconf  Capability",
                 "version": "1.0.0",
                 "capabilities": {
                   "netconf": {
                     "type": "tosca.capabilities.Netconf",
                     "properties": {
                       "login-key": {
                         "required": true,
                         "type": "string",
                         "default": "sdnc"
                       },
                       "login-account": {
                         "required": true,
                         "type": "string",
                         "default": "sdnc-tacacs"
                       },
                       "source": {
                         "required": false,
                         "type": "string",
                         "default": "npm"
                       },
                       "target-ip-address": {
                         "required": true,
                         "type": "string"
                       },
                       "port-number": {
                         "required": true,
                         "type": "integer",
                         "default": 830
                       },
                       "connection-time-out": {
                         "required": false,
                         "type": "integer",
                         "default": 30
                       }
                     }
                   }
                 },
                 "derived_from": "tosca.nodes.Vnf"
               }