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