598cd451ed44078fbe1eeb789035535ea73a85c0
[ccsdk/cds.git] / docs / modelingconcepts / external-system.rst
1 .. This work is a derivative of https://wiki.onap.org/display/DW/Modeling+Concepts#Concepts-2026349199
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 .. _external_system:
7
8 External Systems support
9 ------------------------
10
11 Interaction with **external systems** is made **dynamic** and **plug-able**
12 removing development cycle to support new endpoint.
13 In order to share the external system information, TOSCA provides a way to create macros using **dsl_definitions**:
14 Link to TOSCA spec:
15 `info 1 <http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.2/csd01/TOSCA-Simple-Profile-YAML-v1.2-csd01.html#_Toc494454160>`_,
16 `info 2 <http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.2/csd01/TOSCA-Simple-Profile-YAML-v1.2-csd01.html#_Toc494454173>`_.
17
18 Use cases:
19 * Resource resolution using **REST** (see tab Node Type) or **SQL** (see tab Node Type) external systems
20 * **gRPC** is supported for remote execution
21 * Any REST endpoint can be dynamically injected as part of the scripting framework.
22
23 Here are some examples on how to populate the system information within the package:
24
25 .. list-table::
26    :widths: 100
27    :header-rows: 1
28
29    * - token-auth
30    * - .. code-block:: json
31
32         {
33           . . .
34           "dsl_definitions": {
35           "ipam-1": {
36             "type": "token-auth",
37             "url": "http://netbox-nginx.netprog:8080",
38             "token": "Token 0123456789abcdef0123456789abcdef01234567"
39           }
40         }
41
42 .. list-table::
43    :widths: 100
44    :header-rows: 1
45
46    * - basic-auth
47    * - .. code-block:: json
48
49         {
50           . . .
51           "dsl_definitions": {
52             "ipam-1": {
53               "type": "basic-auth",
54               "url": "http://localhost:8080",
55               "username": "bob",
56               "password": "marley"
57             }
58           }
59           . . .
60         }
61
62 .. list-table::
63    :widths: 100
64    :header-rows: 1
65
66    * - ssl-basic-auth
67    * - .. code-block:: json
68
69         {
70           . . .
71           "dsl_definitions": {
72             "ipam-1": {
73               "type" : "ssl-basic-auth",
74               "url" : "http://localhost:32778",
75               "keyStoreInstance": "JKS or PKCS12",
76               "sslTrust": "trusture",
77               "sslTrustPassword": "trustore password",
78               "sslKey": "keystore",
79               "sslKeyPassword: "keystore password"
80             }
81           }
82           . . .
83         }
84
85 .. list-table::
86    :widths: 100
87    :header-rows: 1
88
89    * - grpc-executor
90    * - .. code-block:: json
91
92         {
93           . . .
94           "dsl_definitions": {
95             "remote-executor": {
96               "type": "token-auth",
97               "host": "cds-command-executor.netprog",
98               "port": "50051",
99               "token": "Basic Y2NzZGthcHBzOmNjc2RrYXBwcw=="
100             }
101           }
102           . . .
103         }
104
105 .. list-table::
106    :header-rows: 1
107
108    * - maria-db
109    * - .. code-block:: json
110
111         {
112           . . .
113           "dsl_definitions": {
114             "netprog-db": {
115               "type": "maria-db",
116               "url": "jdbc:mysql://10.195.196.123:32050/netprog",
117               "username": "netprog",
118               "password": "netprog"
119             }
120           }
121           . . .
122         }