Versions Compared

Key

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

...

Code Block
languagejava
titleThe TargetHandling Interface
linenumberstrue
import java.util.Set;
import org.onap.policy.models.tosca.authorative.concepts.ToscaEntityKey;
import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate;

public interface TargetHandling {
    public boolean checkTargets(final ToscaEntityKey toscaPolicy,
                                final ToscaServiceTemplate serviceTemplate, final Object targetContext);
}

...


                                final Object executionContext);
}

When a PDP receives an event, it determines which policy the event has triggered. It then always calls the checkTargets method on the TargetHandling interface. The The toscaPolicy parameter contains the name and version of the policy that has been triggered. The serviceTemplate parameter provides the policy types and policy definitions that are known to the PDP to the targetsCommon component. Once the checkTargets method is called, the algorithm The executionContext parameter allows the PDP to pass any extra context it wishes the targetsCommon component and the XACML PDP to consider during the target check.

Once the checkTargets method is called, the algorithm described in the Execution Sequence section above is executed by the targetsCommon component.

...

The Target REST API is a specific REST API for targets, provided the XACML PDP. It executes a single target policy with each invocation, so it may be called multiple times by the targetsCommon component on a single checkTargets call. The Target REST API is similar in structure and design to the Policy Decision API.

FieldRequiredXACML equivalentDescription
ONAPNameTruesubjectThe name of the ONAP project making the call
ONAPComponentTruesubjectThe name of the ONAP sub component making the call
ONAPInstanceFalsesubjectAn optional instance ID for that sub component
targetsTrueresourceThe targets to check
policyTrueresourceThe policy to use for the target check
contextFalseresourceExtra context to be considered in the target check

The XACML PDP executes the logic and rules of requested target policy on the given targets using the given context. and returns a boolean result of true or false.

<Pamela Dragosh please comment here>

Specification of targets in TOSCA

...