11663944fc1672fb363f6eea52024f57c213830b
[policy/models.git] / models-examples / src / main / resources / policytypes / onap.policies.native.Apex.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_0_0,
2 policy_types:
3     onap.policies.Native:
4         derived_from: tosca.policies.Root
5         description: a base policy type for all native PDP policies
6         version: 1.0.0
7     onap.policies.native.Apex:
8         derived_from: onap.policies.Native
9         description: a policy type for native apex policies
10         version: 1.0.0
11         properties:
12             engine_service:
13                 type: onap.datatypes.native.apex.EngineService
14                 description: APEX Engine Service Parameters
15             inputs:
16                 type: map
17                 description: Inputs for handling events coming into the APEX engine
18                 entry_schema:
19                     type: onap.datatypes.native.apex.EventHandler
20             outputs:
21                 type: map
22                 description: Outputs for handling events going out of the APEX engine
23                 entry_schema:
24                     type: onap.datatypes.native.apex.EventHandler
25             environment:
26                 type: list
27                 description: Envioronmental parameters for the APEX engine
28                 entry_schema:
29                     type: onap.datatypes.native.apex.Environment
30
31 data_types:
32     onap.datatypes.native.apex.EngineService:
33         derived_from: tosca.datatypes.Root
34         properties:
35             name:
36                 type: string
37                 description: Specifies the engine name
38                 required: false
39                 default: "ApexEngineService"
40             version:
41                 type: string
42                 description: Specifies the engine version in double dotted format
43                 required: false
44                 default: "1.0.0"
45             id:
46                 type: int
47                 description: Specifies the engine id
48                 required: true
49             instance_count:
50                 type: int
51                 description: Specifies the number of engine threads that should be run
52                 required: true
53             deployment_port:
54                 type: int
55                 description: Specifies the port to connect to for engine administration
56                 required: false
57                 default: 1
58             policy_model_file_name:
59                 type: string
60                 description: The name of the file from which to read the APEX policy model
61                 required: false
62                 default: ""
63             policy_type_impl:
64                 type: string
65                 description: The policy type implementation from which to read the APEX policy model
66                 required: false
67                 default: ""
68             periodic_event_period:
69                 type: string
70                 description: The time interval in milliseconds for the periodic scanning event, 0 means don't scan
71                 required: false
72                 default: 0
73             engine:
74                 type: onap.datatypes.native.apex.engineservice.Engine
75                 description: The parameters for all engines in the APEX engine service
76                 required: true
77     onap.datatypes.native.apex.EventHandler:
78         derived_from: tosca.datatypes.Root
79         properties:
80             name:
81                 type: string
82                 description: Specifies the event handler name, if not specified this is set to the key name
83                 required: false
84             carrier_technology:
85                 type: onap.datatypes.native.apex.CarrierTechnology
86                 description: Specifies the carrier technology of the event handler (such as REST/Web Socket/Kafka)
87                 required: true
88             event_protocol:
89                 type: onap.datatypes.native.apex.EventProtocol
90                 description: Specifies the event protocol of events for the event handler (such as Yaml/JSON/XML/POJO)
91                 required: true
92             event_name:
93                 type: string
94                 description: Specifies the event name for events on this event handler, if not specified, the event name is read from or written to the event being received or sent
95                 required: false
96             event_name_filter:
97                 type: string
98                 description: Specifies a filter as a regular expression, events that do not match the filter are dropped, the default is to let all events through
99                 required: false
100             synchronous_mode:
101                 type: bool
102                 description: Specifies the event handler is syncronous (receive event and send response)
103                 required: false
104                 default: false
105             synchronous_peer:
106                 type: string
107                 description: The peer event handler (output for input or input for output) of this event handler in synchronous mode, this parameter is mandatory if the event handler is in synchronous mode
108                 required: false
109                 default: ""
110             synchronous_timeout:
111                 type: int
112                 description: The timeout in milliseconds for responses to be issued by APEX torequests, this parameter is mandatory if the event handler is in synchronous mode
113                 required: false
114                 default: ""
115             requestor_mode:
116                 type: bool
117                 description: Specifies the event handler is in requestor mode (send event and wait for response mode)
118                 required: false
119                 default: false
120             requestor_peer:
121                 type: string
122                 description: The peer event handler (output for input or input for output) of this event handler in requestor mode, this parameter is mandatory if the event handler is in requestor mode
123                 required: false
124                 default: ""
125             requestor_timeout:
126                 type: int
127                 description: The timeout in milliseconds for wait for responses to requests, this parameter is mandatory if the event handler is in requestor mode
128                 required: false
129                 default: ""
130     onap.datatypes.native.apex.CarrierTechnology:
131         derived_from: tosca.datatypes.Root
132         properties:
133             label:
134                 type: string
135                 description: The label (name) of the carrier technology (such as REST, Kafka, WebSocket)
136                 required: true
137             plugin_parameter_class_name:
138                 type: string
139                 description: The class name of the class that overrides default handling of event input or output for this carrier technology, defaults to the supplied input or output class
140                 required: false
141     onap.datatypes.native.apex.EventProtocol:
142         derived_from: tosca.datatypes.Root
143         properties:
144             label:
145                 type: string
146                 description: The label (name) of the event protocol (such as Yaml, JSON, XML, or POJO)
147                 required: true
148             event_protocol_plugin_class:
149                 type: string
150                 description: The class name of the class that overrides default handling of the event protocol for this carrier technology, defaults to the supplied event protocol class
151                 required: false
152     onap.datatypes.native.apex.Environmental:
153         derived_from: tosca.datatypes.Root
154         properties:
155             name:
156                 type: string
157                 description: The name of the environment variable
158                 required: true
159             value:
160                 type: string
161                 description: The value of the environment variable
162                 required: true
163     onap.datatypes.native.apex.engineservice.Engine:
164         derived_from: tosca.datatypes.Root
165         properties:
166             context:
167                 type: onap.datatypes.native.apex.engineservice.engine.Context
168                 description: The properties for handling context in APEX engines, defaults to using Java maps for context
169                 required: false
170             executors:
171                 type: map
172                 description: The plugins for policy executors used in engines such as javascript, MVEL, Jython
173                 required: true
174                 entry_schema:
175                     description: The plugin class path for this policy executor
176                     type: string
177     onap.datatypes.native.apex.engineservice.engine.Context:
178         derived_from: tosca.datatypes.Root
179         properties:
180             distributor:
181                 type: onap.datatypes.native.apex.Plugin
182                 description: The plugin to be used for distributing context between APEX PDPs at runtime
183                 required: false
184             schemas:
185                 type: map
186                 description: The plugins for context schemas available in APEX PDPs such as Java and Avro
187                 required: false
188                 entry_schema:
189                     type: onap.datatypes.native.apex.Plugin
190             locking:
191                 type: onap.datatypes.native.apex.plugin
192                 description: The plugin to be used for locking context in and between APEX PDPs at runtime
193                 required: false
194             persistence:
195                 type: onap.datatypes.native.apex.Plugin
196                 description: The plugin to be used for persisting context for APEX PDPs at runtime
197                 required: false
198     onap.datatypes.native.apex.Plugin:
199         derived_from: tosca.datatypes.Root
200         properties:
201             name:
202                 type: string
203                 description: The name of the executor such as Javascript, Jython or MVEL
204                 required: true
205             plugin_class_name:
206                 type: string
207                 description: The class path of the plugin class for this executor