DCAE Controller documentation DCAEGEN2-213
[dcaegen2.git] / docs / sections / components / component-specification / common-specification.rst
diff --git a/docs/sections/components/component-specification/common-specification.rst b/docs/sections/components/component-specification/common-specification.rst
new file mode 100755 (executable)
index 0000000..a29610f
--- /dev/null
@@ -0,0 +1,1418 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.\r
+.. http://creativecommons.org/licenses/by/4.0\r
+\r
+.. _common-specification:\r
+\r
+Common Elements of the Component Specification\r
+==============================================\r
+\r
+This page describes the component specification (JSON) sections that are\r
+common to both Docker and CDAP components. Differences for each are\r
+pointed out below. Elements that are very different, and described in\r
+the CDAP or Docker specific pages.\r
+\r
+.. _metadata:\r
+\r
+Component Metadata\r
+------------------\r
+\r
+Metadata refers to the properties found under the ``self`` JSON. This\r
+group of properties is used to uniquely identify this component\r
+specification and identify the component that this specification is used\r
+to capture.\r
+\r
+Example:\r
+\r
+::\r
+\r
+    "self": {\r
+        "version": "1.0.0",\r
+        "name": "asimov.component.kpi_anomaly",\r
+        "description": "Classifies VNF KPI data as anomalous",\r
+        "component_type": "docker"\r
+    },\r
+\r
+``self`` Schema:\r
+\r
++-------------+--------+----------------+\r
+| Property    | Type   | Description    |\r
+| Name        |        |                |\r
++=============+========+================+\r
+| version     | string | *Required*.    |\r
+|             |        | Semantic       |\r
+|             |        | version        |\r
+|             |        | for this       |\r
+|             |        | specification  |\r
++-------------+--------+----------------+\r
+| name        | string | *Required*.    |\r
+|             |        | Full           |\r
+|             |        | name of        |\r
+|             |        | this           |\r
+|             |        | component      |\r
+|             |        | which is       |\r
+|             |        | also           |\r
+|             |        | used as        |\r
+|             |        | this           |\r
+|             |        | component's    |\r
+|             |        | catalog        |\r
+|             |        | id.            |\r
++-------------+--------+----------------+\r
+| description | string | *Required*     |\r
+|             |        | Human-readable |\r
+|             |        | text           |\r
+|             |        | describing     |\r
+|             |        | the            |\r
+|             |        | component      |\r
+|             |        | and the        |\r
+|             |        | components     |\r
+|             |        | functional     |\r
+|             |        | purpose.       |\r
++-------------+--------+----------------+\r
+| component_t\| string | *Required*     |\r
+| ype         |        | Identify       |\r
+|             |        | what           |\r
+|             |        | containe\      |\r
+|             |        | rization       |\r
+|             |        | technolo\      |\r
+|             |        | gy             |\r
+|             |        | this           |\r
+|             |        | componen\      |\r
+|             |        | t              |\r
+|             |        | uses:          |\r
+|             |        | *docker*       |\r
+|             |        | or             |\r
+|             |        | *cdap*.        |\r
+|             |        |                |\r
++-------------+--------+----------------+\r
+\r
+.. _interfaces:\r
+\r
+Interfaces\r
+----------\r
+\r
+Interfaces are the JSON objects found under the ``streams`` key and the\r
+``services`` key. These are used to describe the interfaces that the\r
+component uses and the interfaces that the component provides. The\r
+description of each interface includes the associated :any:`data\r
+format <data-formats>`.\r
+\r
+Streams\r
+~~~~~~~\r
+\r
+-  The ``streams`` JSON is for specifying data produced for consumption\r
+   by other components, and the streams expected to subscribe to that is\r
+   produced by other components. These are “fire and forget” type\r
+   interfaces where the publisher of a stream does not expect or parse a\r
+   response from the subscriber.\r
+-  The term ``stream`` here is abstract and neither refers to “CDAP\r
+   streams” or “DMaaP feeds”. While a stream is very likely a DMaaP\r
+   feed, it could be a direct stream of data being routed via HTTP too.\r
+   It abstractly refers to a sequence of data leaving a publisher.\r
+-  Streams have anonymous publish/subscribe semantics, which decouples\r
+   the production of information from its consumption.\r
+-  In general, components are not aware of who they are communicating\r
+   with.\r
+-  Instead, components that are interested in data, subscribe to the\r
+   relevant stream; components that generate data publish to the\r
+   relevant stream.\r
+-  There can be multiple publishers and subscribers to a stream. Streams\r
+   are intended for unidirectional, streaming communication.\r
+\r
+Streams interfaces that implement an HTTP endpoint must support POST.\r
+\r
+Streams are split into:\r
+\r
++-------------+----+----------+\r
+| Property    | Ty\| Descript\|\r
+| Name        | pe | ion      |\r
++=============+====+==========+\r
+| subscribes  | JS\| *Require\|\r
+|             | ON | d*.      |\r
+|             | li\| List of  |\r
+|             | st | all      |\r
+|             |    | availabl\|\r
+|             |    | e        |\r
+|             |    | stream   |\r
+|             |    | interfac\|\r
+|             |    | es       |\r
+|             |    | that     |\r
+|             |    | this     |\r
+|             |    | componen\|\r
+|             |    | t        |\r
+|             |    | has that |\r
+|             |    | can be   |\r
+|             |    | used for |\r
+|             |    | subscrib\|\r
+|             |    | ing      |\r
++-------------+----+----------+\r
+| publishes   | JS\| *Require\|\r
+|             | ON | d*.      |\r
+|             | li\| List of  |\r
+|             | st | all      |\r
+|             |    | stream   |\r
+|             |    | interfac\|\r
+|             |    | es       |\r
+|             |    | that     |\r
+|             |    | this     |\r
+|             |    | componen\|\r
+|             |    | t        |\r
+|             |    | will     |\r
+|             |    | publish  |\r
+|             |    | onto     |\r
++-------------+----+----------+\r
+\r
+Subscribes\r
+^^^^^^^^^^\r
+\r
+Example:\r
+\r
+.. code:: json\r
+\r
+    "streams": {\r
+        "subscribes": [{\r
+            "format": "dcae.vnf.kpi",\r
+            "version": "1.0.0",\r
+            "route": "/data",        // for CDAP this value is not used\r
+            "type": "http"\r
+        }],\r
+    ...\r
+    }\r
+\r
+This describes that ``asimov.component.kpi_anomaly`` exposes an HTTP\r
+endpoint called ``/data`` which accepts requests that have the data\r
+format of ``dcae.vnf.kpi`` version ``1.0.0``.\r
+\r
+``subscribes`` Schema:\r
+\r
++-------------+----+--------------------+\r
+| Property    | Ty\| Descript\          |\r
+| Name        | pe | ion                |\r
++=============+====+====================+\r
+| format      | st\| *Require\          |\r
+|             | ri\| d*.                |\r
+|             | ng | Data               |\r
+|             |    | format             |\r
+|             |    | id of              |\r
+|             |    | the data           |\r
+|             |    | format             |\r
+|             |    | that is            |\r
+|             |    | used by            |\r
+|             |    | this               |\r
+|             |    | interfac\          |\r
+|             |    | e                  |\r
++-------------+----+--------------------+\r
+| version     | st\| *Require\          |\r
+|             | ri\| d*.                |\r
+|             | ng | Data               |\r
+|             |    | format             |\r
+|             |    | version            |\r
+|             |    | of the             |\r
+|             |    | data               |\r
+|             |    | format             |\r
+|             |    | that is            |\r
+|             |    | used by            |\r
+|             |    | this               |\r
+|             |    | interfac\          |\r
+|             |    | e                  |\r
++-------------+----+--------------------+\r
+| route       | st\| *Require\          |\r
+|             | ri\| d                  |\r
+|             | ng | for HTTP           |\r
+|             |    | and data           |\r
+|             |    | router*.           |\r
+|             |    | The HTTP           |\r
+|             |    | route              |\r
+|             |    | that               |\r
+|             |    | this               |\r
+|             |    | interfac\          |\r
+|             |    | e                  |\r
+|             |    | listens            |\r
+|             |    | on                 |\r
++-------------+----+--------------------+\r
+| config_key  | st\| *Require\          |\r
+|             | ri\| d \                |\r
+|             | ng | for \              |\r
+|             |    | message_router\    |\r
+|             |    | and data \         |\r
+|             |    | router*.           |\r
+|             |    | The HTTP           |\r
+|             |    | route              |\r
+|             |    | that               |\r
+|             |    | this               |\r
+|             |    | interfac\          |\r
+|             |    | e                  |\r
+|             |    | listens            |\r
+|             |    | on                 |\r
++-------------+----+--------------------+\r
+| type        | st\| *Require\          |\r
+|             | ri\| d*.                |\r
+|             | ng | Type of            |\r
+|             |    | stream:            |\r
+|             |    | ``http``           |\r
+|             |    | ,                  |\r
+|             |    | ``message_router`` |\r
+|             |    | ,                  |\r
+|             |    | ``data_router``    |\r
++-------------+----+--------------------+\r
+\r
+.. _message-router:\r
+\r
+Message router\r
+''''''''''''''\r
+\r
+Message router subscribers are http clients rather than http services\r
+and performs a http a ``GET`` call. Thus, message router subscribers\r
+description is structured like message router publishers and requires\r
+``config_key``:\r
+\r
+.. code:: json\r
+\r
+    "streams": {\r
+        "subscribes": [{\r
+            "format": "dcae.some-format",\r
+            "version": "1.0.0",\r
+            "config_key": "some_format_handle",\r
+            "type": "message router"\r
+        }],\r
+    ...\r
+    }\r
+\r
+\r
+.. _data-router:\r
+\r
+Data router\r
+'''''''''''\r
+\r
+Data router subscribers are http or https services that handle ``PUT``\r
+requests from data router. Developers must provide the ``route`` or url\r
+path/endpoint that is expected to handle data router requests. This will\r
+be used to construct the delivery url needed to register the subscriber\r
+to the provisioned feed. Developers must also provide a ``config_key``\r
+because there is dynamic configuration information associated with the\r
+feed that the application will need e.g. username and password. See the\r
+page on :doc:`DMaaP connection objects <../dcae-cli/dmaap-connection-objects>` for more details on\r
+the configuration information.\r
+\r
+Example (not tied to the larger example):\r
+\r
+.. code:: json\r
+\r
+    "streams": {\r
+        "subscribes": [{\r
+            "config_key": "some-sub-dr",\r
+            "format": "sandbox.platform.any",\r
+            "route": "/identity",\r
+            "type": "data_router",\r
+            "version": "0.1.0"\r
+        }],\r
+    ...\r
+    }\r
+\r
+Publishes\r
+^^^^^^^^^\r
+\r
+Example:\r
+\r
+.. code:: json\r
+\r
+    "streams": {\r
+    ...\r
+        "publishes": [{\r
+            "format": "asimov.format.integerClassification",\r
+            "version": "1.0.0",\r
+            "config_key": "prediction",\r
+            "type": "http"\r
+        }]\r
+    },\r
+\r
+This describes that ``asimov.component.kpi_anomaly`` publishes by making\r
+POST requests to streams that support the data format\r
+``asimov.format.integerClassification`` version ``1.0.0``.\r
+\r
+``publishes`` Schema:\r
+\r
++-------------+----+--------------------+\r
+| Property    | Ty\| Descript\          |\r
+| Name        | pe | ion                |\r
++=============+====+====================+\r
+| format      | st\| *Require\          |\r
+|             | ri\| d*.                |\r
+|             | ng | Data               |\r
+|             |    | format             |\r
+|             |    | id of              |\r
+|             |    | the data           |\r
+|             |    | format             |\r
+|             |    | that is            |\r
+|             |    | used by            |\r
+|             |    | this               |\r
+|             |    | interfac\          |\r
+|             |    | e                  |\r
++-------------+----+--------------------+\r
+| version     | st\| *Require\          |\r
+|             | ri\| d*.                |\r
+|             | ng | Data               |\r
+|             |    | format             |\r
+|             |    | version            |\r
+|             |    | of the             |\r
+|             |    | data               |\r
+|             |    | format             |\r
+|             |    | that is            |\r
+|             |    | used by            |\r
+|             |    | this               |\r
+|             |    | interfac\          |\r
+|             |    | e                  |\r
++-------------+----+--------------------+\r
+| config_key  | st\| *Require\          |\r
+|             | ri\| d*.                |\r
+|             | ng | The JSON           |\r
+|             |    | key in             |\r
+|             |    | the                |\r
+|             |    | generate\          |\r
+|             |    | d                  |\r
+|             |    | applicat           |\r
+|             |    | ion                |\r
+|             |    | configur\          |\r
+|             |    | ation              |\r
+|             |    | that               |\r
+|             |    | will be            |\r
+|             |    | used to            |\r
+|             |    | pass the           |\r
+|             |    | downstre\          |\r
+|             |    | am                 |\r
+|             |    | componen\          |\r
+|             |    | t’s                |\r
+|             |    | (the               |\r
+|             |    | subscrib\          |\r
+|             |    | er’s)              |\r
+|             |    | connecti\          |\r
+|             |    | on                 |\r
+|             |    | informat\          |\r
+|             |    | ion.               |\r
++-------------+----+--------------------+\r
+| type        | st\| *Require\          |\r
+|             | ri\| d*.                |\r
+|             | ng | Type of            |\r
+|             |    | stream:            |\r
+|             |    | ``http``           |\r
+|             |    | ,                  |\r
+|             |    | ``message_router`` |\r
+|             |    | ,                  |\r
+|             |    | ``data_router``    |\r
++-------------+----+--------------------+\r
+\r
+.. message-router-1:\r
+\r
+Message router\r
+''''''''''''''\r
+\r
+Message router publishers are http clients of DMaap message_router.\r
+Developers must provide a ``config_key`` because there is dynamic\r
+configuration information associated with the feed that the application\r
+will need to receive e.g. topic url, username, password. See the page on\r
+:doc:`DMaaP connection objects <../dcae-cli/dmaap-connection-objects>` for more details on\r
+the configuration information.\r
+\r
+Example (not tied to the larger example):\r
+\r
+.. code:: json\r
+\r
+    "streams": {\r
+    ...\r
+        "publishes": [{\r
+            "config_key": "some-pub-mr",\r
+            "format": "sandbox.platform.any",\r
+            "type": "message_router",\r
+            "version": "0.1.0"\r
+        }]\r
+    }\r
+\r
+.. data-router-1:\r
+\r
+Data router\r
+'''''''''''\r
+\r
+Data router publishers are http clients that make ``PUT`` requests to\r
+data router. Developers must also provide a ``config_key`` because there\r
+is dynamic configuration information associated with the feed that the\r
+application will need to receive e.g. publish url, username, password.\r
+See the page on :doc:`DMaaP connection objects <../dcae-cli/dmaap-connection-objects>` for more details on\r
+the configuration information.\r
+\r
+Example (not tied to the larger example):\r
+\r
+.. code:: json\r
+\r
+    "streams": {\r
+    ...\r
+        "publishes": [{\r
+            "config_key": "some-pub-dr",\r
+            "format": "sandbox.platform.any",\r
+            "type": "data_router",\r
+            "version": "0.1.0"\r
+        }]\r
+    }\r
+\r
+Quick Reference\r
+^^^^^^^^^^^^^^^\r
+\r
+Refer to this :doc:`Quick Reference <streams-grid>` for a\r
+comparison of the Streams ‘Publishes’ and ‘Subscribes’ sections.\r
+\r
+Services\r
+~~~~~~~~\r
+\r
+-  The publish / subscribe model is a very flexible communication\r
+   paradigm, but its many-to-many one-way transport is not appropriate\r
+   for RPC request / reply interactions, which are often required in a\r
+   distributed system.\r
+-  Request / reply is done via a Service, which is defined by a pair of\r
+   messages: one for the request and one for the reply.\r
+\r
+Services are split into:\r
+\r
++-------------+----+----------+\r
+| Property    | Ty\| Descript\|\r
+| Name        | pe | ion      |\r
++=============+====+==========+\r
+| calls       | JS\| *Require\|\r
+|             | ON | d*.      |\r
+|             | li\| List of  |\r
+|             | st | all      |\r
+|             |    | service  |\r
+|             |    | interfac\|\r
+|             |    | es       |\r
+|             |    | that     |\r
+|             |    | this     |\r
+|             |    | componen\|\r
+|             |    | t        |\r
+|             |    | will     |\r
+|             |    | call     |\r
++-------------+----+----------+\r
+| provides    | JS\| *Require\|\r
+|             | ON | d*.      |\r
+|             | li\| List of  |\r
+|             | st | all      |\r
+|             |    | service  |\r
+|             |    | interfac\|\r
+|             |    | es       |\r
+|             |    | that     |\r
+|             |    | this     |\r
+|             |    | componen\|\r
+|             |    | t        |\r
+|             |    | exposes  |\r
+|             |    | and      |\r
+|             |    | provides |\r
++-------------+----+----------+\r
+\r
+Calls\r
+^^^^^\r
+\r
+The JSON ``services/calls`` is for specifying that the component relies\r
+on an HTTP(S) service—the component sends that service an HTTP request,\r
+and that service responds with an HTTP reply. An example of this is how\r
+string matching (SM) depends on the AAI Broker. SM performs a\r
+synchronous REST call to the AAI broker, providing it the VMNAME of the\r
+VNF, and the AAI Broker responds with additional details about the VNF.\r
+This dependency is expressed via ``services/calls``. In contrast, the\r
+output of string matching (the alerts it computes) is sent directly to\r
+policy as a fire-and-forget interface, so that is an example of a\r
+``stream``.\r
+\r
+Example:\r
+\r
+.. code:: json\r
+\r
+    "services": {\r
+        "calls": [{\r
+            "config_key": "vnf-db",\r
+            "request": {\r
+                "format": "dcae.vnf.meta",\r
+                "version": "1.0.0"\r
+                },\r
+            "response": {\r
+                "format": "dcae.vnf.kpi",\r
+                "version": "1.0.0"\r
+                }\r
+        }],\r
+    ...\r
+    }\r
+\r
+This describes that ``asimov.component.kpi_anomaly`` will make HTTP\r
+calls to a downstream component that accepts requests of data format\r
+``dcae.vnf.meta`` version ``1.0.0`` and is expecting the response to be\r
+``dcae.vnf.kpi`` version ``1.0.0``.\r
+\r
+``calls`` Schema:\r
+\r
++-------------+----+----------+\r
+| Property    | Ty\| Descript\|\r
+| Name        | pe | ion      |\r
++=============+====+==========+\r
+| request     | JS\| *Require\|\r
+|             | ON | d*.      |\r
+|             | ob\| Descript\|\r
+|             | je\| ion      |\r
+|             | ct | of the   |\r
+|             |    | expected |\r
+|             |    | request  |\r
+|             |    | for this |\r
+|             |    | downstre\|\r
+|             |    | am       |\r
+|             |    | interfac\|\r
+|             |    | e        |\r
++-------------+----+----------+\r
+| response    | JS\| *Require\|\r
+|             | ON | d*.      |\r
+|             | ob\| Descript\|\r
+|             | je\| ion      |\r
+|             | ct | of the   |\r
+|             |    | expected |\r
+|             |    | response |\r
+|             |    | for this |\r
+|             |    | downstre\|\r
+|             |    | am       |\r
+|             |    | interfac\|\r
+|             |    | e        |\r
++-------------+----+----------+\r
+| config_key  | st\| *Require\|\r
+|             | ri\| d*.      |\r
+|             | ng | The JSON |\r
+|             |    | key in   |\r
+|             |    | the      |\r
+|             |    | generate\|\r
+|             |    | d        |\r
+|             |    | applicat |\r
+|             |    | ion      |\r
+|             |    | configur\|\r
+|             |    | ation    |\r
+|             |    | that     |\r
+|             |    | will be  |\r
+|             |    | used to  |\r
+|             |    | pass the |\r
+|             |    | downstre\|\r
+|             |    | am       |\r
+|             |    | componen |\r
+|             |    | t        |\r
+|             |    | connecti\|\r
+|             |    | on       |\r
+|             |    | informat\|\r
+|             |    | ion.     |\r
++-------------+----+----------+\r
+\r
+The JSON object schema for both ``request`` and ``response``:\r
+\r
++-------------+----+----------+\r
+| Property    | Ty\| Descript\|\r
+| Name        | pe | ion      |\r
++=============+====+==========+\r
+| format      | st\| *Require\|\r
+|             | ri\| d*.      |\r
+|             | ng | Data     |\r
+|             |    | format   |\r
+|             |    | id of    |\r
+|             |    | the data |\r
+|             |    | format   |\r
+|             |    | that is  |\r
+|             |    | used by  |\r
+|             |    | this     |\r
+|             |    | interfac\|\r
+|             |    | e        |\r
++-------------+----+----------+\r
+| version     | st\| *Require\|\r
+|             | ri\| d*.      |\r
+|             | ng | Data     |\r
+|             |    | format   |\r
+|             |    | version  |\r
+|             |    | of the   |\r
+|             |    | data     |\r
+|             |    | format   |\r
+|             |    | that is  |\r
+|             |    | used by  |\r
+|             |    | this     |\r
+|             |    | interfac\|\r
+|             |    | e        |\r
++-------------+----+----------+\r
+\r
+Provides\r
+^^^^^^^^\r
+\r
+Example:\r
+\r
+.. code:: json\r
+\r
+    "services": {\r
+    ...\r
+        "provides": [{\r
+            "route": "/score-vnf",\r
+            "request": {\r
+                "format": "dcae.vnf.meta",\r
+                "version": "1.0.0"\r
+                },\r
+            "response": {\r
+                "format": "asimov.format.integerClassification",\r
+                "version": "1.0.0"\r
+                }\r
+        }]\r
+    },\r
+\r
+This describes that ``asimov.component.kpi_anomaly`` provides a service\r
+interface and it is exposed on the ``/score-vnf`` HTTP endpoint. The\r
+endpoint accepts requests that have the data format ``dcae.vnf.meta``\r
+version ``1.0.0`` and gives back a response of\r
+``asimov.format.integerClassification`` version ``1.0.0``.\r
+\r
+``provides`` Schema for a Docker component:\r
+\r
++-------------+----+----------+\r
+| Property    | Ty\| Descript\|\r
+| Name        | pe | ion      |\r
++=============+====+==========+\r
+| request     | JS\| *Require\|\r
+|             | ON | d*.      |\r
+|             | ob\| Descript\|\r
+|             | je\| ion      |\r
+|             | ct | of the   |\r
+|             |    | expected |\r
+|             |    | request  |\r
+|             |    | for this |\r
+|             |    | interfac\|\r
+|             |    | e        |\r
++-------------+----+----------+\r
+| response    | JS\| *Require\|\r
+|             | ON | d*.      |\r
+|             | ob\| Descript\|\r
+|             | je\| ion      |\r
+|             | ct | of the   |\r
+|             |    | expected |\r
+|             |    | response |\r
+|             |    | for this |\r
+|             |    | interfac\|\r
+|             |    | e        |\r
++-------------+----+----------+\r
+| route       | st\| *Require\|\r
+|             | ri\| d*.      |\r
+|             | ng | The HTTP |\r
+|             |    | route    |\r
+|             |    | that     |\r
+|             |    | this     |\r
+|             |    | interfac\|\r
+|             |    | e        |\r
+|             |    | listens  |\r
+|             |    | on       |\r
++-------------+----+----------+\r
+\r
+The JSON object schema for both ``request`` and ``response``:\r
+\r
++-------------+----+----------+\r
+| Property    | Ty\| Descript\|\r
+| Name        | pe | ion      |\r
++=============+====+==========+\r
+| format      | st\| *Require\|\r
+|             | ri\| d*.      |\r
+|             | ng | Data     |\r
+|             |    | format   |\r
+|             |    | id of    |\r
+|             |    | the data |\r
+|             |    | format   |\r
+|             |    | that is  |\r
+|             |    | used by  |\r
+|             |    | this     |\r
+|             |    | interfac\|\r
+|             |    | e        |\r
++-------------+----+----------+\r
+| version     | st\| *Require\|\r
+|             | ri\| d*.      |\r
+|             | ng | Data     |\r
+|             |    | format   |\r
+|             |    | version  |\r
+|             |    | of the   |\r
+|             |    | data     |\r
+|             |    | format   |\r
+|             |    | that is  |\r
+|             |    | used by  |\r
+|             |    | this     |\r
+|             |    | interfac\|\r
+|             |    | e        |\r
++-------------+----+----------+\r
+\r
+Note, for CDAP, there is a slight variation due to the way CDAP exposes\r
+services:\r
+\r
+::\r
+\r
+          "provides":[                             // note this is a list of JSON\r
+             {  \r
+                "request":{  ...},\r
+                "response":{  ...},\r
+                "service_name":"name CDAP service", \r
+                "service_endpoint":"greet",         // E.g the URL is /services/service_name/methods/service_endpoint\r
+                "verb":"GET"                        // GET, PUT, or POST\r
+             }\r
+          ]\r
+\r
+``provides`` Schema for a CDAP component:\r
+\r
++-------------+----+-----------+\r
+| Property    | Ty\| Descript\ |\r
+| Name        | pe | ion       |\r
++=============+====+===========+\r
+| request     | JS\| *Require\ |\r
+|             | ON | d*.       |\r
+|             | ob\| Descript\ |\r
+|             | je\| ion       |\r
+|             | ct | of the    |\r
+|             |    | expected  |\r
+|             |    | request   |\r
+|             |    | data      |\r
+|             |    | format    |\r
+|             |    | for this  |\r
+|             |    | interfac\ |\r
+|             |    | e         |\r
++-------------+----+-----------+\r
+| response    | JS\| *Require\ |\r
+|             | ON | d*.       |\r
+|             | ob\| Descript\ |\r
+|             | je\| ion       |\r
+|             | ct | of the    |\r
+|             |    | expected  |\r
+|             |    | response  |\r
+|             |    | for this  |\r
+|             |    | interfac\ |\r
+|             |    | e         |\r
++-------------+----+-----------+\r
+| service_nam\| st\| *Require\ |\r
+| e           | ri\| d*.       |\r
+|             | ng | The CDAP  |\r
+|             |    | service   |\r
+|             |    | name (eg  |\r
+|             |    | “Greetin\ |\r
+|             |    | g”)       |\r
++-------------+----+-----------+\r
+| service_end | st\| *Require\ |\r
+| point       | ri\| d*.       |\r
+|             | ng | The CDAP  |\r
+|             |    | service   |\r
+|             |    | endpoint  |\r
+|             |    | for this  |\r
+|             |    | service_n\|\r
+|             |    | ame       |\r
+|             |    | (eg       |\r
+|             |    | “/greet”  |\r
+|             |    | )         |\r
++-------------+----+-----------+\r
+| verb        | st\| *Require\ |\r
+|             | ri\| d*.       |\r
+|             | ng | ‘GET’,    |\r
+|             |    | ‘PUT’ or  |\r
+|             |    | ‘POST’    |\r
++-------------+----+-----------+\r
+\r
+Parameters\r
+----------\r
+\r
+``parameters`` is where to specify the component’s application\r
+configuration parameters that are not connection information.\r
+\r
++---------------+------------+----------------------------------+\r
+| Property Name | Type       | Description                      |\r
++===============+============+==================================+\r
+| parameters    | JSON array | Each entry is a parameter object |\r
++---------------+------------+----------------------------------+\r
+\r
+Parameter object has the following available properties:\r
+\r
++--------------+----+----------+------+\r
+| Property     | Ty\| Descript\| Defa\|\r
+| Name         | pe | ion      | ult  |\r
++==============+====+==========+======+\r
+| name         | st\| *Require\|      |\r
+|              | ri\| d*.      |      |\r
+|              | ng | The      |      |\r
+|              |    | property |      |\r
+|              |    | name     |      |\r
+|              |    | that     |      |\r
+|              |    | will be  |      |\r
+|              |    | used as  |      |\r
+|              |    | the key  |      |\r
+|              |    | in the   |      |\r
+|              |    | generate\|      |\r
+|              |    | d        |      |\r
+|              |    | config   |      |\r
++--------------+----+----------+------+\r
+| value        | an\| *Require\|      |\r
+|              | y  | d*.      |      |\r
+|              |    | The      |      |\r
+|              |    | default  |      |\r
+|              |    | value    |      |\r
+|              |    | for the  |      |\r
+|              |    | given    |      |\r
+|              |    | paramete\|      |\r
+|              |    | r        |      |\r
++--------------+----+----------+------+\r
+| description  | st\| *Require\|      |\r
+|              | ri\| d*.      |      |\r
+|              | ng | Human-re\|      |\r
+|              |    | adable   |      |\r
+|              |    | text     |      |\r
+|              |    | describi\|      |\r
+|              |    | ng       |      |\r
+|              |    | the      |      |\r
+|              |    | paramete\|      |\r
+|              |    | r        |      |\r
+|              |    | like     |      |\r
+|              |    | what its |      |\r
+|              |    | for      |      |\r
++--------------+----+----------+------+\r
+| type         | st\| The      |      |\r
+|              | ri\| required |      |\r
+|              | ng | data     |      |\r
+|              |    | type for |      |\r
+|              |    | the      |      |\r
+|              |    | paramete\|      |\r
+|              |    | r        |      |\r
++--------------+----+----------+------+\r
+| required     | bo\| An       | true |\r
+|              | ol\| optional |      |\r
+|              | ea\| key that |      |\r
+|              | n  | declares |      |\r
+|              |    | a        |      |\r
+|              |    | paramete\|      |\r
+|              |    | r        |      |\r
+|              |    | as       |      |\r
+|              |    | required |      |\r
+|              |    | (true)   |      |\r
+|              |    | or not   |      |\r
+|              |    | (false)  |      |\r
++--------------+----+----------+------+\r
+| constraints  | ar\| The      |      |\r
+|              | ra\| optional |      |\r
+|              | y  | list of  |      |\r
+|              |    | sequence |      |\r
+|              |    | d        |      |\r
+|              |    | constrai\|      |\r
+|              |    | nt       |      |\r
+|              |    | clauses  |      |\r
+|              |    | for the  |      |\r
+|              |    | paramete\|      |\r
+|              |    | r.       |      |\r
+|              |    | See      |      |\r
+|              |    | below    |      |\r
++--------------+----+----------+------+\r
+| entry_schem\ | st\| The      |      |\r
+| a            | ri\| optional |      |\r
+|              | ng | key that |      |\r
+|              |    | is used  |      |\r
+|              |    | to       |      |\r
+|              |    | declare  |      |\r
+|              |    | the name |      |\r
+|              |    | of the   |      |\r
+|              |    | Datatype |      |\r
+|              |    | definiti\|      |\r
+|              |    | on       |      |\r
+|              |    | for      |      |\r
+|              |    | entries  |      |\r
+|              |    | of set   |      |\r
+|              |    | types    |      |\r
+|              |    | such as  |      |\r
+|              |    | the      |      |\r
+|              |    | TOSCA    |      |\r
+|              |    | ‘list’   |      |\r
+|              |    | or       |      |\r
+|              |    | ‘map’.   |      |\r
+|              |    | Only 1   |      |\r
+|              |    | level is |      |\r
+|              |    | supporte\|      |\r
+|              |    | d        |      |\r
+|              |    | at this  |      |\r
+|              |    | time     |      |\r
++--------------+----+----------+------+\r
+| designer_ed\ | bo\| An       | true |\r
+| itable       | ol\| optional |      |\r
+|              | ea\| key that |      |\r
+|              | n  | declares |      |\r
+|              |    | a        |      |\r
+|              |    | paramete\|      |\r
+|              |    | r        |      |\r
+|              |    | to be    |      |\r
+|              |    | editable |      |\r
+|              |    | by       |      |\r
+|              |    | designer |      |\r
+|              |    | (true)   |      |\r
+|              |    | or not   |      |\r
+|              |    | (false)  |      |\r
++--------------+----+----------+------+\r
+| sourced_at_d\| bo\| An       | fals\|\r
+| eployment    | ol\| optional | e    |\r
+|              | ea\| key that |      |\r
+|              | n  | declares |      |\r
+|              |    | a        |      |\r
+|              |    | paramete\|      |\r
+|              |    | r’s      |      |\r
+|              |    | value to |      |\r
+|              |    | be       |      |\r
+|              |    | assigned |      |\r
+|              |    | at       |      |\r
+|              |    | deployme\|      |\r
+|              |    | nt       |      |\r
+|              |    | time     |      |\r
+|              |    | (true)   |      |\r
++--------------+----+----------+------+\r
+| policy_edit\ | bo\| An       | true |\r
+| able         | ol\| optional |      |\r
+|              | ea\| key that |      |\r
+|              | n  | declares |      |\r
+|              |    | a        |      |\r
+|              |    | paramete\|      |\r
+|              |    | r        |      |\r
+|              |    | to be    |      |\r
+|              |    | editable |      |\r
+|              |    | by       |      |\r
+|              |    | policy   |      |\r
+|              |    | (true)   |      |\r
+|              |    | or not   |      |\r
+|              |    | (false)  |      |\r
++--------------+----+----------+------+\r
+| policy_sche\ | ar\| The      |      |\r
+| ma           | ra\| optional |      |\r
+|              | y  | list of  |      |\r
+|              |    | schema   |      |\r
+|              |    | definiti\|      |\r
+|              |    | ons      |      |\r
+|              |    | used for |      |\r
+|              |    | policy.  |      |\r
+|              |    | See      |      |\r
+|              |    | below    |      |\r
++--------------+----+----------+------+\r
+\r
+Example:\r
+\r
+.. code:: json\r
+\r
+    "parameters": [\r
+        {\r
+            "name": "threshold",\r
+            "value": 0.75,\r
+            "description": "Probability threshold to exceed to be anomalous"\r
+        }\r
+    ]\r
+\r
+Many of the parameter properties have been copied from TOSCA model\r
+property definitions and are to be used for service design composition\r
+and policy creation. See `section 3.5.8 *Property\r
+definition* <http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.1/TOSCA-Simple-Profile-YAML-v1.1.html>`__.\r
+\r
+The property ``constraints`` is a list of objects where each constraint\r
+object:\r
+\r
++--------------+----+----------+\r
+| Property     | Ty\| Descript\|\r
+| Name         | pe | ion      |\r
++==============+====+==========+\r
+| equal        |    | Constrai\|\r
+|              |    | ns       |\r
+|              |    | a        |\r
+|              |    | property |\r
+|              |    | or       |\r
+|              |    | paramete\|\r
+|              |    | r        |\r
+|              |    | to a     |\r
+|              |    | value    |\r
+|              |    | equal to |\r
+|              |    | (‘=’)    |\r
+|              |    | the      |\r
+|              |    | value    |\r
+|              |    | declared |\r
++--------------+----+----------+\r
+| greater_tha\ | nu\| Constrai\|\r
+| n            | mb\| ns       |\r
+|              | er | a        |\r
+|              |    | property |\r
+|              |    | or       |\r
+|              |    | paramete |\r
+|              |    | r        |\r
+|              |    | to a     |\r
+|              |    | value    |\r
+|              |    | greater  |\r
+|              |    | than     |\r
+|              |    | (‘>’)    |\r
+|              |    | the      |\r
+|              |    | value    |\r
+|              |    | declared |\r
++--------------+----+----------+\r
+| greater_or_e\| nu\| Constrai\|\r
+| qual         | mb\| ns       |\r
+|              | er | a        |\r
+|              |    | property |\r
+|              |    | or       |\r
+|              |    | paramete\|\r
+|              |    | r        |\r
+|              |    | to a     |\r
+|              |    | value    |\r
+|              |    | greater  |\r
+|              |    | than or  |\r
+|              |    | equal to |\r
+|              |    | (‘>=’)   |\r
+|              |    | the      |\r
+|              |    | value    |\r
+|              |    | declared |\r
++--------------+----+----------+\r
+| less_than    | nu\| Constrai\|\r
+|              | mb\| ns       |\r
+|              | er | a        |\r
+|              |    | property |\r
+|              |    | or       |\r
+|              |    | paramete\|\r
+|              |    | r        |\r
+|              |    | to a     |\r
+|              |    | value    |\r
+|              |    | less     |\r
+|              |    | than     |\r
+|              |    | (‘<’)    |\r
+|              |    | the      |\r
+|              |    | value    |\r
+|              |    | declared |\r
++--------------+----+----------+\r
+| less_or_equ\ | nu\| Constrai\|\r
+| al           | mb\| ns       |\r
+|              | er | a        |\r
+|              |    | property |\r
+|              |    | or       |\r
+|              |    | paramete\|\r
+|              |    | r        |\r
+|              |    | to a     |\r
+|              |    | value    |\r
+|              |    | less     |\r
+|              |    | than or  |\r
+|              |    | equal to |\r
+|              |    | (‘<=’)   |\r
+|              |    | the      |\r
+|              |    | value    |\r
+|              |    | declared |\r
++--------------+----+----------+\r
+| valid_value\ | ar\| Constrai\|\r
+| s            | ra\| ns       |\r
+|              | y  | a        |\r
+|              |    | property |\r
+|              |    | or       |\r
+|              |    | paramete\|\r
+|              |    | r        |\r
+|              |    | to a     |\r
+|              |    | value    |\r
+|              |    | that is  |\r
+|              |    | in the   |\r
+|              |    | list of  |\r
+|              |    | declared |\r
+|              |    | values   |\r
++--------------+----+----------+\r
+| length       | nu\| Constrai\|\r
+|              | mb\| ns       |\r
+|              | er | the      |\r
+|              |    | property |\r
+|              |    | or       |\r
+|              |    | paramete\|\r
+|              |    | r        |\r
+|              |    | to a     |\r
+|              |    | value of |\r
+|              |    | a given  |\r
+|              |    | length   |\r
++--------------+----+----------+\r
+| min_length   | nu\| Constrai\|\r
+|              | mb\| ns       |\r
+|              | er | the      |\r
+|              |    | property |\r
+|              |    | or       |\r
+|              |    | paramete\|\r
+|              |    | r        |\r
+|              |    | to a     |\r
+|              |    | value to |\r
+|              |    | a        |\r
+|              |    | minimum  |\r
+|              |    | length   |\r
++--------------+----+----------+\r
+| max_length   | nu\| Constrai\|\r
+|              | mb\| ns       |\r
+|              | er | the      |\r
+|              |    | property |\r
+|              |    | or       |\r
+|              |    | paramete\|\r
+|              |    | r        |\r
+|              |    | to a     |\r
+|              |    | value to |\r
+|              |    | a        |\r
+|              |    | maximum  |\r
+|              |    | length   |\r
++--------------+----+----------+\r
+\r
+``threshold`` is the configuration parameter and will get set to 0.75\r
+when the configuration gets generated.\r
+\r
+The property ``policy_schema`` is a list of objects where each\r
+policy_schema object:\r
+\r
++-------------+----+----------+------+\r
+| Property    | Ty\| Descript\| Defa\|\r
+| Name        | pe | ion      | ult  |\r
++=============+====+==========+======+\r
+| name        | st\| *Require\|      |\r
+|             | ri\| d*.      |      |\r
+|             | ng | paramete\|      |\r
+|             |    | r        |      |\r
+|             |    | name     |      |\r
++-------------+----+----------+------+\r
+| value       | st\| default  |      |\r
+|             | ri\| value    |      |\r
+|             | ng | for the  |      |\r
+|             |    | paramete\|      |\r
+|             |    | r        |      |\r
++-------------+----+----------+------+\r
+| description | st\| paramete\|      |\r
+|             | ri\| r        |      |\r
+|             | ng | descript\|      |\r
+|             |    | ion      |      |\r
++-------------+----+----------+------+\r
+| type        | en\| *Require\|      |\r
+|             | um | d*.      |      |\r
+|             |    | data     |      |\r
+|             |    | type of  |      |\r
+|             |    | the      |      |\r
+|             |    | paramete\|      |\r
+|             |    | r,       |      |\r
+|             |    | ‘string’ |      |\r
+|             |    | ,        |      |\r
+|             |    | ‘number’ |      |\r
+|             |    | ,        |      |\r
+|             |    | ‘boolean |      |\r
+|             |    | ’,       |      |\r
+|             |    | ‘datetim\|      |\r
+|             |    | e’,      |      |\r
+|             |    | ‘list’,  |      |\r
+|             |    | or ‘map’ |      |\r
++-------------+----+----------+------+\r
+| required    | bo\| is       | true |\r
+|             | ol\| paramete\|      |\r
+|             | ea\| r        |      |\r
+|             | n  | required |      |\r
+|             |    | or not?  |      |\r
++-------------+----+----------+------+\r
+| constraints | ar\| The      |      |\r
+|             | ra\| optional |      |\r
+|             | y  | list of  |      |\r
+|             |    | sequence\|      |\r
+|             |    | d        |      |\r
+|             |    | constrai\|      |\r
+|             |    | nt       |      |\r
+|             |    | clauses  |      |\r
+|             |    | for the  |      |\r
+|             |    | paramete\|      |\r
+|             |    | r.       |      |\r
+|             |    | See      |      |\r
+|             |    | above    |      |\r
++-------------+----+----------+------+\r
+| entry_schem\| st\| The      |      |\r
+| a           | ri\| optional |      |\r
+|             | ng | key that |      |\r
+|             |    | is used  |      |\r
+|             |    | to       |      |\r
+|             |    | declare  |      |\r
+|             |    | the name |      |\r
+|             |    | of the   |      |\r
+|             |    | Datatype |      |\r
+|             |    | definiti\|      |\r
+|             |    | on       |      |\r
+|             |    | for      |      |\r
+|             |    | certain  |      |\r
+|             |    | types.   |      |\r
+|             |    | entry_sc\|      |\r
+|             |    | hema     |      |\r
+|             |    | must be  |      |\r
+|             |    | defined  |      |\r
+|             |    | when the |      |\r
+|             |    | type is  |      |\r
+|             |    | either   |      |\r
+|             |    | list or  |      |\r
+|             |    | map. If  |      |\r
+|             |    | the type |      |\r
+|             |    | is list  |      |\r
+|             |    | and the  |      |\r
+|             |    | entry    |      |\r
+|             |    | type is  |      |\r
+|             |    | a simple |      |\r
+|             |    | type     |      |\r
+|             |    | (string, |      |\r
+|             |    | number,  |      |\r
+|             |    | bookean, |      |\r
+|             |    | datetime |      |\r
+|             |    | ),       |      |\r
+|             |    | follow   |      |\r
+|             |    | with an  |      |\r
+|             |    | string   |      |\r
+|             |    | to       |      |\r
+|             |    | describe |      |\r
+|             |    | the      |      |\r
+|             |    | entry    |      |\r
++-------------+----+----------+------+\r
+|             | If |          |      |\r
+|             | th\|          |      |\r
+|             | e  |          |      |\r
+|             | ty\|          |      |\r
+|             | pe |          |      |\r
+|             | is |          |      |\r
+|             | li\|          |      |\r
+|             | st |          |      |\r
+|             | an\|          |      |\r
+|             | d  |          |      |\r
+|             | th\|          |      |\r
+|             | e  |          |      |\r
+|             | en\|          |      |\r
+|             | tr\|          |      |\r
+|             | y  |          |      |\r
+|             | ty\|          |      |\r
+|             | pe |          |      |\r
+|             | is |          |      |\r
+|             | a  |          |      |\r
+|             | ma\|          |      |\r
+|             | p, |          |      |\r
+|             | fo\|          |      |\r
+|             | ll\|          |      |\r
+|             | ow |          |      |\r
+|             | wi\|          |      |\r
+|             | th |          |      |\r
+|             | an |          |      |\r
+|             | ar\|          |      |\r
+|             | ra\|          |      |\r
+|             | y  |          |      |\r
+|             | to |          |      |\r
+|             | de\|          |      |\r
+|             | sc\|          |      |\r
+|             | ri\|          |      |\r
+|             | be |          |      |\r
+|             | th\|          |      |\r
+|             | e  |          |      |\r
+|             | ke\|          |      |\r
+|             | ys |          |      |\r
+|             | fo\|          |      |\r
+|             | r  |          |      |\r
+|             | th\|          |      |\r
+|             | e  |          |      |\r
+|             | en\|          |      |\r
+|             | tr\|          |      |\r
+|             | y  |          |      |\r
+|             | ma\|          |      |\r
+|             | p  |          |      |\r
++-------------+----+----------+------+\r
+|             | If |          |      |\r
+|             | th\|          |      |\r
+|             | e  |          |      |\r
+|             | ty\|          |      |\r
+|             | pe |          |      |\r
+|             | is |          |      |\r
+|             | li\|          |      |\r
+|             | st |          |      |\r
+|             | an\|          |      |\r
+|             | d  |          |      |\r
+|             | th\|          |      |\r
+|             | e  |          |      |\r
+|             | en\|          |      |\r
+|             | tr\|          |      |\r
+|             | y  |          |      |\r
+|             | ty\|          |      |\r
+|             | pe |          |      |\r
+|             | is |          |      |\r
+|             | a  |          |      |\r
+|             | li\|          |      |\r
+|             | st |          |      |\r
+|             | ,  |          |      |\r
+|             | th\|          |      |\r
+|             | at |          |      |\r
+|             | is |          |      |\r
+|             | no\|          |      |\r
+|             | t  |          |      |\r
+|             | cu\|          |      |\r
+|             | rr\|          |      |\r
+|             | en\|          |      |\r
+|             | tl\|          |      |\r
+|             | y  |          |      |\r
+|             | su\|          |      |\r
+|             | pp\|          |      |\r
+|             | or\|          |      |\r
+|             | te\|          |      |\r
+|             | d \|          |      |\r
++-------------+----+----------+------+\r
+|             | If |          |      |\r
+|             | th\|          |      |\r
+|             | e  |          |      |\r
+|             | ty\|          |      |\r
+|             | pe |          |      |\r
+|             | is |          |      |\r
+|             | ma\|          |      |\r
+|             | p, |          |      |\r
+|             | fo\|          |      |\r
+|             | ll\|          |      |\r
+|             | ow |          |      |\r
+|             | wi\|          |      |\r
+|             | th |          |      |\r
+|             | an |          |      |\r
+|             | ar\|          |      |\r
+|             | ay |          |      |\r
+|             | to |          |      |\r
+|             | de\|          |      |\r
+|             | sc\|          |      |\r
+|             | ri\|          |      |\r
+|             | be |          |      |\r
+|             | th\|          |      |\r
+|             | e  |          |      |\r
+|             | ke\|          |      |\r
+|             | ys |          |      |\r
+|             | fo\|          |      |\r
+|             | r  |          |      |\r
+|             | th\|          |      |\r
+|             | e  |          |      |\r
+|             | ma\|          |      |\r
+|             | p  |          |      |\r
++-------------+----+----------+------+\r
+\r
+Generated Application Configuration\r
+-----------------------------------\r
+\r
+The above example for component ``asimov.component.kpi_anomaly`` will\r
+get transformed into the following application configuration JSON that\r
+is fully resolved and provided at runtime by calling the\r
+``config binding service``:\r
+\r
+.. code:: json\r
+\r
+    {\r
+        "streams_publishes": {\r
+            "prediction": ["10.100.1.100:32567"]\r
+        },\r
+        "streams_subscribes": {},\r
+        "threshold": 0.75,\r
+        "services_calls": {\r
+            "vnf-db": ["10.100.1.101:32890"]\r
+        }\r
+    }\r
+\r
+.. _artifacts:\r
+\r
+Artifacts\r
+---------\r
+\r
+``artifacts`` contains a list of artifacts associated with this\r
+component. For Docker, this is the full path (including the registry) to\r
+the Docker image. For CDAP, this is the full path to the CDAP jar.\r
+\r
++---------------+------------+---------------------------------+\r
+| Property Name | Type       | Description                     |\r
++===============+============+=================================+\r
+| artifacts     | JSON array | Each entry is a artifact object |\r
++---------------+------------+---------------------------------+\r
+\r
+``artifact`` Schema:\r
+\r
++---------------+--------+--------------------------------------------+\r
+| Property Name | Type   | Description                                |\r
++===============+========+============================================+\r
+| uri           | string | *Required*. Uri to the artifact, full path |\r
++---------------+--------+--------------------------------------------+\r
+| type          | string | *Required*. ``docker image`` or ``jar``    |\r
++---------------+--------+--------------------------------------------+\r