diff options
author | Singal, Kapil (ks220y) <ks220y@att.com> | 2020-09-24 12:47:56 -0400 |
---|---|---|
committer | Singal, Kapil (ks220y) <ks220y@att.com> | 2020-09-24 18:07:12 -0400 |
commit | f1aafc40ad8f15b61faa3631e5a56fcf7c34bf49 (patch) | |
tree | 27b4a52b99472d4781814751f4c46343b82960a5 /docs/datadictionary | |
parent | 2b0442d1d2e721c4bf762bb2a3e75bc7606f9fcf (diff) |
Refactoring Docs
Issue-ID: CCSDK-2846
Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com>
Change-Id: I34e469deb914fc4e452159a2c3419270f8eb97bc
Diffstat (limited to 'docs/datadictionary')
18 files changed, 0 insertions, 666 deletions
diff --git a/docs/datadictionary/complexResponse.rst b/docs/datadictionary/complexResponse.rst deleted file mode 100644 index 3864c48e2..000000000 --- a/docs/datadictionary/complexResponse.rst +++ /dev/null @@ -1,23 +0,0 @@ -.. This work is licensed under a Creative Commons Attribution 4.0 International License. -.. http://creativecommons.org/licenses/by/4.0 -.. Copyright (C) 2019 IBM. - -complex Response code -===================== - -.. code-block:: json - :linenos: - - { - "id": 4, - "address": "192.168.10.2/32", - "vrf": null, - "tenant": null, - "status": 1, - "role": null, - "interface": null, - "description": "", - "nat_inside": null, - "created": "2018-08-30", - "last_updated": "2018-08-30T14:59:05.277820Z" - } diff --git a/docs/datadictionary/create_netbox_ip_address.rst b/docs/datadictionary/create_netbox_ip_address.rst deleted file mode 100644 index 3ba733a18..000000000 --- a/docs/datadictionary/create_netbox_ip_address.rst +++ /dev/null @@ -1,38 +0,0 @@ -.. This work is licensed under a Creative Commons Attribution 4.0 International License. -.. http://creativecommons.org/licenses/by/4.0 -.. Copyright (C) 2019 IBM. - -create_netbox_ip_address code -============================= - -.. code-block:: json - - { - "tags" : "oam-local-ipv4-address", - "name" : "create_netbox_ip", - "property" : { - "description" : "netbox ip", - "type" : "dt-netbox-ip" - }, - "updated-by" : "adetalhouet", - "sources" : { - "config-data" : { - "type" : "source-rest", - "properties" : { - "type" : "JSON", - "verb" : "POST", - "endpoint-selector" : "ipam-1", - "url-path" : "/api/ipam/prefixes/$prefixId/available-ips/", - "path" : "", - "input-key-mapping" : { - "prefixId" : "prefix-id" - }, - "output-key-mapping" : { - "address" : "address", - "id" : "id" - }, - "key-dependencies" : [ "prefix-id" ] - } - } - } - } diff --git a/docs/datadictionary/dbsystemcode.rst b/docs/datadictionary/dbsystemcode.rst deleted file mode 100644 index 22bdb9732..000000000 --- a/docs/datadictionary/dbsystemcode.rst +++ /dev/null @@ -1,19 +0,0 @@ -.. This work is licensed under a Creative Commons Attribution 4.0 International License. -.. http://creativecommons.org/licenses/by/4.0 -.. Copyright (C) 2019 IBM. - -Dbsystemcode -============ -.. code-block:: json - :linenos: - - { - "dsl_definitions": { - "dynamic-db-source": { - "type": "maria-db", - "url": "jdbc:mysql://localhost:3306/sdnctl", - "username": "<username>", - "password": "<password>" - } - } - } diff --git a/docs/datadictionary/dt-netbox-ip.rst b/docs/datadictionary/dt-netbox-ip.rst deleted file mode 100644 index 6dc3c8464..000000000 --- a/docs/datadictionary/dt-netbox-ip.rst +++ /dev/null @@ -1,25 +0,0 @@ -.. This work is licensed under a Creative Commons Attribution 4.0 International License. -.. http://creativecommons.org/licenses/by/4.0 -.. Copyright (C) 2019 IBM. - -dt-netbox-ip code -================= - -.. code-block:: none - :linenos: - - { - "version": "1.0.0", - "description": "This is Netbox IP Data Type", - "properties": { - "address": { - "required": true, - "type": "string" - }, - "id": { - "required": true, - "type": "integer" - } - }, - "derived_from": "tosca.datatypes.Root" - } diff --git a/docs/datadictionary/index.rst b/docs/datadictionary/index.rst deleted file mode 100644 index 4039cca6d..000000000 --- a/docs/datadictionary/index.rst +++ /dev/null @@ -1,70 +0,0 @@ -.. This work is licensed under a Creative Commons Attribution 4.0 International License. -.. http://creativecommons.org/licenses/by/4.0 -.. Copyright (C) 2019 IBM. - -Resource Definition -------------------- -.. toctree:: - :maxdepth: 1 - -Introduction: -============= -A Resource definition models the how a specific resource can be resolved. - -A resource is a variable/parameter in the context of the service. It can be anything, but it should not be confused with SDC or Openstack resources. - -A Resource definition can have multiple sources to handle resolution in different ways. The main goal of Resource definition is to define re-usable entity that could be shared. - -Creation of Resource definition is a standalone activity, separated from the blueprint design. - -As part of modelling a Resource definition entry, the following generic information should be provided: - -|image0| - - - -Below are properties that all the resource source have will have - -The modeling does allow for data translation between external capability and CDS for both input and output key mapping. - -|image1| - - -Example: -======== - -vf-module-model-customization-uuid and vf-module-label are two data dictionaries. A SQL table, VF_MODULE_MODEL, exist to correlate them. - -Here is how input-key-mapping, output-key-mapping and key-dependencies can be used: - -.. toctree:: - :maxdepth: 1 - - resourcedefinitioncodesnip - - -Resource source: -================ - -Defines the contract to resolve a resource. - -A resource source is modeled, following TOSCA_ node type definition and derives from the Resource_ source. - -Also please click below for resource source available details - -.. toctree:: - :maxdepth: 1 - - resourcesource - -.. _TOSCA: http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/csprd01/TOSCA-Simple-Profile-YAML-v1.0-csprd01.html#DEFN_ENTITY_NODE_TYPE -.. _Resource: https://wiki.onap.org/display/DW/Modeling+Concepts#ModelingConcepts-NodeResourceSource - - -.. |image0| image:: media/mandatory.JPG - :width: 7.88889in - :height: 4.43750in - -.. |image1| image:: media/optional.JPG - :width: 7.88889in - :height: 4.43750in
\ No newline at end of file diff --git a/docs/datadictionary/media/capabilitytable.JPG b/docs/datadictionary/media/capabilitytable.JPG Binary files differdeleted file mode 100644 index 7db4715ea..000000000 --- a/docs/datadictionary/media/capabilitytable.JPG +++ /dev/null diff --git a/docs/datadictionary/media/mandatory.JPG b/docs/datadictionary/media/mandatory.JPG Binary files differdeleted file mode 100644 index 074d20076..000000000 --- a/docs/datadictionary/media/mandatory.JPG +++ /dev/null diff --git a/docs/datadictionary/media/optional.JPG b/docs/datadictionary/media/optional.JPG Binary files differdeleted file mode 100644 index a27502a75..000000000 --- a/docs/datadictionary/media/optional.JPG +++ /dev/null diff --git a/docs/datadictionary/media/resttable.JPG b/docs/datadictionary/media/resttable.JPG Binary files differdeleted file mode 100644 index 568ad0a9f..000000000 --- a/docs/datadictionary/media/resttable.JPG +++ /dev/null diff --git a/docs/datadictionary/media/sqltable.JPG b/docs/datadictionary/media/sqltable.JPG Binary files differdeleted file mode 100644 index 15d246743..000000000 --- a/docs/datadictionary/media/sqltable.JPG +++ /dev/null diff --git a/docs/datadictionary/resourcedefinitioncodesnip.rst b/docs/datadictionary/resourcedefinitioncodesnip.rst deleted file mode 100644 index 785614bc5..000000000 --- a/docs/datadictionary/resourcedefinitioncodesnip.rst +++ /dev/null @@ -1,51 +0,0 @@ -.. This work is licensed under a Creative Commons Attribution 4.0 International License. -.. http://creativecommons.org/licenses/by/4.0 -.. Copyright (C) 2019 IBM. - -Source Capability Code -====================== - -.. code-block:: json - :linenos: - - { - "description": "This is Component Resource Source Node Type", - "version": "1.0.0", - "properties": { - "script-type": { - "required": true, - "type": "string", - "default": "kotlin", - "constraints": [ - { - "valid_values": [ - "kotlin", - "jython" - ] - } - ] - }, - "script-class-reference": { - "description": "Capability reference name for internal and kotlin, for jython script file path", - "required": true, - "type": "string" - }, - "instance-dependencies": { - "required": false, - "description": "Instance dependency Names to Inject to Kotlin / Jython Script.", - "type": "list", - "entry_schema": { - "type": "string" - } - }, - "key-dependencies": { - "description": "Resource Resolution dependency dictionary names.", - "required": true, - "type": "list", - "entry_schema": { - "type": "string" - } - } - }, - "derived_from": "tosca.nodes.ResourceSource" - } diff --git a/docs/datadictionary/resourcesource.rst b/docs/datadictionary/resourcesource.rst deleted file mode 100644 index 4d4619a0e..000000000 --- a/docs/datadictionary/resourcesource.rst +++ /dev/null @@ -1,155 +0,0 @@ -.. This work is licensed under a Creative Commons Attribution 4.0 International License. -.. http://creativecommons.org/licenses/by/4.0 -.. Copyright (C) 2019 IBM. - -Resource Source ---------------- - -Input: -====== -Expects the value to be provided as input to the request. - - -.. code-block:: json - :linenos: - - { - "source-input" : - { - "description": "This is Input Resource Source Node Type", - "version": "1.0.0", - "properties": {}, - "derived_from": "tosca.nodes.ResourceSource" - } - } - - - -Default: -======== -Expects the value to be defaulted in the model itself. - - -.. code-block:: json - :linenos: - - { - "source-default" : - { - "description": "This is Default Resource Source Node Type", - "version": "1.0.0", - "properties": {}, - "derived_from": "tosca.nodes.ResourceSource" - } - } - - -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. - -|image0| - -.. |image0| image:: media/sqltable.JPG - :width: 7.88889in - :height: 4.43750in - -.. toctree:: - :maxdepth: 1 - - sourceprimarydbcode - -Connection to a specific database can be expressed through the endpoint-selector property, which refers to a macro defining the information about the database the connect to. Understand TOSCA Macro in the context of CDS. - -.. toctree:: - :maxdepth: 1 - - dbsystemcode - - -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. - -|image1| - -.. |image1| image:: media/resttable.JPG - :width: 7.88889in - :height: 4.43750in - -.. toctree:: - :maxdepth: 1 - - restsourcecode - -Connection to a specific REST system can be expressed through the endpoint-selector property, which refers to a macro defining the information about the REST system the connect to. Understand TOSCA Macro in the context of CDS. - -Few ways are available to authenticate to the REST system: - - * token-auth - * basic-auth - * ssl-basic-auth - -For source code of Authentication click below link: - -.. toctree:: - :maxdepth: 1 - - restauth - -Capability: -=========== - -Expects a script to be provided. - -|image2| - -.. |image2| image:: media/capabilitytable.JPG - :width: 7.88889in - :height: 4.43750in - - -.. toctree:: - :maxdepth: 1 - - sourcecapabilitycode - -Complex Type: -============= - -Value will be resolved through REST., and output will be a complex type. - -Modeling reference: Modeling Concepts#rest - -In this example, we're making a POST request to an IPAM system with no payload. - -Some ingredients are required to perform the query, in this case, $prefixId. Hence It is provided as an input-key-mapping and defined as a key-dependencies. Please refer to the modeling guideline for more in depth understanding. - -As part of this request, the expected response will be as below. - -.. toctree:: - :maxdepth: 1 - - complexResponse - -What is of interest is the address and id fields. For the process to return these two values, we need to create a custom data-type, as bellow - -.. toctree:: - :maxdepth: 1 - - dt-netbox-ip - -The type of the data dictionary will be dt-netbox-ip. - -To tell the resolution framework what is of interest in the response, the output-key-mapping section is used. The process will map the output-key-mapping to the defined data-type. - -.. toctree:: - :maxdepth: 1 - - create_netbox_ip_address
\ No newline at end of file diff --git a/docs/datadictionary/restauth.rst b/docs/datadictionary/restauth.rst deleted file mode 100644 index 8051a6ae2..000000000 --- a/docs/datadictionary/restauth.rst +++ /dev/null @@ -1,60 +0,0 @@ -.. This work is licensed under a Creative Commons Attribution 4.0 International License. -.. http://creativecommons.org/licenses/by/4.0 -.. Copyright (C) 2019 IBM. - - -Resource Rest Authentication ----------------------------- - -token-auth: -~~~~~~~~~~~ - -.. code-block:: json - :linenos: - - { - "dsl_definitions": { - "dynamic-rest-source": { - "type" : "token-auth", - "url" : "http://localhost:32778", - "token" : "<token>" - } - } - } - -basic-auth: -~~~~~~~~~~~ - -.. code-block:: json - :linenos: - - { - "dsl_definitions": { - "dynamic-rest-source": { - "type" : "basic-auth", - "url" : "http://localhost:32778", - "username" : "<username>", - "password": "<password>" - } - } - } - -ssl-basic-auth: -~~~~~~~~~~~~~~~ - -.. code-block:: json - :linenos: - - { - "dsl_definitions": { - "dynamic-rest-source": { - "type" : "ssl-basic-auth", - "url" : "http://localhost:32778", - "keyStoreInstance": "JKS or PKCS12", - "sslTrust": "trusture", - "sslTrustPassword": "<password>", - "sslKey": "keystore", - "sslKeyPassword": "<password>" - } - } - } diff --git a/docs/datadictionary/restsourcecode.rst b/docs/datadictionary/restsourcecode.rst deleted file mode 100644 index c59bcd23a..000000000 --- a/docs/datadictionary/restsourcecode.rst +++ /dev/null @@ -1,92 +0,0 @@ -.. This work is licensed under a Creative Commons Attribution 4.0 International License. -.. http://creativecommons.org/licenses/by/4.0 -.. Copyright (C) 2019 IBM. - -Rest Source Code: -================= - -.. code-block:: json - :linenos: - - { - "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" - } diff --git a/docs/datadictionary/sourcecapabilitycode.rst b/docs/datadictionary/sourcecapabilitycode.rst deleted file mode 100644 index d2f66c7e0..000000000 --- a/docs/datadictionary/sourcecapabilitycode.rst +++ /dev/null @@ -1,44 +0,0 @@ -.. This work is licensed under a Creative Commons Attribution 4.0 International License. -.. http://creativecommons.org/licenses/by/4.0 -.. Copyright (C) 2019 IBM. - -Source Capability Code -====================== - -.. code-block:: json - :linenos: - - { - "description": "This is Component Resource Source Node Type", - "version": "1.0.0", - "properties": { - "script-type": { - "required": true, - "type": "string", - "default": "kotlin", - "constraints": [ - { - "valid_values": [ - "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" - } - diff --git a/docs/datadictionary/sourcedefaultcode.rst b/docs/datadictionary/sourcedefaultcode.rst deleted file mode 100644 index 41c19336c..000000000 --- a/docs/datadictionary/sourcedefaultcode.rst +++ /dev/null @@ -1,16 +0,0 @@ -.. This work is licensed under a Creative Commons Attribution 4.0 International License. -.. http://creativecommons.org/licenses/by/4.0 -.. Copyright (C) 2019 IBM. - -Source Default code -=================== - -.. code-block:: json - :linenos: - - { - "description": "This is Default Resource Source Node Type", - "version": "1.0.0", - "properties": {}, - "derived_from": "tosca.nodes.ResourceSource" - } diff --git a/docs/datadictionary/sourceinputcode.rst b/docs/datadictionary/sourceinputcode.rst deleted file mode 100644 index a70ff6ab9..000000000 --- a/docs/datadictionary/sourceinputcode.rst +++ /dev/null @@ -1,16 +0,0 @@ -.. This work is licensed under a Creative Commons Attribution 4.0 International License. -.. http://creativecommons.org/licenses/by/4.0 -.. Copyright (C) 2019 IBM. - -Source Input code -================= - -.. code-block:: json - :linenos: - - { - "description": "This is Input Resource Source Node Type", - "version": "1.0.0", - "properties": {}, - "derived_from": "tosca.nodes.ResourceSource" - } diff --git a/docs/datadictionary/sourceprimarydbcode.rst b/docs/datadictionary/sourceprimarydbcode.rst deleted file mode 100644 index 2243e0ce0..000000000 --- a/docs/datadictionary/sourceprimarydbcode.rst +++ /dev/null @@ -1,57 +0,0 @@ -.. This work is licensed under a Creative Commons Attribution 4.0 International License. -.. http://creativecommons.org/licenses/by/4.0 -.. Copyright (C) 2019 IBM. - -Source Primary DB Code: -======================= - -.. code-block:: json - :linenos: - - { - "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" - } |