From 3f563fe552e35b3bc3d95c47a3cabdfe7645ad07 Mon Sep 17 00:00:00 2001 From: jhh Date: Thu, 5 Mar 2020 22:32:58 -0600 Subject: policy routing and reorg into policy-domains - Native Drools Controller Policy support. - Move domain policies into the policy-domains project. - Route legacy/compliant operational policies to one or all controller supporting the policy's policy type. - Enhancements to scripts to invoke commands external to the container. Issue-ID: POLICY-2388 Signed-off-by: jhh Change-Id: Id41f04d10a28d2ea86bdd41334e499c28d0438ae Signed-off-by: jhh --- .../tosca-policy-native-controller-example.json | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 feature-lifecycle/src/test/resources/tosca-policy-native-controller-example.json (limited to 'feature-lifecycle/src/test/resources/tosca-policy-native-controller-example.json') diff --git a/feature-lifecycle/src/test/resources/tosca-policy-native-controller-example.json b/feature-lifecycle/src/test/resources/tosca-policy-native-controller-example.json new file mode 100644 index 00000000..3d716845 --- /dev/null +++ b/feature-lifecycle/src/test/resources/tosca-policy-native-controller-example.json @@ -0,0 +1,58 @@ +{ + "tosca_definitions_version": "tosca_simple_yaml_1_0_0", + "topology_template": { + "policies": [ + { + "example": { + "type": "onap.policies.native.drools.Controller", + "type_version": "1.0.0", + "version": "1.0.0", + "name": "example", + "metadata": { + "policy-id": "example" + }, + "properties": { + "controllerName": "lifecycle", + "sourceTopics": [ + { + "topicName": "DCAE_TOPIC", + "events": [ + { + "eventClass": "org.onap.policy.controlloop.CanonicalOnset", + "eventFilter": "[?($.closedLoopEventStatus == 'ONSET')]", + "customSerialization": { + "customSerializerClass": "org.onap.policy.controlloop.util.Serialization", + "jsonParser": "gson" + } + }, + { + "eventClass": "org.onap.policy.controlloop.CanonicalAbated", + "eventFilter": "[?($.closedLoopEventStatus == 'ABATED')]" + } + ] + } + ], + "sinkTopics": [ + { + "topicName": "APPC-CL", + "events": [ + { + "eventClass": "org.onap.policy.appc.Response", + "eventFilter": "[?($.CommonHeader && $.Status)]", + "customSerialization": { + "customSerializerClass": "org.onap.policy.appc.util.Serialization", + "jsonParser": "gsonPretty" + } + } + ] + } + ], + "customConfig": { + "field1" : "value1" + } + } + } + } + ] + } +} \ No newline at end of file -- cgit 1.2.3-korg