Fix doc-rules job and cds-ui build
[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           "dsl_definitions": {
34           "ipam-1": {
35             "type": "token-auth",
36             "url": "http://netbox-nginx.netprog:8080",
37             "token": "Token 0123456789abcdef0123456789abcdef01234567"
38           }
39         }
40
41 .. list-table::
42    :widths: 100
43    :header-rows: 1
44
45    * - basic-auth
46    * - .. code-block:: json
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 .. list-table::
60    :widths: 100
61    :header-rows: 1
62
63    * - ssl-basic-auth
64    * - .. code-block:: json
65
66         {
67           "dsl_definitions": {
68             "ipam-1": {
69               "type": "ssl-basic-auth",
70               "url": "http://localhost:32778",
71               "keyStoreInstance": "JKS or PKCS12",
72               "sslTrust": "trusture",
73               "sslTrustPassword": "trustore password",
74               "sslKey": "keystore",
75               "sslKeyPassword": "keystore password"
76             }
77           }
78         }
79
80 .. list-table::
81    :widths: 100
82    :header-rows: 1
83
84    * - grpc-executor
85    * - .. code-block:: json
86
87         {
88           "dsl_definitions": {
89             "remote-executor": {
90               "type": "token-auth",
91               "host": "cds-command-executor.netprog",
92               "port": "50051",
93               "token": "Basic Y2NzZGthcHBzOmNjc2RrYXBwcw=="
94             }
95           }
96         }
97
98 .. list-table::
99    :header-rows: 1
100
101    * - maria-db
102    * - .. code-block:: json
103
104         {
105           "dsl_definitions": {
106             "netprog-db": {
107               "type": "maria-db",
108               "url": "jdbc:mysql://10.195.196.123:32050/netprog",
109               "username": "netprog",
110               "password": "netprog"
111             }
112           }
113         }