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