From 1dae974ae90724f089cf9d21b1794d3142a8df2f Mon Sep 17 00:00:00 2001 From: rameshiyer27 Date: Sun, 12 May 2024 22:44:43 +0100 Subject: Update PAP architecture documentation Issue-ID: POLICY-4585 Change-Id: I35bd79b5d9d1a95f0143e86861128d47984f35d0 Signed-off-by: zrrmmua --- docs/pap/notification/dmaap-pap-notif.json | 23 ------------ docs/pap/notification/kafka-pap-notif.json | 23 ++++++++++++ docs/pap/pap.rst | 52 +++----------------------- docs/pap/response/pdp-statistics-pap-resp.json | 45 ---------------------- docs/pap/response/statistics-pap-resp.json | 11 ------ 5 files changed, 28 insertions(+), 126 deletions(-) delete mode 100644 docs/pap/notification/dmaap-pap-notif.json create mode 100644 docs/pap/notification/kafka-pap-notif.json delete mode 100644 docs/pap/response/pdp-statistics-pap-resp.json delete mode 100644 docs/pap/response/statistics-pap-resp.json (limited to 'docs') diff --git a/docs/pap/notification/dmaap-pap-notif.json b/docs/pap/notification/dmaap-pap-notif.json deleted file mode 100644 index 07d1ac20..00000000 --- a/docs/pap/notification/dmaap-pap-notif.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "deployed-policies": [ - { - "policy-type": "onap.policies.monitoring.tcagen2", - "policy-type-version": "1.0.0", - "policy-id": "onap.scaleout.tca", - "policy-version": "2.0.0", - "success-count": 3, - "failure-count": 0 - } - ], - "undeployed-policies": [ - { - "policy-type": "onap.policies.monitoring.tcagen2", - "policy-type-version": "1.0.0", - "policy-id": "onap.firewall.tca", - "policy-version": "6.0.0", - "success-count": 3, - "failure-count": 0 - } - ] -} - diff --git a/docs/pap/notification/kafka-pap-notif.json b/docs/pap/notification/kafka-pap-notif.json new file mode 100644 index 00000000..07d1ac20 --- /dev/null +++ b/docs/pap/notification/kafka-pap-notif.json @@ -0,0 +1,23 @@ +{ + "deployed-policies": [ + { + "policy-type": "onap.policies.monitoring.tcagen2", + "policy-type-version": "1.0.0", + "policy-id": "onap.scaleout.tca", + "policy-version": "2.0.0", + "success-count": 3, + "failure-count": 0 + } + ], + "undeployed-policies": [ + { + "policy-type": "onap.policies.monitoring.tcagen2", + "policy-type-version": "1.0.0", + "policy-id": "onap.firewall.tca", + "policy-version": "6.0.0", + "success-count": 3, + "failure-count": 0 + } + ] +} + diff --git a/docs/pap/pap.rst b/docs/pap/pap.rst index c6da41b2..1515af53 100644 --- a/docs/pap/pap.rst +++ b/docs/pap/pap.rst @@ -122,14 +122,13 @@ PAP supports the operations listed in the following table, via its REST API: "Undeploy policy", "Undeploys a policy from the PDPs" "Policy Status", "Queries the status of all policies" "Policy deployment status", "Queries the status of all deployed policies" - "PDP statistics", "Queries the statistics of PDPs" "Policy Audit", "Queries the audit records of policies" -1.2 DMaaP API +1.2 KAFKA API ------------- -PAP interacts with the PDPs via the DMaaP Message Router. The messages listed -in the following table are transmitted via DMaaP: +PAP interacts with the PDPs via the kafka interface. The messages listed +in the following table are transmitted via Kafka: .. csv-table:: :header: "Message", "Direction", "Description" @@ -139,12 +138,12 @@ in the following table are transmitted via DMaaP: "PDP update", "Outgoing", "Assigns a PDP to a PDP Group and Subgroup; also deploys or undeploys policies from the PDP" "PDP state change", "Outgoing", "Changes the state of a PDP or all PDPs within a PDP Group or Subgroup" -In addition, PAP generates notifications via the DMaaP Message Router when policies are successfully or unsuccessfully +In addition, PAP generates notifications via the Kafka when policies are successfully or unsuccessfully deployed (or undeployed) from all relevant PDPs. Here is a sample notification: -.. literalinclude:: notification/dmaap-pap-notif.json +.. literalinclude:: notification/kafka-pap-notif.json :language: json @@ -201,22 +200,6 @@ Here is a sample response: .. literalinclude:: response/consolidated-healthcheck-pap-resp.json :language: json -.. csv-table:: - :header: "/statistics" - :widths: 10 - - `Statistics PAP Swagger <./local-swagger.html#tag/StatisticsRestControllerV1>`_ - -This operation allows statistics for PDP groups, PDP subgroups, and individual PDPs to be retrieved. - -.. note:: - While this API is supported, most of the statistics are not currently updated; that work has been deferred to a later - release. - -Here is a sample response: - -.. literalinclude:: response/statistics-pap-resp.json - :language: json .. csv-table:: :header: "/pdps/groups/{name}" @@ -386,21 +369,6 @@ Here is a sample response: .. literalinclude:: response/deployed-policy-pap-resp.json :language: json -.. csv-table:: - :header: "/pdps/statistics" - :widths: 10 - - `Policy Statistics PAP Swagger <./local-swagger.html#tag/StatisticsRestControllerV1>`_ - -This operation allows the PDP statistics to be retrieved for all registered PDPs. -The result can be filtered based on PDP group, PDP subgroup & PDP instance. -Along with record count, start time & end time as query parameters. - -Here is a sample response: - -.. literalinclude:: response/pdp-statistics-pap-resp.json - :language: json - .. csv-table:: :header: "/policies/audit" :widths: 10 @@ -424,15 +392,5 @@ The *PolicyAdministration* component (PAP) is initialized using a configuration The configuration file is a YAML file containing the relevant fields for configuring the REST server, Database and DMaaP connectivity and so on. -3.1 Disable collection of PDP Statistics -======================================== - -This configuration is to inform PAP to not save the PDP statistics in the database. - -In *papParameters.yaml*, add or change the property savePdpStatisticsInDb to false. - -.. note:: - By default, if the property is not present, it will be considered as false and - PDP statistics will not be saved in the database. End of Document diff --git a/docs/pap/response/pdp-statistics-pap-resp.json b/docs/pap/response/pdp-statistics-pap-resp.json deleted file mode 100644 index 77b03444..00000000 --- a/docs/pap/response/pdp-statistics-pap-resp.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "defaultGroup": { - "apex": [ - { - "pdpInstanceId": "dev-policy-apex-pdp-0", - "timeStamp": "Apr 29, 2020, 6:15:29 PM", - "pdpGroupName": "defaultGroup", - "pdpSubGroupName": "apex", - "policyDeployCount": 0, - "policyDeploySuccessCount": 0, - "policyDeployFailCount": 0, - "policyExecutedCount": 0, - "policyExecutedSuccessCount": 0, - "policyExecutedFailCount": 0, - "engineStats": [] - }, - { - "pdpInstanceId": "dev-policy-apex-pdp-0", - "timeStamp": "Apr 29, 2020, 6:17:29 PM", - "pdpGroupName": "defaultGroup", - "pdpSubGroupName": "apex", - "policyDeployCount": 0, - "policyDeploySuccessCount": 0, - "policyDeployFailCount": 0, - "policyExecutedCount": 0, - "policyExecutedSuccessCount": 0, - "policyExecutedFailCount": 0, - "engineStats": [] - }, - { - "pdpInstanceId": "dev-policy-apex-pdp-0", - "timeStamp": "Apr 29, 2020, 6:19:29 PM", - "pdpGroupName": "defaultGroup", - "pdpSubGroupName": "apex", - "policyDeployCount": 0, - "policyDeploySuccessCount": 0, - "policyDeployFailCount": 0, - "policyExecutedCount": 0, - "policyExecutedSuccessCount": 0, - "policyExecutedFailCount": 0, - "engineStats": [] - } - ] - } -} \ No newline at end of file diff --git a/docs/pap/response/statistics-pap-resp.json b/docs/pap/response/statistics-pap-resp.json deleted file mode 100644 index 836b5956..00000000 --- a/docs/pap/response/statistics-pap-resp.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "code": 200, - "policyDeployFailureCount": 0, - "policyDeploySuccessCount": 0, - "policyDownloadFailureCount": 0, - "policyDownloadSuccessCount": 0, - "totalPdpCount": 0, - "totalPdpGroupCount": 0, - "totalPolicyDeployCount": 0, - "totalPolicyDownloadCount": 0 -} -- cgit 1.2.3-korg