Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

2.1.2 TOSCA Policy for Native Drools Rules

Below is an example of TOSCA policy for native Drools rules

Code Block
languageyml
titleExample TOSCA policy for native Drools rules
linenumberstrue
collapsetrue
tosca_definitions_version: tosca_simple_yaml_1_0_0
topology_template:
  policies:
    - 
        Example_policy_name:
            type: onap.policies.controlloop.native.Drools
            version: 1.0.0
            metadata:
                policy-id: Example_policy_name
            properties:
                rule_artifact:
                    groupId: org.onap.policy.native
                    artifactId: example_controlloop
                    version: 1.0.0-SNAPSHOT
                drools_controller:
                    controllerName:
                    sourceTopics: 
                        -
                            topicName: POLICY_INPUT
                            dmaapServer: example_dmaap_server
                            serialization:
                                - 
                                    eventCanonicalName: org.onap.policy.controlloop.event.ControlLoopEvent
                                    eventFilter: [?($.closedLoopControlName == 'example_controlloop_name')]
                                    customSerializer: org.onap.policy.controlloop.utils.serializer,gson
                        -
                            topicName: SDNR_TO_POLICY
                            dmaapServer: example_dmaap_server
                            serialization:
                                - 
                                    eventCanonicalName: org.onap.policy.controlloop.event.Response
                                    eventFilter: [?($.closedLoopControlName == 'example_controlloop_name' && $.action == 'example_action')]
                                    customSerializer: org.onap.policy.controlloop.utils.serializer,gson
                    sinkTopics: 
                        -
                            topicName: POLICY_TO_SDNR
                            dmaapServer: example_dmaap_server
                            serialization:
                                - 
                                    eventCanonicalName: org.onap.policy.controlloop.event.Request
                                    eventFilter: [?($.closedLoopControlName == 'example_controlloop_name' && $.action == 'example_action')]
                                    customSerializer: org.onap.policy.controlloop.utils.serializer,gson

2.2 Native XACML Policy Support

...