DCAE Controller documentation DCAEGEN2-213
[dcaegen2.git] / docs / sections / components / component-specification / common-specification.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.\r
2 .. http://creativecommons.org/licenses/by/4.0\r
3 \r
4 .. _common-specification:\r
5 \r
6 Common Elements of the Component Specification\r
7 ==============================================\r
8 \r
9 This page describes the component specification (JSON) sections that are\r
10 common to both Docker and CDAP components. Differences for each are\r
11 pointed out below. Elements that are very different, and described in\r
12 the CDAP or Docker specific pages.\r
13 \r
14 .. _metadata:\r
15 \r
16 Component Metadata\r
17 ------------------\r
18 \r
19 Metadata refers to the properties found under the ``self`` JSON. This\r
20 group of properties is used to uniquely identify this component\r
21 specification and identify the component that this specification is used\r
22 to capture.\r
23 \r
24 Example:\r
25 \r
26 ::\r
27 \r
28     "self": {\r
29         "version": "1.0.0",\r
30         "name": "asimov.component.kpi_anomaly",\r
31         "description": "Classifies VNF KPI data as anomalous",\r
32         "component_type": "docker"\r
33     },\r
34 \r
35 ``self`` Schema:\r
36 \r
37 +-------------+--------+----------------+\r
38 | Property    | Type   | Description    |\r
39 | Name        |        |                |\r
40 +=============+========+================+\r
41 | version     | string | *Required*.    |\r
42 |             |        | Semantic       |\r
43 |             |        | version        |\r
44 |             |        | for this       |\r
45 |             |        | specification  |\r
46 +-------------+--------+----------------+\r
47 | name        | string | *Required*.    |\r
48 |             |        | Full           |\r
49 |             |        | name of        |\r
50 |             |        | this           |\r
51 |             |        | component      |\r
52 |             |        | which is       |\r
53 |             |        | also           |\r
54 |             |        | used as        |\r
55 |             |        | this           |\r
56 |             |        | component's    |\r
57 |             |        | catalog        |\r
58 |             |        | id.            |\r
59 +-------------+--------+----------------+\r
60 | description | string | *Required*     |\r
61 |             |        | Human-readable |\r
62 |             |        | text           |\r
63 |             |        | describing     |\r
64 |             |        | the            |\r
65 |             |        | component      |\r
66 |             |        | and the        |\r
67 |             |        | components     |\r
68 |             |        | functional     |\r
69 |             |        | purpose.       |\r
70 +-------------+--------+----------------+\r
71 | component_t\| string | *Required*     |\r
72 | ype         |        | Identify       |\r
73 |             |        | what           |\r
74 |             |        | containe\      |\r
75 |             |        | rization       |\r
76 |             |        | technolo\      |\r
77 |             |        | gy             |\r
78 |             |        | this           |\r
79 |             |        | componen\      |\r
80 |             |        | t              |\r
81 |             |        | uses:          |\r
82 |             |        | *docker*       |\r
83 |             |        | or             |\r
84 |             |        | *cdap*.        |\r
85 |             |        |                |\r
86 +-------------+--------+----------------+\r
87 \r
88 .. _interfaces:\r
89 \r
90 Interfaces\r
91 ----------\r
92 \r
93 Interfaces are the JSON objects found under the ``streams`` key and the\r
94 ``services`` key. These are used to describe the interfaces that the\r
95 component uses and the interfaces that the component provides. The\r
96 description of each interface includes the associated :any:`data\r
97 format <data-formats>`.\r
98 \r
99 Streams\r
100 ~~~~~~~\r
101 \r
102 -  The ``streams`` JSON is for specifying data produced for consumption\r
103    by other components, and the streams expected to subscribe to that is\r
104    produced by other components. These are “fire and forget” type\r
105    interfaces where the publisher of a stream does not expect or parse a\r
106    response from the subscriber.\r
107 -  The term ``stream`` here is abstract and neither refers to “CDAP\r
108    streams” or “DMaaP feeds”. While a stream is very likely a DMaaP\r
109    feed, it could be a direct stream of data being routed via HTTP too.\r
110    It abstractly refers to a sequence of data leaving a publisher.\r
111 -  Streams have anonymous publish/subscribe semantics, which decouples\r
112    the production of information from its consumption.\r
113 -  In general, components are not aware of who they are communicating\r
114    with.\r
115 -  Instead, components that are interested in data, subscribe to the\r
116    relevant stream; components that generate data publish to the\r
117    relevant stream.\r
118 -  There can be multiple publishers and subscribers to a stream. Streams\r
119    are intended for unidirectional, streaming communication.\r
120 \r
121 Streams interfaces that implement an HTTP endpoint must support POST.\r
122 \r
123 Streams are split into:\r
124 \r
125 +-------------+----+----------+\r
126 | Property    | Ty\| Descript\|\r
127 | Name        | pe | ion      |\r
128 +=============+====+==========+\r
129 | subscribes  | JS\| *Require\|\r
130 |             | ON | d*.      |\r
131 |             | li\| List of  |\r
132 |             | st | all      |\r
133 |             |    | availabl\|\r
134 |             |    | e        |\r
135 |             |    | stream   |\r
136 |             |    | interfac\|\r
137 |             |    | es       |\r
138 |             |    | that     |\r
139 |             |    | this     |\r
140 |             |    | componen\|\r
141 |             |    | t        |\r
142 |             |    | has that |\r
143 |             |    | can be   |\r
144 |             |    | used for |\r
145 |             |    | subscrib\|\r
146 |             |    | ing      |\r
147 +-------------+----+----------+\r
148 | publishes   | JS\| *Require\|\r
149 |             | ON | d*.      |\r
150 |             | li\| List of  |\r
151 |             | st | all      |\r
152 |             |    | stream   |\r
153 |             |    | interfac\|\r
154 |             |    | es       |\r
155 |             |    | that     |\r
156 |             |    | this     |\r
157 |             |    | componen\|\r
158 |             |    | t        |\r
159 |             |    | will     |\r
160 |             |    | publish  |\r
161 |             |    | onto     |\r
162 +-------------+----+----------+\r
163 \r
164 Subscribes\r
165 ^^^^^^^^^^\r
166 \r
167 Example:\r
168 \r
169 .. code:: json\r
170 \r
171     "streams": {\r
172         "subscribes": [{\r
173             "format": "dcae.vnf.kpi",\r
174             "version": "1.0.0",\r
175             "route": "/data",        // for CDAP this value is not used\r
176             "type": "http"\r
177         }],\r
178     ...\r
179     }\r
180 \r
181 This describes that ``asimov.component.kpi_anomaly`` exposes an HTTP\r
182 endpoint called ``/data`` which accepts requests that have the data\r
183 format of ``dcae.vnf.kpi`` version ``1.0.0``.\r
184 \r
185 ``subscribes`` Schema:\r
186 \r
187 +-------------+----+--------------------+\r
188 | Property    | Ty\| Descript\          |\r
189 | Name        | pe | ion                |\r
190 +=============+====+====================+\r
191 | format      | st\| *Require\          |\r
192 |             | ri\| d*.                |\r
193 |             | ng | Data               |\r
194 |             |    | format             |\r
195 |             |    | id of              |\r
196 |             |    | the data           |\r
197 |             |    | format             |\r
198 |             |    | that is            |\r
199 |             |    | used by            |\r
200 |             |    | this               |\r
201 |             |    | interfac\          |\r
202 |             |    | e                  |\r
203 +-------------+----+--------------------+\r
204 | version     | st\| *Require\          |\r
205 |             | ri\| d*.                |\r
206 |             | ng | Data               |\r
207 |             |    | format             |\r
208 |             |    | version            |\r
209 |             |    | of the             |\r
210 |             |    | data               |\r
211 |             |    | format             |\r
212 |             |    | that is            |\r
213 |             |    | used by            |\r
214 |             |    | this               |\r
215 |             |    | interfac\          |\r
216 |             |    | e                  |\r
217 +-------------+----+--------------------+\r
218 | route       | st\| *Require\          |\r
219 |             | ri\| d                  |\r
220 |             | ng | for HTTP           |\r
221 |             |    | and data           |\r
222 |             |    | router*.           |\r
223 |             |    | The HTTP           |\r
224 |             |    | route              |\r
225 |             |    | that               |\r
226 |             |    | this               |\r
227 |             |    | interfac\          |\r
228 |             |    | e                  |\r
229 |             |    | listens            |\r
230 |             |    | on                 |\r
231 +-------------+----+--------------------+\r
232 | config_key  | st\| *Require\          |\r
233 |             | ri\| d \                |\r
234 |             | ng | for \              |\r
235 |             |    | message_router\    |\r
236 |             |    | and data \         |\r
237 |             |    | router*.           |\r
238 |             |    | The HTTP           |\r
239 |             |    | route              |\r
240 |             |    | that               |\r
241 |             |    | this               |\r
242 |             |    | interfac\          |\r
243 |             |    | e                  |\r
244 |             |    | listens            |\r
245 |             |    | on                 |\r
246 +-------------+----+--------------------+\r
247 | type        | st\| *Require\          |\r
248 |             | ri\| d*.                |\r
249 |             | ng | Type of            |\r
250 |             |    | stream:            |\r
251 |             |    | ``http``           |\r
252 |             |    | ,                  |\r
253 |             |    | ``message_router`` |\r
254 |             |    | ,                  |\r
255 |             |    | ``data_router``    |\r
256 +-------------+----+--------------------+\r
257 \r
258 .. _message-router:\r
259 \r
260 Message router\r
261 ''''''''''''''\r
262 \r
263 Message router subscribers are http clients rather than http services\r
264 and performs a http a ``GET`` call. Thus, message router subscribers\r
265 description is structured like message router publishers and requires\r
266 ``config_key``:\r
267 \r
268 .. code:: json\r
269 \r
270     "streams": {\r
271         "subscribes": [{\r
272             "format": "dcae.some-format",\r
273             "version": "1.0.0",\r
274             "config_key": "some_format_handle",\r
275             "type": "message router"\r
276         }],\r
277     ...\r
278     }\r
279 \r
280 \r
281 .. _data-router:\r
282 \r
283 Data router\r
284 '''''''''''\r
285 \r
286 Data router subscribers are http or https services that handle ``PUT``\r
287 requests from data router. Developers must provide the ``route`` or url\r
288 path/endpoint that is expected to handle data router requests. This will\r
289 be used to construct the delivery url needed to register the subscriber\r
290 to the provisioned feed. Developers must also provide a ``config_key``\r
291 because there is dynamic configuration information associated with the\r
292 feed that the application will need e.g. username and password. See the\r
293 page on :doc:`DMaaP connection objects <../dcae-cli/dmaap-connection-objects>` for more details on\r
294 the configuration information.\r
295 \r
296 Example (not tied to the larger example):\r
297 \r
298 .. code:: json\r
299 \r
300     "streams": {\r
301         "subscribes": [{\r
302             "config_key": "some-sub-dr",\r
303             "format": "sandbox.platform.any",\r
304             "route": "/identity",\r
305             "type": "data_router",\r
306             "version": "0.1.0"\r
307         }],\r
308     ...\r
309     }\r
310 \r
311 Publishes\r
312 ^^^^^^^^^\r
313 \r
314 Example:\r
315 \r
316 .. code:: json\r
317 \r
318     "streams": {\r
319     ...\r
320         "publishes": [{\r
321             "format": "asimov.format.integerClassification",\r
322             "version": "1.0.0",\r
323             "config_key": "prediction",\r
324             "type": "http"\r
325         }]\r
326     },\r
327 \r
328 This describes that ``asimov.component.kpi_anomaly`` publishes by making\r
329 POST requests to streams that support the data format\r
330 ``asimov.format.integerClassification`` version ``1.0.0``.\r
331 \r
332 ``publishes`` Schema:\r
333 \r
334 +-------------+----+--------------------+\r
335 | Property    | Ty\| Descript\          |\r
336 | Name        | pe | ion                |\r
337 +=============+====+====================+\r
338 | format      | st\| *Require\          |\r
339 |             | ri\| d*.                |\r
340 |             | ng | Data               |\r
341 |             |    | format             |\r
342 |             |    | id of              |\r
343 |             |    | the data           |\r
344 |             |    | format             |\r
345 |             |    | that is            |\r
346 |             |    | used by            |\r
347 |             |    | this               |\r
348 |             |    | interfac\          |\r
349 |             |    | e                  |\r
350 +-------------+----+--------------------+\r
351 | version     | st\| *Require\          |\r
352 |             | ri\| d*.                |\r
353 |             | ng | Data               |\r
354 |             |    | format             |\r
355 |             |    | version            |\r
356 |             |    | of the             |\r
357 |             |    | data               |\r
358 |             |    | format             |\r
359 |             |    | that is            |\r
360 |             |    | used by            |\r
361 |             |    | this               |\r
362 |             |    | interfac\          |\r
363 |             |    | e                  |\r
364 +-------------+----+--------------------+\r
365 | config_key  | st\| *Require\          |\r
366 |             | ri\| d*.                |\r
367 |             | ng | The JSON           |\r
368 |             |    | key in             |\r
369 |             |    | the                |\r
370 |             |    | generate\          |\r
371 |             |    | d                  |\r
372 |             |    | applicat           |\r
373 |             |    | ion                |\r
374 |             |    | configur\          |\r
375 |             |    | ation              |\r
376 |             |    | that               |\r
377 |             |    | will be            |\r
378 |             |    | used to            |\r
379 |             |    | pass the           |\r
380 |             |    | downstre\          |\r
381 |             |    | am                 |\r
382 |             |    | componen\          |\r
383 |             |    | t’s                |\r
384 |             |    | (the               |\r
385 |             |    | subscrib\          |\r
386 |             |    | er’s)              |\r
387 |             |    | connecti\          |\r
388 |             |    | on                 |\r
389 |             |    | informat\          |\r
390 |             |    | ion.               |\r
391 +-------------+----+--------------------+\r
392 | type        | st\| *Require\          |\r
393 |             | ri\| d*.                |\r
394 |             | ng | Type of            |\r
395 |             |    | stream:            |\r
396 |             |    | ``http``           |\r
397 |             |    | ,                  |\r
398 |             |    | ``message_router`` |\r
399 |             |    | ,                  |\r
400 |             |    | ``data_router``    |\r
401 +-------------+----+--------------------+\r
402 \r
403 .. message-router-1:\r
404 \r
405 Message router\r
406 ''''''''''''''\r
407 \r
408 Message router publishers are http clients of DMaap message_router.\r
409 Developers must provide a ``config_key`` because there is dynamic\r
410 configuration information associated with the feed that the application\r
411 will need to receive e.g. topic url, username, password. See the page on\r
412 :doc:`DMaaP connection objects <../dcae-cli/dmaap-connection-objects>` for more details on\r
413 the configuration information.\r
414 \r
415 Example (not tied to the larger example):\r
416 \r
417 .. code:: json\r
418 \r
419     "streams": {\r
420     ...\r
421         "publishes": [{\r
422             "config_key": "some-pub-mr",\r
423             "format": "sandbox.platform.any",\r
424             "type": "message_router",\r
425             "version": "0.1.0"\r
426         }]\r
427     }\r
428 \r
429 .. data-router-1:\r
430 \r
431 Data router\r
432 '''''''''''\r
433 \r
434 Data router publishers are http clients that make ``PUT`` requests to\r
435 data router. Developers must also provide a ``config_key`` because there\r
436 is dynamic configuration information associated with the feed that the\r
437 application will need to receive e.g. publish url, username, password.\r
438 See the page on :doc:`DMaaP connection objects <../dcae-cli/dmaap-connection-objects>` for more details on\r
439 the configuration information.\r
440 \r
441 Example (not tied to the larger example):\r
442 \r
443 .. code:: json\r
444 \r
445     "streams": {\r
446     ...\r
447         "publishes": [{\r
448             "config_key": "some-pub-dr",\r
449             "format": "sandbox.platform.any",\r
450             "type": "data_router",\r
451             "version": "0.1.0"\r
452         }]\r
453     }\r
454 \r
455 Quick Reference\r
456 ^^^^^^^^^^^^^^^\r
457 \r
458 Refer to this :doc:`Quick Reference <streams-grid>` for a\r
459 comparison of the Streams ‘Publishes’ and ‘Subscribes’ sections.\r
460 \r
461 Services\r
462 ~~~~~~~~\r
463 \r
464 -  The publish / subscribe model is a very flexible communication\r
465    paradigm, but its many-to-many one-way transport is not appropriate\r
466    for RPC request / reply interactions, which are often required in a\r
467    distributed system.\r
468 -  Request / reply is done via a Service, which is defined by a pair of\r
469    messages: one for the request and one for the reply.\r
470 \r
471 Services are split into:\r
472 \r
473 +-------------+----+----------+\r
474 | Property    | Ty\| Descript\|\r
475 | Name        | pe | ion      |\r
476 +=============+====+==========+\r
477 | calls       | JS\| *Require\|\r
478 |             | ON | d*.      |\r
479 |             | li\| List of  |\r
480 |             | st | all      |\r
481 |             |    | service  |\r
482 |             |    | interfac\|\r
483 |             |    | es       |\r
484 |             |    | that     |\r
485 |             |    | this     |\r
486 |             |    | componen\|\r
487 |             |    | t        |\r
488 |             |    | will     |\r
489 |             |    | call     |\r
490 +-------------+----+----------+\r
491 | provides    | JS\| *Require\|\r
492 |             | ON | d*.      |\r
493 |             | li\| List of  |\r
494 |             | st | all      |\r
495 |             |    | service  |\r
496 |             |    | interfac\|\r
497 |             |    | es       |\r
498 |             |    | that     |\r
499 |             |    | this     |\r
500 |             |    | componen\|\r
501 |             |    | t        |\r
502 |             |    | exposes  |\r
503 |             |    | and      |\r
504 |             |    | provides |\r
505 +-------------+----+----------+\r
506 \r
507 Calls\r
508 ^^^^^\r
509 \r
510 The JSON ``services/calls`` is for specifying that the component relies\r
511 on an HTTP(S) service—the component sends that service an HTTP request,\r
512 and that service responds with an HTTP reply. An example of this is how\r
513 string matching (SM) depends on the AAI Broker. SM performs a\r
514 synchronous REST call to the AAI broker, providing it the VMNAME of the\r
515 VNF, and the AAI Broker responds with additional details about the VNF.\r
516 This dependency is expressed via ``services/calls``. In contrast, the\r
517 output of string matching (the alerts it computes) is sent directly to\r
518 policy as a fire-and-forget interface, so that is an example of a\r
519 ``stream``.\r
520 \r
521 Example:\r
522 \r
523 .. code:: json\r
524 \r
525     "services": {\r
526         "calls": [{\r
527             "config_key": "vnf-db",\r
528             "request": {\r
529                 "format": "dcae.vnf.meta",\r
530                 "version": "1.0.0"\r
531                 },\r
532             "response": {\r
533                 "format": "dcae.vnf.kpi",\r
534                 "version": "1.0.0"\r
535                 }\r
536         }],\r
537     ...\r
538     }\r
539 \r
540 This describes that ``asimov.component.kpi_anomaly`` will make HTTP\r
541 calls to a downstream component that accepts requests of data format\r
542 ``dcae.vnf.meta`` version ``1.0.0`` and is expecting the response to be\r
543 ``dcae.vnf.kpi`` version ``1.0.0``.\r
544 \r
545 ``calls`` Schema:\r
546 \r
547 +-------------+----+----------+\r
548 | Property    | Ty\| Descript\|\r
549 | Name        | pe | ion      |\r
550 +=============+====+==========+\r
551 | request     | JS\| *Require\|\r
552 |             | ON | d*.      |\r
553 |             | ob\| Descript\|\r
554 |             | je\| ion      |\r
555 |             | ct | of the   |\r
556 |             |    | expected |\r
557 |             |    | request  |\r
558 |             |    | for this |\r
559 |             |    | downstre\|\r
560 |             |    | am       |\r
561 |             |    | interfac\|\r
562 |             |    | e        |\r
563 +-------------+----+----------+\r
564 | response    | JS\| *Require\|\r
565 |             | ON | d*.      |\r
566 |             | ob\| Descript\|\r
567 |             | je\| ion      |\r
568 |             | ct | of the   |\r
569 |             |    | expected |\r
570 |             |    | response |\r
571 |             |    | for this |\r
572 |             |    | downstre\|\r
573 |             |    | am       |\r
574 |             |    | interfac\|\r
575 |             |    | e        |\r
576 +-------------+----+----------+\r
577 | config_key  | st\| *Require\|\r
578 |             | ri\| d*.      |\r
579 |             | ng | The JSON |\r
580 |             |    | key in   |\r
581 |             |    | the      |\r
582 |             |    | generate\|\r
583 |             |    | d        |\r
584 |             |    | applicat |\r
585 |             |    | ion      |\r
586 |             |    | configur\|\r
587 |             |    | ation    |\r
588 |             |    | that     |\r
589 |             |    | will be  |\r
590 |             |    | used to  |\r
591 |             |    | pass the |\r
592 |             |    | downstre\|\r
593 |             |    | am       |\r
594 |             |    | componen |\r
595 |             |    | t        |\r
596 |             |    | connecti\|\r
597 |             |    | on       |\r
598 |             |    | informat\|\r
599 |             |    | ion.     |\r
600 +-------------+----+----------+\r
601 \r
602 The JSON object schema for both ``request`` and ``response``:\r
603 \r
604 +-------------+----+----------+\r
605 | Property    | Ty\| Descript\|\r
606 | Name        | pe | ion      |\r
607 +=============+====+==========+\r
608 | format      | st\| *Require\|\r
609 |             | ri\| d*.      |\r
610 |             | ng | Data     |\r
611 |             |    | format   |\r
612 |             |    | id of    |\r
613 |             |    | the data |\r
614 |             |    | format   |\r
615 |             |    | that is  |\r
616 |             |    | used by  |\r
617 |             |    | this     |\r
618 |             |    | interfac\|\r
619 |             |    | e        |\r
620 +-------------+----+----------+\r
621 | version     | st\| *Require\|\r
622 |             | ri\| d*.      |\r
623 |             | ng | Data     |\r
624 |             |    | format   |\r
625 |             |    | version  |\r
626 |             |    | of the   |\r
627 |             |    | data     |\r
628 |             |    | format   |\r
629 |             |    | that is  |\r
630 |             |    | used by  |\r
631 |             |    | this     |\r
632 |             |    | interfac\|\r
633 |             |    | e        |\r
634 +-------------+----+----------+\r
635 \r
636 Provides\r
637 ^^^^^^^^\r
638 \r
639 Example:\r
640 \r
641 .. code:: json\r
642 \r
643     "services": {\r
644     ...\r
645         "provides": [{\r
646             "route": "/score-vnf",\r
647             "request": {\r
648                 "format": "dcae.vnf.meta",\r
649                 "version": "1.0.0"\r
650                 },\r
651             "response": {\r
652                 "format": "asimov.format.integerClassification",\r
653                 "version": "1.0.0"\r
654                 }\r
655         }]\r
656     },\r
657 \r
658 This describes that ``asimov.component.kpi_anomaly`` provides a service\r
659 interface and it is exposed on the ``/score-vnf`` HTTP endpoint. The\r
660 endpoint accepts requests that have the data format ``dcae.vnf.meta``\r
661 version ``1.0.0`` and gives back a response of\r
662 ``asimov.format.integerClassification`` version ``1.0.0``.\r
663 \r
664 ``provides`` Schema for a Docker component:\r
665 \r
666 +-------------+----+----------+\r
667 | Property    | Ty\| Descript\|\r
668 | Name        | pe | ion      |\r
669 +=============+====+==========+\r
670 | request     | JS\| *Require\|\r
671 |             | ON | d*.      |\r
672 |             | ob\| Descript\|\r
673 |             | je\| ion      |\r
674 |             | ct | of the   |\r
675 |             |    | expected |\r
676 |             |    | request  |\r
677 |             |    | for this |\r
678 |             |    | interfac\|\r
679 |             |    | e        |\r
680 +-------------+----+----------+\r
681 | response    | JS\| *Require\|\r
682 |             | ON | d*.      |\r
683 |             | ob\| Descript\|\r
684 |             | je\| ion      |\r
685 |             | ct | of the   |\r
686 |             |    | expected |\r
687 |             |    | response |\r
688 |             |    | for this |\r
689 |             |    | interfac\|\r
690 |             |    | e        |\r
691 +-------------+----+----------+\r
692 | route       | st\| *Require\|\r
693 |             | ri\| d*.      |\r
694 |             | ng | The HTTP |\r
695 |             |    | route    |\r
696 |             |    | that     |\r
697 |             |    | this     |\r
698 |             |    | interfac\|\r
699 |             |    | e        |\r
700 |             |    | listens  |\r
701 |             |    | on       |\r
702 +-------------+----+----------+\r
703 \r
704 The JSON object schema for both ``request`` and ``response``:\r
705 \r
706 +-------------+----+----------+\r
707 | Property    | Ty\| Descript\|\r
708 | Name        | pe | ion      |\r
709 +=============+====+==========+\r
710 | format      | st\| *Require\|\r
711 |             | ri\| d*.      |\r
712 |             | ng | Data     |\r
713 |             |    | format   |\r
714 |             |    | id of    |\r
715 |             |    | the data |\r
716 |             |    | format   |\r
717 |             |    | that is  |\r
718 |             |    | used by  |\r
719 |             |    | this     |\r
720 |             |    | interfac\|\r
721 |             |    | e        |\r
722 +-------------+----+----------+\r
723 | version     | st\| *Require\|\r
724 |             | ri\| d*.      |\r
725 |             | ng | Data     |\r
726 |             |    | format   |\r
727 |             |    | version  |\r
728 |             |    | of the   |\r
729 |             |    | data     |\r
730 |             |    | format   |\r
731 |             |    | that is  |\r
732 |             |    | used by  |\r
733 |             |    | this     |\r
734 |             |    | interfac\|\r
735 |             |    | e        |\r
736 +-------------+----+----------+\r
737 \r
738 Note, for CDAP, there is a slight variation due to the way CDAP exposes\r
739 services:\r
740 \r
741 ::\r
742 \r
743           "provides":[                             // note this is a list of JSON\r
744              {  \r
745                 "request":{  ...},\r
746                 "response":{  ...},\r
747                 "service_name":"name CDAP service", \r
748                 "service_endpoint":"greet",         // E.g the URL is /services/service_name/methods/service_endpoint\r
749                 "verb":"GET"                        // GET, PUT, or POST\r
750              }\r
751           ]\r
752 \r
753 ``provides`` Schema for a CDAP component:\r
754 \r
755 +-------------+----+-----------+\r
756 | Property    | Ty\| Descript\ |\r
757 | Name        | pe | ion       |\r
758 +=============+====+===========+\r
759 | request     | JS\| *Require\ |\r
760 |             | ON | d*.       |\r
761 |             | ob\| Descript\ |\r
762 |             | je\| ion       |\r
763 |             | ct | of the    |\r
764 |             |    | expected  |\r
765 |             |    | request   |\r
766 |             |    | data      |\r
767 |             |    | format    |\r
768 |             |    | for this  |\r
769 |             |    | interfac\ |\r
770 |             |    | e         |\r
771 +-------------+----+-----------+\r
772 | response    | JS\| *Require\ |\r
773 |             | ON | d*.       |\r
774 |             | ob\| Descript\ |\r
775 |             | je\| ion       |\r
776 |             | ct | of the    |\r
777 |             |    | expected  |\r
778 |             |    | response  |\r
779 |             |    | for this  |\r
780 |             |    | interfac\ |\r
781 |             |    | e         |\r
782 +-------------+----+-----------+\r
783 | service_nam\| st\| *Require\ |\r
784 | e           | ri\| d*.       |\r
785 |             | ng | The CDAP  |\r
786 |             |    | service   |\r
787 |             |    | name (eg  |\r
788 |             |    | “Greetin\ |\r
789 |             |    | g”)       |\r
790 +-------------+----+-----------+\r
791 | service_end | st\| *Require\ |\r
792 | point       | ri\| d*.       |\r
793 |             | ng | The CDAP  |\r
794 |             |    | service   |\r
795 |             |    | endpoint  |\r
796 |             |    | for this  |\r
797 |             |    | service_n\|\r
798 |             |    | ame       |\r
799 |             |    | (eg       |\r
800 |             |    | “/greet”  |\r
801 |             |    | )         |\r
802 +-------------+----+-----------+\r
803 | verb        | st\| *Require\ |\r
804 |             | ri\| d*.       |\r
805 |             | ng | ‘GET’,    |\r
806 |             |    | ‘PUT’ or  |\r
807 |             |    | ‘POST’    |\r
808 +-------------+----+-----------+\r
809 \r
810 Parameters\r
811 ----------\r
812 \r
813 ``parameters`` is where to specify the component’s application\r
814 configuration parameters that are not connection information.\r
815 \r
816 +---------------+------------+----------------------------------+\r
817 | Property Name | Type       | Description                      |\r
818 +===============+============+==================================+\r
819 | parameters    | JSON array | Each entry is a parameter object |\r
820 +---------------+------------+----------------------------------+\r
821 \r
822 Parameter object has the following available properties:\r
823 \r
824 +--------------+----+----------+------+\r
825 | Property     | Ty\| Descript\| Defa\|\r
826 | Name         | pe | ion      | ult  |\r
827 +==============+====+==========+======+\r
828 | name         | st\| *Require\|      |\r
829 |              | ri\| d*.      |      |\r
830 |              | ng | The      |      |\r
831 |              |    | property |      |\r
832 |              |    | name     |      |\r
833 |              |    | that     |      |\r
834 |              |    | will be  |      |\r
835 |              |    | used as  |      |\r
836 |              |    | the key  |      |\r
837 |              |    | in the   |      |\r
838 |              |    | generate\|      |\r
839 |              |    | d        |      |\r
840 |              |    | config   |      |\r
841 +--------------+----+----------+------+\r
842 | value        | an\| *Require\|      |\r
843 |              | y  | d*.      |      |\r
844 |              |    | The      |      |\r
845 |              |    | default  |      |\r
846 |              |    | value    |      |\r
847 |              |    | for the  |      |\r
848 |              |    | given    |      |\r
849 |              |    | paramete\|      |\r
850 |              |    | r        |      |\r
851 +--------------+----+----------+------+\r
852 | description  | st\| *Require\|      |\r
853 |              | ri\| d*.      |      |\r
854 |              | ng | Human-re\|      |\r
855 |              |    | adable   |      |\r
856 |              |    | text     |      |\r
857 |              |    | describi\|      |\r
858 |              |    | ng       |      |\r
859 |              |    | the      |      |\r
860 |              |    | paramete\|      |\r
861 |              |    | r        |      |\r
862 |              |    | like     |      |\r
863 |              |    | what its |      |\r
864 |              |    | for      |      |\r
865 +--------------+----+----------+------+\r
866 | type         | st\| The      |      |\r
867 |              | ri\| required |      |\r
868 |              | ng | data     |      |\r
869 |              |    | type for |      |\r
870 |              |    | the      |      |\r
871 |              |    | paramete\|      |\r
872 |              |    | r        |      |\r
873 +--------------+----+----------+------+\r
874 | required     | bo\| An       | true |\r
875 |              | ol\| optional |      |\r
876 |              | ea\| key that |      |\r
877 |              | n  | declares |      |\r
878 |              |    | a        |      |\r
879 |              |    | paramete\|      |\r
880 |              |    | r        |      |\r
881 |              |    | as       |      |\r
882 |              |    | required |      |\r
883 |              |    | (true)   |      |\r
884 |              |    | or not   |      |\r
885 |              |    | (false)  |      |\r
886 +--------------+----+----------+------+\r
887 | constraints  | ar\| The      |      |\r
888 |              | ra\| optional |      |\r
889 |              | y  | list of  |      |\r
890 |              |    | sequence |      |\r
891 |              |    | d        |      |\r
892 |              |    | constrai\|      |\r
893 |              |    | nt       |      |\r
894 |              |    | clauses  |      |\r
895 |              |    | for the  |      |\r
896 |              |    | paramete\|      |\r
897 |              |    | r.       |      |\r
898 |              |    | See      |      |\r
899 |              |    | below    |      |\r
900 +--------------+----+----------+------+\r
901 | entry_schem\ | st\| The      |      |\r
902 | a            | ri\| optional |      |\r
903 |              | ng | key that |      |\r
904 |              |    | is used  |      |\r
905 |              |    | to       |      |\r
906 |              |    | declare  |      |\r
907 |              |    | the name |      |\r
908 |              |    | of the   |      |\r
909 |              |    | Datatype |      |\r
910 |              |    | definiti\|      |\r
911 |              |    | on       |      |\r
912 |              |    | for      |      |\r
913 |              |    | entries  |      |\r
914 |              |    | of set   |      |\r
915 |              |    | types    |      |\r
916 |              |    | such as  |      |\r
917 |              |    | the      |      |\r
918 |              |    | TOSCA    |      |\r
919 |              |    | ‘list’   |      |\r
920 |              |    | or       |      |\r
921 |              |    | ‘map’.   |      |\r
922 |              |    | Only 1   |      |\r
923 |              |    | level is |      |\r
924 |              |    | supporte\|      |\r
925 |              |    | d        |      |\r
926 |              |    | at this  |      |\r
927 |              |    | time     |      |\r
928 +--------------+----+----------+------+\r
929 | designer_ed\ | bo\| An       | true |\r
930 | itable       | ol\| optional |      |\r
931 |              | ea\| key that |      |\r
932 |              | n  | declares |      |\r
933 |              |    | a        |      |\r
934 |              |    | paramete\|      |\r
935 |              |    | r        |      |\r
936 |              |    | to be    |      |\r
937 |              |    | editable |      |\r
938 |              |    | by       |      |\r
939 |              |    | designer |      |\r
940 |              |    | (true)   |      |\r
941 |              |    | or not   |      |\r
942 |              |    | (false)  |      |\r
943 +--------------+----+----------+------+\r
944 | sourced_at_d\| bo\| An       | fals\|\r
945 | eployment    | ol\| optional | e    |\r
946 |              | ea\| key that |      |\r
947 |              | n  | declares |      |\r
948 |              |    | a        |      |\r
949 |              |    | paramete\|      |\r
950 |              |    | r’s      |      |\r
951 |              |    | value to |      |\r
952 |              |    | be       |      |\r
953 |              |    | assigned |      |\r
954 |              |    | at       |      |\r
955 |              |    | deployme\|      |\r
956 |              |    | nt       |      |\r
957 |              |    | time     |      |\r
958 |              |    | (true)   |      |\r
959 +--------------+----+----------+------+\r
960 | policy_edit\ | bo\| An       | true |\r
961 | able         | ol\| optional |      |\r
962 |              | ea\| key that |      |\r
963 |              | n  | declares |      |\r
964 |              |    | a        |      |\r
965 |              |    | paramete\|      |\r
966 |              |    | r        |      |\r
967 |              |    | to be    |      |\r
968 |              |    | editable |      |\r
969 |              |    | by       |      |\r
970 |              |    | policy   |      |\r
971 |              |    | (true)   |      |\r
972 |              |    | or not   |      |\r
973 |              |    | (false)  |      |\r
974 +--------------+----+----------+------+\r
975 | policy_sche\ | ar\| The      |      |\r
976 | ma           | ra\| optional |      |\r
977 |              | y  | list of  |      |\r
978 |              |    | schema   |      |\r
979 |              |    | definiti\|      |\r
980 |              |    | ons      |      |\r
981 |              |    | used for |      |\r
982 |              |    | policy.  |      |\r
983 |              |    | See      |      |\r
984 |              |    | below    |      |\r
985 +--------------+----+----------+------+\r
986 \r
987 Example:\r
988 \r
989 .. code:: json\r
990 \r
991     "parameters": [\r
992         {\r
993             "name": "threshold",\r
994             "value": 0.75,\r
995             "description": "Probability threshold to exceed to be anomalous"\r
996         }\r
997     ]\r
998 \r
999 Many of the parameter properties have been copied from TOSCA model\r
1000 property definitions and are to be used for service design composition\r
1001 and policy creation. See `section 3.5.8 *Property\r
1002 definition* <http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.1/TOSCA-Simple-Profile-YAML-v1.1.html>`__.\r
1003 \r
1004 The property ``constraints`` is a list of objects where each constraint\r
1005 object:\r
1006 \r
1007 +--------------+----+----------+\r
1008 | Property     | Ty\| Descript\|\r
1009 | Name         | pe | ion      |\r
1010 +==============+====+==========+\r
1011 | equal        |    | Constrai\|\r
1012 |              |    | ns       |\r
1013 |              |    | a        |\r
1014 |              |    | property |\r
1015 |              |    | or       |\r
1016 |              |    | paramete\|\r
1017 |              |    | r        |\r
1018 |              |    | to a     |\r
1019 |              |    | value    |\r
1020 |              |    | equal to |\r
1021 |              |    | (‘=’)    |\r
1022 |              |    | the      |\r
1023 |              |    | value    |\r
1024 |              |    | declared |\r
1025 +--------------+----+----------+\r
1026 | greater_tha\ | nu\| Constrai\|\r
1027 | n            | mb\| ns       |\r
1028 |              | er | a        |\r
1029 |              |    | property |\r
1030 |              |    | or       |\r
1031 |              |    | paramete |\r
1032 |              |    | r        |\r
1033 |              |    | to a     |\r
1034 |              |    | value    |\r
1035 |              |    | greater  |\r
1036 |              |    | than     |\r
1037 |              |    | (‘>’)    |\r
1038 |              |    | the      |\r
1039 |              |    | value    |\r
1040 |              |    | declared |\r
1041 +--------------+----+----------+\r
1042 | greater_or_e\| nu\| Constrai\|\r
1043 | qual         | mb\| ns       |\r
1044 |              | er | a        |\r
1045 |              |    | property |\r
1046 |              |    | or       |\r
1047 |              |    | paramete\|\r
1048 |              |    | r        |\r
1049 |              |    | to a     |\r
1050 |              |    | value    |\r
1051 |              |    | greater  |\r
1052 |              |    | than or  |\r
1053 |              |    | equal to |\r
1054 |              |    | (‘>=’)   |\r
1055 |              |    | the      |\r
1056 |              |    | value    |\r
1057 |              |    | declared |\r
1058 +--------------+----+----------+\r
1059 | less_than    | nu\| Constrai\|\r
1060 |              | mb\| ns       |\r
1061 |              | er | a        |\r
1062 |              |    | property |\r
1063 |              |    | or       |\r
1064 |              |    | paramete\|\r
1065 |              |    | r        |\r
1066 |              |    | to a     |\r
1067 |              |    | value    |\r
1068 |              |    | less     |\r
1069 |              |    | than     |\r
1070 |              |    | (‘<’)    |\r
1071 |              |    | the      |\r
1072 |              |    | value    |\r
1073 |              |    | declared |\r
1074 +--------------+----+----------+\r
1075 | less_or_equ\ | nu\| Constrai\|\r
1076 | al           | mb\| ns       |\r
1077 |              | er | a        |\r
1078 |              |    | property |\r
1079 |              |    | or       |\r
1080 |              |    | paramete\|\r
1081 |              |    | r        |\r
1082 |              |    | to a     |\r
1083 |              |    | value    |\r
1084 |              |    | less     |\r
1085 |              |    | than or  |\r
1086 |              |    | equal to |\r
1087 |              |    | (‘<=’)   |\r
1088 |              |    | the      |\r
1089 |              |    | value    |\r
1090 |              |    | declared |\r
1091 +--------------+----+----------+\r
1092 | valid_value\ | ar\| Constrai\|\r
1093 | s            | ra\| ns       |\r
1094 |              | y  | a        |\r
1095 |              |    | property |\r
1096 |              |    | or       |\r
1097 |              |    | paramete\|\r
1098 |              |    | r        |\r
1099 |              |    | to a     |\r
1100 |              |    | value    |\r
1101 |              |    | that is  |\r
1102 |              |    | in the   |\r
1103 |              |    | list of  |\r
1104 |              |    | declared |\r
1105 |              |    | values   |\r
1106 +--------------+----+----------+\r
1107 | length       | nu\| Constrai\|\r
1108 |              | mb\| ns       |\r
1109 |              | er | the      |\r
1110 |              |    | property |\r
1111 |              |    | or       |\r
1112 |              |    | paramete\|\r
1113 |              |    | r        |\r
1114 |              |    | to a     |\r
1115 |              |    | value of |\r
1116 |              |    | a given  |\r
1117 |              |    | length   |\r
1118 +--------------+----+----------+\r
1119 | min_length   | nu\| Constrai\|\r
1120 |              | mb\| ns       |\r
1121 |              | er | the      |\r
1122 |              |    | property |\r
1123 |              |    | or       |\r
1124 |              |    | paramete\|\r
1125 |              |    | r        |\r
1126 |              |    | to a     |\r
1127 |              |    | value to |\r
1128 |              |    | a        |\r
1129 |              |    | minimum  |\r
1130 |              |    | length   |\r
1131 +--------------+----+----------+\r
1132 | max_length   | nu\| Constrai\|\r
1133 |              | mb\| ns       |\r
1134 |              | er | the      |\r
1135 |              |    | property |\r
1136 |              |    | or       |\r
1137 |              |    | paramete\|\r
1138 |              |    | r        |\r
1139 |              |    | to a     |\r
1140 |              |    | value to |\r
1141 |              |    | a        |\r
1142 |              |    | maximum  |\r
1143 |              |    | length   |\r
1144 +--------------+----+----------+\r
1145 \r
1146 ``threshold`` is the configuration parameter and will get set to 0.75\r
1147 when the configuration gets generated.\r
1148 \r
1149 The property ``policy_schema`` is a list of objects where each\r
1150 policy_schema object:\r
1151 \r
1152 +-------------+----+----------+------+\r
1153 | Property    | Ty\| Descript\| Defa\|\r
1154 | Name        | pe | ion      | ult  |\r
1155 +=============+====+==========+======+\r
1156 | name        | st\| *Require\|      |\r
1157 |             | ri\| d*.      |      |\r
1158 |             | ng | paramete\|      |\r
1159 |             |    | r        |      |\r
1160 |             |    | name     |      |\r
1161 +-------------+----+----------+------+\r
1162 | value       | st\| default  |      |\r
1163 |             | ri\| value    |      |\r
1164 |             | ng | for the  |      |\r
1165 |             |    | paramete\|      |\r
1166 |             |    | r        |      |\r
1167 +-------------+----+----------+------+\r
1168 | description | st\| paramete\|      |\r
1169 |             | ri\| r        |      |\r
1170 |             | ng | descript\|      |\r
1171 |             |    | ion      |      |\r
1172 +-------------+----+----------+------+\r
1173 | type        | en\| *Require\|      |\r
1174 |             | um | d*.      |      |\r
1175 |             |    | data     |      |\r
1176 |             |    | type of  |      |\r
1177 |             |    | the      |      |\r
1178 |             |    | paramete\|      |\r
1179 |             |    | r,       |      |\r
1180 |             |    | ‘string’ |      |\r
1181 |             |    | ,        |      |\r
1182 |             |    | ‘number’ |      |\r
1183 |             |    | ,        |      |\r
1184 |             |    | ‘boolean |      |\r
1185 |             |    | ’,       |      |\r
1186 |             |    | ‘datetim\|      |\r
1187 |             |    | e’,      |      |\r
1188 |             |    | ‘list’,  |      |\r
1189 |             |    | or ‘map’ |      |\r
1190 +-------------+----+----------+------+\r
1191 | required    | bo\| is       | true |\r
1192 |             | ol\| paramete\|      |\r
1193 |             | ea\| r        |      |\r
1194 |             | n  | required |      |\r
1195 |             |    | or not?  |      |\r
1196 +-------------+----+----------+------+\r
1197 | constraints | ar\| The      |      |\r
1198 |             | ra\| optional |      |\r
1199 |             | y  | list of  |      |\r
1200 |             |    | sequence\|      |\r
1201 |             |    | d        |      |\r
1202 |             |    | constrai\|      |\r
1203 |             |    | nt       |      |\r
1204 |             |    | clauses  |      |\r
1205 |             |    | for the  |      |\r
1206 |             |    | paramete\|      |\r
1207 |             |    | r.       |      |\r
1208 |             |    | See      |      |\r
1209 |             |    | above    |      |\r
1210 +-------------+----+----------+------+\r
1211 | entry_schem\| st\| The      |      |\r
1212 | a           | ri\| optional |      |\r
1213 |             | ng | key that |      |\r
1214 |             |    | is used  |      |\r
1215 |             |    | to       |      |\r
1216 |             |    | declare  |      |\r
1217 |             |    | the name |      |\r
1218 |             |    | of the   |      |\r
1219 |             |    | Datatype |      |\r
1220 |             |    | definiti\|      |\r
1221 |             |    | on       |      |\r
1222 |             |    | for      |      |\r
1223 |             |    | certain  |      |\r
1224 |             |    | types.   |      |\r
1225 |             |    | entry_sc\|      |\r
1226 |             |    | hema     |      |\r
1227 |             |    | must be  |      |\r
1228 |             |    | defined  |      |\r
1229 |             |    | when the |      |\r
1230 |             |    | type is  |      |\r
1231 |             |    | either   |      |\r
1232 |             |    | list or  |      |\r
1233 |             |    | map. If  |      |\r
1234 |             |    | the type |      |\r
1235 |             |    | is list  |      |\r
1236 |             |    | and the  |      |\r
1237 |             |    | entry    |      |\r
1238 |             |    | type is  |      |\r
1239 |             |    | a simple |      |\r
1240 |             |    | type     |      |\r
1241 |             |    | (string, |      |\r
1242 |             |    | number,  |      |\r
1243 |             |    | bookean, |      |\r
1244 |             |    | datetime |      |\r
1245 |             |    | ),       |      |\r
1246 |             |    | follow   |      |\r
1247 |             |    | with an  |      |\r
1248 |             |    | string   |      |\r
1249 |             |    | to       |      |\r
1250 |             |    | describe |      |\r
1251 |             |    | the      |      |\r
1252 |             |    | entry    |      |\r
1253 +-------------+----+----------+------+\r
1254 |             | If |          |      |\r
1255 |             | th\|          |      |\r
1256 |             | e  |          |      |\r
1257 |             | ty\|          |      |\r
1258 |             | pe |          |      |\r
1259 |             | is |          |      |\r
1260 |             | li\|          |      |\r
1261 |             | st |          |      |\r
1262 |             | an\|          |      |\r
1263 |             | d  |          |      |\r
1264 |             | th\|          |      |\r
1265 |             | e  |          |      |\r
1266 |             | en\|          |      |\r
1267 |             | tr\|          |      |\r
1268 |             | y  |          |      |\r
1269 |             | ty\|          |      |\r
1270 |             | pe |          |      |\r
1271 |             | is |          |      |\r
1272 |             | a  |          |      |\r
1273 |             | ma\|          |      |\r
1274 |             | p, |          |      |\r
1275 |             | fo\|          |      |\r
1276 |             | ll\|          |      |\r
1277 |             | ow |          |      |\r
1278 |             | wi\|          |      |\r
1279 |             | th |          |      |\r
1280 |             | an |          |      |\r
1281 |             | ar\|          |      |\r
1282 |             | ra\|          |      |\r
1283 |             | y  |          |      |\r
1284 |             | to |          |      |\r
1285 |             | de\|          |      |\r
1286 |             | sc\|          |      |\r
1287 |             | ri\|          |      |\r
1288 |             | be |          |      |\r
1289 |             | th\|          |      |\r
1290 |             | e  |          |      |\r
1291 |             | ke\|          |      |\r
1292 |             | ys |          |      |\r
1293 |             | fo\|          |      |\r
1294 |             | r  |          |      |\r
1295 |             | th\|          |      |\r
1296 |             | e  |          |      |\r
1297 |             | en\|          |      |\r
1298 |             | tr\|          |      |\r
1299 |             | y  |          |      |\r
1300 |             | ma\|          |      |\r
1301 |             | p  |          |      |\r
1302 +-------------+----+----------+------+\r
1303 |             | If |          |      |\r
1304 |             | th\|          |      |\r
1305 |             | e  |          |      |\r
1306 |             | ty\|          |      |\r
1307 |             | pe |          |      |\r
1308 |             | is |          |      |\r
1309 |             | li\|          |      |\r
1310 |             | st |          |      |\r
1311 |             | an\|          |      |\r
1312 |             | d  |          |      |\r
1313 |             | th\|          |      |\r
1314 |             | e  |          |      |\r
1315 |             | en\|          |      |\r
1316 |             | tr\|          |      |\r
1317 |             | y  |          |      |\r
1318 |             | ty\|          |      |\r
1319 |             | pe |          |      |\r
1320 |             | is |          |      |\r
1321 |             | a  |          |      |\r
1322 |             | li\|          |      |\r
1323 |             | st |          |      |\r
1324 |             | ,  |          |      |\r
1325 |             | th\|          |      |\r
1326 |             | at |          |      |\r
1327 |             | is |          |      |\r
1328 |             | no\|          |      |\r
1329 |             | t  |          |      |\r
1330 |             | cu\|          |      |\r
1331 |             | rr\|          |      |\r
1332 |             | en\|          |      |\r
1333 |             | tl\|          |      |\r
1334 |             | y  |          |      |\r
1335 |             | su\|          |      |\r
1336 |             | pp\|          |      |\r
1337 |             | or\|          |      |\r
1338 |             | te\|          |      |\r
1339 |             | d \|          |      |\r
1340 +-------------+----+----------+------+\r
1341 |             | If |          |      |\r
1342 |             | th\|          |      |\r
1343 |             | e  |          |      |\r
1344 |             | ty\|          |      |\r
1345 |             | pe |          |      |\r
1346 |             | is |          |      |\r
1347 |             | ma\|          |      |\r
1348 |             | p, |          |      |\r
1349 |             | fo\|          |      |\r
1350 |             | ll\|          |      |\r
1351 |             | ow |          |      |\r
1352 |             | wi\|          |      |\r
1353 |             | th |          |      |\r
1354 |             | an |          |      |\r
1355 |             | ar\|          |      |\r
1356 |             | ay |          |      |\r
1357 |             | to |          |      |\r
1358 |             | de\|          |      |\r
1359 |             | sc\|          |      |\r
1360 |             | ri\|          |      |\r
1361 |             | be |          |      |\r
1362 |             | th\|          |      |\r
1363 |             | e  |          |      |\r
1364 |             | ke\|          |      |\r
1365 |             | ys |          |      |\r
1366 |             | fo\|          |      |\r
1367 |             | r  |          |      |\r
1368 |             | th\|          |      |\r
1369 |             | e  |          |      |\r
1370 |             | ma\|          |      |\r
1371 |             | p  |          |      |\r
1372 +-------------+----+----------+------+\r
1373 \r
1374 Generated Application Configuration\r
1375 -----------------------------------\r
1376 \r
1377 The above example for component ``asimov.component.kpi_anomaly`` will\r
1378 get transformed into the following application configuration JSON that\r
1379 is fully resolved and provided at runtime by calling the\r
1380 ``config binding service``:\r
1381 \r
1382 .. code:: json\r
1383 \r
1384     {\r
1385         "streams_publishes": {\r
1386             "prediction": ["10.100.1.100:32567"]\r
1387         },\r
1388         "streams_subscribes": {},\r
1389         "threshold": 0.75,\r
1390         "services_calls": {\r
1391             "vnf-db": ["10.100.1.101:32890"]\r
1392         }\r
1393     }\r
1394 \r
1395 .. _artifacts:\r
1396 \r
1397 Artifacts\r
1398 ---------\r
1399 \r
1400 ``artifacts`` contains a list of artifacts associated with this\r
1401 component. For Docker, this is the full path (including the registry) to\r
1402 the Docker image. For CDAP, this is the full path to the CDAP jar.\r
1403 \r
1404 +---------------+------------+---------------------------------+\r
1405 | Property Name | Type       | Description                     |\r
1406 +===============+============+=================================+\r
1407 | artifacts     | JSON array | Each entry is a artifact object |\r
1408 +---------------+------------+---------------------------------+\r
1409 \r
1410 ``artifact`` Schema:\r
1411 \r
1412 +---------------+--------+--------------------------------------------+\r
1413 | Property Name | Type   | Description                                |\r
1414 +===============+========+============================================+\r
1415 | uri           | string | *Required*. Uri to the artifact, full path |\r
1416 +---------------+--------+--------------------------------------------+\r
1417 | type          | string | *Required*. ``docker image`` or ``jar``    |\r
1418 +---------------+--------+--------------------------------------------+\r