8c780f64a3845984c1271fa5239e618ad40e6db0
[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: integer
47                 description: Specifies the engine id
48                 required: true
49             instance_count:
50                 type: integer
51                 description: Specifies the number of engine threads that should be run
52                 required: true
53             deployment_port:
54                 type: integer
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             policy_type_impl:
63                 type: string
64                 description: The policy type implementation from which to read the APEX policy model
65                 required: false
66             periodic_event_period:
67                 type: string
68                 description: The time interval in milliseconds for the periodic scanning event, 0 means don't scan
69                 required: false
70             engine:
71                 type: onap.datatypes.native.apex.engineservice.Engine
72                 description: The parameters for all engines in the APEX engine service
73                 required: true
74     onap.datatypes.native.apex.EventHandler:
75         derived_from: tosca.datatypes.Root
76         properties:
77             name:
78                 type: string
79                 description: Specifies the event handler name, if not specified this is set to the key name
80                 required: false
81             carrier_technology:
82                 type: onap.datatypes.native.apex.CarrierTechnology
83                 description: Specifies the carrier technology of the event handler (such as REST/Web Socket/Kafka)
84                 required: true
85             event_protocol:
86                 type: onap.datatypes.native.apex.EventProtocol
87                 description: Specifies the event protocol of events for the event handler (such as Yaml/JSON/XML/POJO)
88                 required: true
89             event_name:
90                 type: string
91                 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
92                 required: false
93             event_name_filter:
94                 type: string
95                 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
96                 required: false
97             synchronous_mode:
98                 type: boolean
99                 description: Specifies the event handler is syncronous (receive event and send response)
100                 required: false
101                 default: false
102             synchronous_peer:
103                 type: string
104                 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
105                 required: false
106             synchronous_timeout:
107                 type: integer
108                 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
109                 required: false
110             requestor_mode:
111                 type: boolean
112                 description: Specifies the event handler is in requestor mode (send event and wait for response mode)
113                 required: false
114                 default: false
115             requestor_peer:
116                 type: string
117                 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
118                 required: false
119             requestor_timeout:
120                 type: integer
121                 description: The timeout in milliseconds for wait for responses to requests, this parameter is mandatory if the event handler is in requestor mode
122                 required: false
123     onap.datatypes.native.apex.CarrierTechnology:
124         derived_from: tosca.datatypes.Root
125         properties:
126             label:
127                 type: string
128                 description: The label (name) of the carrier technology (such as REST, Kafka, WebSocket)
129                 required: true
130             plugin_parameter_class_name:
131                 type: string
132                 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
133                 required: false
134     onap.datatypes.native.apex.EventProtocol:
135         derived_from: tosca.datatypes.Root
136         properties:
137             label:
138                 type: string
139                 description: The label (name) of the event protocol (such as Yaml, JSON, XML, or POJO)
140                 required: true
141             event_protocol_plugin_class:
142                 type: string
143                 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
144                 required: false
145     onap.datatypes.native.apex.Environment:
146         derived_from: tosca.datatypes.Root
147         properties:
148             name:
149                 type: string
150                 description: The name of the environment variable
151                 required: true
152             value:
153                 type: string
154                 description: The value of the environment variable
155                 required: true
156     onap.datatypes.native.apex.engineservice.Engine:
157         derived_from: tosca.datatypes.Root
158         properties:
159             context:
160                 type: onap.datatypes.native.apex.engineservice.engine.Context
161                 description: The properties for handling context in APEX engines, defaults to using Java maps for context
162                 required: false
163             executors:
164                 type: map
165                 description: The plugins for policy executors used in engines such as javascript, MVEL, Jython
166                 required: true
167                 entry_schema:
168                     description: The plugin class path for this policy executor
169                     type: string
170     onap.datatypes.native.apex.engineservice.engine.Context:
171         derived_from: tosca.datatypes.Root
172         properties:
173             distributor:
174                 type: onap.datatypes.native.apex.Plugin
175                 description: The plugin to be used for distributing context between APEX PDPs at runtime
176                 required: false
177             schemas:
178                 type: map
179                 description: The plugins for context schemas available in APEX PDPs such as Java and Avro
180                 required: false
181                 entry_schema:
182                     type: onap.datatypes.native.apex.Plugin
183             locking:
184                 type: onap.datatypes.native.apex.Plugin
185                 description: The plugin to be used for locking context in and between APEX PDPs at runtime
186                 required: false
187             persistence:
188                 type: onap.datatypes.native.apex.Plugin
189                 description: The plugin to be used for persisting context for APEX PDPs at runtime
190                 required: false
191     onap.datatypes.native.apex.Plugin:
192         derived_from: tosca.datatypes.Root
193         properties:
194             name:
195                 type: string
196                 description: The name of the executor such as Javascript, Jython or MVEL
197                 required: true
198             plugin_class_name:
199                 type: string
200                 description: The class path of the plugin class for this executor