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