aboutsummaryrefslogtreecommitdiffstats
path: root/docs/design
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2019-09-10 12:25:24 -0400
committerPamela Dragosh <pdragosh@research.att.com>2019-09-11 11:57:04 -0400
commit20cf0279aff071c4573275539d7cde0b4f10d835 (patch)
treee643dd2c0da84eb617d47ecba4429129f6ff1d1b /docs/design
parent9991a36b5581bdbdda18b45e56ff63f12a74675b (diff)
Update Decision API and Optimization doc
More examples for Decision API in the design document and also update the changes for Optimization application in XACML PDP. Issue-ID: POLICY-2071 Change-Id: I0880e40a428dd299c1b4c1f60ccf3f009c53e929 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'docs/design')
-rw-r--r--docs/design/design.rst100
1 files changed, 98 insertions, 2 deletions
diff --git a/docs/design/design.rst b/docs/design/design.rst
index cceba0fc..da0c3dc3 100644
--- a/docs/design/design.rst
+++ b/docs/design/design.rst
@@ -449,7 +449,12 @@ action R String The action that the ONAP component is performing
These sub metadata structures are used to scope the resource the ONAP component is performing an action upon. At least
one must be specified in order for Policy to return a decision. Multiple structures may be utilized to help define a
-precise scope for a decision.
+precise scope for a decision.
+
+4.4.1 Policy Decision API - DCAE configuration examples
+-------------------------------------------------------
+
+These resource fields are examples on how DCAE implements its "configure" application to make Decision API calls.
================= ======= ======== ==================================================================
**Field** **R/O** **Type** **Description**
@@ -795,5 +800,96 @@ This example below shows the JSON body of a query to return all the deployed pol
}
}
-End of Document
+4.4.2 Policy Decision API - Guard Decision API examples
+-------------------------------------------------------
+
+These resource fields are examples on how Drools-PDP implements its "guard" application to make Decision API calls. This
+structure is a transition from the legacy guard API calls. So each of these resources are contained under a "guard" object
+in the "resource" object of the JSON structure.
+
+================= ======= ======== ==================================================================
+**Field** **R/O** **Type** **Description**
+================= ======= ======== ==================================================================
+actor O String The actor (eg APPC, SO) that is performing a recipe
+recipe O String The recipe (eg Restart, Reboot) that the actor going to execute
+clname O String The unique ID for the Control Loop
+target O String The target VNF the actor is executing the recipe on
+vfCount O String Specific to SO "VF Module Create" - the current count of VNFs
+
+================= ======= ======== ==================================================================
+
+This example below shows the JSON body of a guard Decision API call.
+
+.. code-block:: json
+ :caption: Decision API Call - Guard
+ :linenos:
+
+ {
+ "ONAPName": "Policy",
+ "ONAPComponent": "drools-pdp",
+ "ONAPInstance": "usecase-template",
+ "requestId": "unique-request-id-1",
+ "action": "guard",
+ "resource": {
+ "guard": {
+ "actor": "SO",
+ "recipe": "VF Module Create",
+ "clname": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
+ "target": "vLoadBalancer-00",
+ "vfCount": "1"
+ }
+ }
+ }
+
+.. code-block:: json
+ :caption: Decision Response - Guard
+ :linenos:
+ {"status":"Permit"}
+
+4.4.3 Policy Decision API - Optimize Decision API examples
+----------------------------------------------------------
+
+These resource fields are examples on how OOF project will make Decision API calls. NOTE: The OOF project
+has not yet upgraded to the API. This work is scheduled for Frankfurt.
+
+================= ======= ============== ==================================================================
+**Field** **R/O** **Type** **Description**
+================= ======= ============== ==================================================================
+scope O List of String Optional scope for the policy.
+services O List of String One or more services the policy applies to.
+resources O List of String The unique ID for the Control Loop
+geography O List of String The target VNF the actor is executing the recipe on
+
+================= ======= ======== ==================================================================
+
+This example below shows the JSON body of an Optimize Decision API call.
+
+.. code-block:: json
+ :caption: Decision API Call - Optimize vCPE service in US
+ :linenos:
+
+ {
+ "ONAPName": "OOF",
+ "ONAPComponent": "OOF-component",
+ "ONAPInstance": "OOF-component-instance",
+ "action": "optimize",
+ "resource": {
+ "scope": [],
+ "services": ["vCPE"],
+ "resources": [],
+ "geography": ["US"]
+ }
+ }
+
+.. code-block:: json
+ :caption: Decision Response -
+ :linenos:
+
+ {
+ "policies:" {
+ ### Omitted for brevity
+ }
+ }
+
+End of Document