...
A more formal approach is preferred. For policy type implementations, programmers use a specific Eclipse project type for developing each type of implementation, a Policy Type Implementation SDK. The project is under source control in git. This Eclipse project is structured correctly for creating implementations for a specific type of PDP. It includes the correct POM files for generating the policy type implementation and has editors and perspectives that aid programmers in their work.
2.2.2 Policy
...
Design
The PolicyCreation function of PolicyDevelopment creates a concrete policy policies from a policy templatetype. Policies can be created in several ways during a "design" process. At design time, a The information expressed during policy type design is used to parameterize a policy type to create an executable policy. A service designer and/or operations team can use the models specified on a policy template tooling that reads the TOSCA Policy Type specifications to express and capture a policy at its highest abstraction level. Alternatively, the logic of parameter for the policy can be expressed using a specific policy language if desired.The information expressed during policy design is used to specialize a policy template to create an executable policyin a raw JSON or YAML file and posted over the policy design API described on the Model driven Control Loop Design page.
A number of mechanisms for policy creation are supported in ONAP. The process in PolicyDevelopment for creating a policy is the same for all mechanisms. The most general mechanism for creating a policy is using the RESTful Policy Design API, which provides a full interface to the templating and policy generation creation support of PolicyDevelopment. This API may be exercised directly using utilities such as curl. PolicyDevelopment provides a command line tool that is a loose wrapper around the API. It also provides a general purpose Policy GUI in the ONAP Portal for policy creation, which again is a general purpose wrapper around the policy creation API. The Policy GUI can interpret any TOSCA Model ingested and flexibly presents a GUI for a user to create policies from. The development of these mechanisms will be phased over a number of ONAP releases.
A number of ONAP components use policy in manners which are specific to their particular needs. The manner in which the policy creation process is triggered and the way in which information required to specialize create a policy template is specified and accessed is specialized for these ONAP components.
...