...
PDP Engine | Content-Type | Description |
---|---|---|
PDP-D: Drools | application/vnd.onap.drools+text application/vnd.onap.drools.mvn+xml | Drools DRL text files. Question: Does Drools have a custom content-type already?? Maven XML dependency specification for a java artifact containing drools rules. Does maven have a custom content-type?? |
PDP-X: XACML | application/xacml+xml; version=3.0 | PerĀ http://docs.oasis-open.org/xacml/xacml-rest/v1.0/cos01/xacml-rest-v1.0-cos01.html |
PDP-A: Apex | application/vnd.onap.apex+json | Apex JSON policy files. TBC with Apex team |
2.1 PDP-D Content-Types
Two Content-Types can be used by policy authors to create native drools rules - "application/vnd.onap.drools+text" and "application/vnd.onap.drools.mvn+xml".
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <dependencies> <dependency> <groupId>org.onap.policy.controlloop</groupId> <artifactId>policy-ran-optimization</artifactId> <version>1.0.0-SNAPSHOT</version> </dependency> </dependencies> </project> |
2.2 PDP-X Content-Types
pam
2.3 PDP-A Content-Types
TBA
2.4 Endpoint Details
The Policy Lifecycle API will need to support new endpoints that consume these PDP specific Content-Type's as well as the ability to save them to the database.
HTTP Method | Endpoint | Content-Type | Description | Example | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
POST | /natives/{policy-id} | *see above | application/vnd.onap.drools.mvn+xml | Creates a native drools policy using the given id. Returns the id, version and version.created drl contents. Note: policy-id is the same as <artifactId> specified in the payload; policy-version is the same as <version> specified in the payload | 200
| GET | /natives
| ||||
PUT | /natives/{policy-id} | application/vnd.onap.drools+text | Updates a native drools policy. Return the id, version and updated drl contents. Note: policy-version is an auto-increased version on the original one. For example. the original version is "1.0.0". After this PUT call, the version returned could be "1.0.1". | 200
| |||||||
GET | /natives | application/json application/yaml | Returns a list of ID/Version of native policies | 200
| |||||||
GET | /natives/{policy-id} | application/json application/yaml | Get a list of versions | 200
| |||||||
GET | /natives/{policy-id}/versions/{policy-version} | application/json application/yaml | Get a particular version | 200
| |||||||
DELETE | /natives/{policy-id}/versions/{policy-version} | application/json application/yaml | Returns a list of ID/Version of natives policiesDelete a particular version | 200
| GET | /natives/{policy-id} | Get a list of versions | chenfei finish
|
3. PAP Enhancements
PDP Engines must now register with the PAP the native Content-Type's they support in order for policies to be deployed by the PAP engine to the PDP's. This will require an additional parameter in the Group Deploy/Undeploy to list the supported Content-Type's for the PDP engine. The proposal is to add a field "supportedContentTypes".
...