summaryrefslogtreecommitdiffstats
path: root/docs/modelingconcepts/flexible-plug-in.rst
blob: 62749dcec9801b5d5c618a8ac6ca0f16eff1015a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
.. This work is a derivative of https://wiki.onap.org/display/DW/Modeling+Concepts#Concepts-2026349199
.. 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.

External Systems support
-------------------------------------

Interaction with **external systems** is made **dynamic**, removing
development cycle to support new endpoint.

In order to define the external system information, TOSCA provides
**dsl_definitions**. Link to TOSCA spec `info 1
<http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.2/csd01/TOSCA-Simple-Profile-YAML-v1.2-csd01.html#_Toc494454160>`_,
`info 2 <http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.2/csd01/TOSCA-Simple-Profile-YAML-v1.2-csd01.html#_Toc494454173>`_.

Use cases:

* Resource resolution using **REST** (see tab Node Type) or **SQL** (see tab Node Type) external systems
* **gRPC** is supported for remote execution
* Any REST endpoint can be dynamically injected as part of the scripting framework.

Here are some examples on how to populate the system information within the package:

.. list-table::
   :widths: 100
   :header-rows: 1

   * - token-auth
   * - .. code-block:: JSON

            {
             . . .
             "dsl_definitions": {
             "ipam-1": {
                "type": "token-auth",
                "url": "http://netbox-nginx.netprog:8080",
                "token": "Token 0123456789abcdef0123456789abcdef01234567"
             }
            }

.. list-table::
   :widths: 100
   :header-rows: 1

   * - basic-auth
   * - .. code-block:: JSON

            {
             . . .
             "dsl_definitions": {
                "ipam-1": {
                   "type": "basic-auth",
                   "url": "http://localhost:8080",
                   "username": "bob",
                   "password": "marley"
                }
             }
             . . .
            }

.. list-table::
   :widths: 100
   :header-rows: 1

   * - ssl-basic-auth
   * - .. code-block:: JSON

            {
             . . .
             "dsl_definitions": {
                "ipam-1": {
                   "type" : "ssl-basic-auth",
                   "url" : "http://localhost:32778",
                   "keyStoreInstance": "JKS or PKCS12",
                   "sslTrust": "trusture",
                   "sslTrustPassword": "trustore password",
                   "sslKey": "keystore",
                   "sslKeyPassword: "keystore password"
                }
             }
             . . .
            }
         
.. list-table::
   :widths: 100
   :header-rows: 1

   * - grpc-executor
   * - .. code-block:: JSON

            {
             . . .
             "dsl_definitions": {
             "remote-executor": {
                "type": "token-auth",
                "host": "cds-command-executor.netprog",
                "port": "50051",
                "token": "Basic Y2NzZGthcHBzOmNjc2RrYXBwcw=="
             },
             }
             . . .
            }

.. list-table::
   :header-rows: 1

   * - maria-db
   * - .. code-block:: JSON

            {
             . . .
             "dsl_definitions": {
                "netprog-db": {
                   "type": "maria-db",
                   "url": "jdbc:mysql://10.195.196.123:32050/netprog",
                   "username": "netprog",
                   "password": "netprog"
                }
             }
             . . .
            }