aboutsummaryrefslogtreecommitdiffstats
path: root/docs/resourcedefinition
diff options
context:
space:
mode:
authorSingal, Kapil (ks220y) <ks220y@att.com>2020-09-25 17:22:54 -0400
committerKAPIL SINGAL <ks220y@att.com>2020-09-28 16:08:21 +0000
commit51e7c12ccd4889cea181d92b368e1b74622ac769 (patch)
treeef505fab3c2b199da1eb4789ffcb646084462936 /docs/resourcedefinition
parent4218584b7cbfb512179735130bf0559028faea18 (diff)
Refactoring and fixing Docs
Issue-ID: CCSDK-2846 Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com> Change-Id: I67b3270a2052a7f6bc878ba010011f01cb348192
Diffstat (limited to 'docs/resourcedefinition')
-rw-r--r--docs/resourcedefinition/index.rst13
-rw-r--r--docs/resourcedefinition/resourcesource.rst30
2 files changed, 21 insertions, 22 deletions
diff --git a/docs/resourcedefinition/index.rst b/docs/resourcedefinition/index.rst
index a91d5999f..aa83920cb 100644
--- a/docs/resourcedefinition/index.rst
+++ b/docs/resourcedefinition/index.rst
@@ -3,12 +3,12 @@
.. Copyright (C) 2019 IBM.
Resource Definition
--------------------
+===================
.. toctree::
:maxdepth: 2
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.
@@ -21,7 +21,6 @@ As part of modelling a Resource definition entry, the following generic informat
|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.
@@ -30,7 +29,7 @@ The modeling does allow for data translation between external capability and CDS
Example:
-========
+--------
vf-module-model-customization-uuid and vf-module-label are two data dictionaries. A SQL table, VF_MODULE_MODEL, exist to correlate them.
@@ -39,7 +38,7 @@ Here is how input-key-mapping, output-key-mapping and key-dependencies can be us
.. code-block:: json
:linenos:
- {
+ {
"description": "This is Component Resource Source Node Type",
"version": "1.0.0",
"properties": {
@@ -79,11 +78,11 @@ Here is how input-key-mapping, output-key-mapping and key-dependencies can be us
}
},
"derived_from": "tosca.nodes.ResourceSource"
- }
+ }
Resource source:
-================
+----------------
Defines the contract to resolve a resource.
diff --git a/docs/resourcedefinition/resourcesource.rst b/docs/resourcedefinition/resourcesource.rst
index 4b7c8c73e..f05f09c84 100644
--- a/docs/resourcedefinition/resourcesource.rst
+++ b/docs/resourcedefinition/resourcesource.rst
@@ -3,12 +3,12 @@
.. Copyright (C) 2019 IBM.
Resource Source
----------------
+===============
.. toctree::
:maxdepth: 4
Input:
-======
+------
Expects the value to be provided as input to the request.
.. code-block:: json
@@ -25,7 +25,7 @@ Expects the value to be provided as input to the request.
}
Default:
-========
+--------
Expects the value to be defaulted in the model itself.
.. code-block:: json
@@ -42,7 +42,7 @@ Expects the value to be defaulted in the model itself.
}
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.
@@ -56,7 +56,7 @@ CDS is currently deployed along the side of SDNC, hence the primary database con
.. code-block:: json
:linenos:
- {
+ {
"description": "This is Database Resource Source Node Type",
"version": "1.0.0",
"properties": {
@@ -102,7 +102,7 @@ CDS is currently deployed along the side of SDNC, hence the primary database con
}
},
"derived_from": "tosca.nodes.ResourceSource"
- }
+ }
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.
@@ -121,7 +121,7 @@ Connection to a specific database can be expressed through the endpoint-selector
}
Rest:
-=====
+-----
Expects the URI along with the VERB and the payload, if needed.
@@ -135,7 +135,7 @@ CDS is currently deployed along the side of SDNC, hence the default rest connect
.. code-block:: json
:linenos:
- {
+ {
"description": "This is Rest Resource Source Node Type",
"version": "1.0.0",
"properties": {
@@ -216,7 +216,7 @@ CDS is currently deployed along the side of SDNC, hence the default rest connect
}
},
"derived_from": "tosca.nodes.ResourceSource"
- }
+ }
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.
@@ -279,7 +279,7 @@ ssl-basic-auth:
}
Capability:
-===========
+-----------
Expects a script to be provided.
@@ -291,7 +291,7 @@ Expects a script to be provided.
.. code-block:: json
:linenos:
- {
+ {
"description": "This is Component Resource Source Node Type",
"version": "1.0.0",
"properties": {
@@ -331,10 +331,10 @@ Expects a script to be provided.
}
},
"derived_from": "tosca.nodes.ResourceSource"
- }
+ }
Complex Type:
-=============
+-------------
Value will be resolved through REST., and output will be a complex type.
@@ -349,7 +349,7 @@ As part of this request, the expected response will be as below.
.. code-block:: json
:linenos:
- {
+ {
"id": 4,
"address": "192.168.10.2/32",
"vrf": null,
@@ -361,7 +361,7 @@ As part of this request, the expected response will be as below.
"nat_inside": null,
"created": "2018-08-30",
"last_updated": "2018-08-30T14:59:05.277820Z"
- }
+ }
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