Fix op policies distribution to controllers
[policy/drools-pdp.git] / feature-lifecycle / src / test / resources / tosca-policy-native-controller-example.json
1 {
2     "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
3     "topology_template": {
4         "policies": [
5             {
6                 "example.controller": {
7                     "type": "onap.policies.native.drools.Controller",
8                     "type_version": "1.0.0",
9                     "version": "1.0.0",
10                     "name": "example.controller",
11                     "metadata": {
12                         "policy-id": "example.controller"
13                     },
14                     "properties": {
15                         "controllerName": "lifecycle",
16                         "sourceTopics": [
17                             {
18                                 "topicName": "DCAE_TOPIC",
19                                 "events": [
20                                     {
21                                         "eventClass": "org.onap.policy.controlloop.CanonicalOnset",
22                                         "eventFilter": "[?($.closedLoopEventStatus == 'ONSET')]",
23                                         "customSerialization": {
24                                             "customSerializerClass": "org.onap.policy.controlloop.util.Serialization",
25                                             "jsonParser": "gson"
26                                         }
27                                     },
28                                     {
29                                         "eventClass": "org.onap.policy.controlloop.CanonicalAbated",
30                                         "eventFilter": "[?($.closedLoopEventStatus == 'ABATED')]"
31                                     }
32                                 ]
33                             }
34                         ],
35                         "sinkTopics": [
36                             {
37                                 "topicName": "APPC-CL",
38                                 "events": [
39                                     {
40                                         "eventClass": "org.onap.policy.appc.Response",
41                                         "eventFilter": "[?($.CommonHeader && $.Status)]",
42                                         "customSerialization": {
43                                             "customSerializerClass": "org.onap.policy.appc.util.Serialization",
44                                             "jsonParser": "gsonPretty"
45                                         }
46                                     }
47                                 ]
48                             }
49                         ],
50                         "customConfig": {
51                             "field1" : "value1"
52                         }
53                     }
54                 }
55             }
56         ]
57     }
58 }