summaryrefslogtreecommitdiffstats
path: root/docs/pap
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2019-08-01 11:05:24 -0400
committerJim Hahn <jrh3@att.com>2019-08-01 11:05:24 -0400
commit0f079d2fa0cc68c3a682e0e0f73511dd576066ba (patch)
tree584a3107f50da11cf2bbf00000064d94e432547f /docs/pap
parent717a24ad1b50b1cfa2eed6efbeb60babfa0c4c1c (diff)
Add sample requests and responses to PAP docs
Change-Id: I8f2643216bcc8fb2f64dd50296570ab41ea6423c Issue-ID: POLICY-1865 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'docs/pap')
-rw-r--r--docs/pap/pap.rst25
-rw-r--r--docs/pap/request/group-pap-req.json39
-rw-r--r--docs/pap/request/policy-deploy-pap-req.json17
-rw-r--r--docs/pap/response/group-query-pap-resp.json190
-rw-r--r--docs/pap/response/health-check-pap-resp.json7
-rw-r--r--docs/pap/response/statistics-pap-resp.json11
6 files changed, 289 insertions, 0 deletions
diff --git a/docs/pap/pap.rst b/docs/pap/pap.rst
index b420279c..97bcb825 100644
--- a/docs/pap/pap.rst
+++ b/docs/pap/pap.rst
@@ -111,6 +111,11 @@ are added in the response to each call:
This operation performs a health check on the PAP.
+Here is a sample response:
+
+.. literalinclude:: response/health-check-pap-resp.json
+ :language: json
+
.. swaggerv2doc:: swagger/statistics-pap.json
This operation allows statistics for PDP groups, PDP subgroups, and individual PDPs to be retrieved.
@@ -119,6 +124,11 @@ This operation allows statistics for PDP groups, PDP subgroups, and individual P
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
+
.. swaggerv2doc:: swagger/state-change-pap.json
The state of PDP groups is managed by this operation. PDP groups can be in states PASSIVE, TEST, SAFE, or ACTIVE. For a full
@@ -133,6 +143,11 @@ in a single POST operation by specifying more than one PDP group in the POST ope
Due to current limitations, if a subgroup is to be deleted from a PDP Group, then the policies must be removed from
the subgroup in one request, and then the subgroup deleted in a subsequent request.
+Here is a sample request:
+
+.. literalinclude:: request/group-pap-req.json
+ :language: json
+
.. swaggerv2doc:: swagger/group-delete-pap.json
The API also allows PDP groups to be deleted. DELETE operations are only permitted on PDP groups in PASSIVE state.
@@ -142,6 +157,11 @@ The API also allows PDP groups to be deleted. DELETE operations are only permitt
This operation allows the PDP groups and subgroups to be listed as well as the policies that are deployed on each PDP
group and subgroup.
+Here is a sample response:
+
+.. literalinclude:: response/group-query-pap-resp.json
+ :language: json
+
.. swaggerv2doc:: swagger/policy-deploy-pap.json
This operation allows policies to be deployed on PDP groups.
@@ -150,6 +170,11 @@ This operation allows policies to be deployed on PDP groups.
The policy version is optional. If left unspecified, then the latest version of the policy is deployed. On the other
hand, if it is specified, it may be an integer, or it may be a fully qualified version (e.g., "3.0.2").
+Here is a sample request:
+
+.. literalinclude:: request/policy-deploy-pap-req.json
+ :language: json
+
.. swaggerv2doc:: swagger/policy-undeploy-pap.json
This operation allows policies to be undeployed from PDP groups.
diff --git a/docs/pap/request/group-pap-req.json b/docs/pap/request/group-pap-req.json
new file mode 100644
index 00000000..ebe38b92
--- /dev/null
+++ b/docs/pap/request/group-pap-req.json
@@ -0,0 +1,39 @@
+{
+ "groups": [
+ {
+ "name": "SampleGroup",
+ "pdpGroupState": "PASSIVE",
+ "pdpSubgroups": [
+ {
+ "pdpType": "apex",
+ "desiredInstanceCount": 2,
+ "properties": {},
+ "supportedPolicyTypes": [
+ {
+ "name": "onap.controllloop.operational.apex.bbs",
+ "version": "1.0.0"
+ }
+ ],
+ "policies": [
+ {
+ "name": "onap.controllloop.operational.apex.bbs.EastRegion",
+ "version": "1.0.0"
+ }
+ ]
+ },
+ {
+ "pdpType": "xacml",
+ "desiredInstanceCount": 1,
+ "properties": {},
+ "supportedPolicyTypes": [
+ {
+ "name": "onap.policies.monitoring.cdap.tca.hi.lo.app",
+ "version": "1.0.0"
+ }
+ ],
+ "policies": []
+ }
+ ]
+ }
+ ]
+}
diff --git a/docs/pap/request/policy-deploy-pap-req.json b/docs/pap/request/policy-deploy-pap-req.json
new file mode 100644
index 00000000..b01a051e
--- /dev/null
+++ b/docs/pap/request/policy-deploy-pap-req.json
@@ -0,0 +1,17 @@
+{
+ "policies": [
+ {
+ "policy-id": "onap.scaleout.tca",
+ "policy-version": 1
+ },
+ {
+ "policy-id": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3"
+ },
+ {
+ "policy-id": "guard.frequency.ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3"
+ },
+ {
+ "policy-id": "guard.minmax.ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3"
+ }
+ ]
+}
diff --git a/docs/pap/response/group-query-pap-resp.json b/docs/pap/response/group-query-pap-resp.json
new file mode 100644
index 00000000..eb8b1dbe
--- /dev/null
+++ b/docs/pap/response/group-query-pap-resp.json
@@ -0,0 +1,190 @@
+{
+ "groups": [
+ {
+ "description": "This group should be used for managing all control loop related policies and pdps",
+ "name": "controlloop",
+ "pdpGroupState": "ACTIVE",
+ "pdpSubgroups": [
+ {
+ "currentInstanceCount": 0,
+ "desiredInstanceCount": 1,
+ "pdpInstances": [],
+ "pdpType": "apex",
+ "policies": [],
+ "properties": {},
+ "supportedPolicyTypes": [
+ {
+ "name": "onap.policies.controlloop.Operational",
+ "version": "1.0.0"
+ }
+ ]
+ },
+ {
+ "currentInstanceCount": 0,
+ "desiredInstanceCount": 1,
+ "pdpInstances": [],
+ "pdpType": "drools",
+ "policies": [],
+ "properties": {},
+ "supportedPolicyTypes": [
+ {
+ "name": "onap.policies.controlloop.Operational",
+ "version": "1.0.0"
+ }
+ ]
+ },
+ {
+ "currentInstanceCount": 0,
+ "desiredInstanceCount": 1,
+ "pdpInstances": [],
+ "pdpType": "xacml",
+ "policies": [],
+ "properties": {},
+ "supportedPolicyTypes": [
+ {
+ "name": "onap.policies.controlloop.Guard",
+ "version": "1.0.0"
+ }
+ ]
+ }
+ ],
+ "properties": {}
+ },
+ {
+ "description": "This group should be used for managing all monitoring related policies and pdps",
+ "name": "monitoring",
+ "pdpGroupState": "ACTIVE",
+ "pdpSubgroups": [
+ {
+ "currentInstanceCount": 0,
+ "desiredInstanceCount": 1,
+ "pdpInstances": [],
+ "pdpType": "xacml",
+ "policies": [],
+ "properties": {},
+ "supportedPolicyTypes": [
+ {
+ "name": "onap.policies.Monitoring",
+ "version": "1.0.0"
+ }
+ ]
+ }
+ ],
+ "properties": {}
+ },
+ {
+ "description": "The default group that registers all supported policy types and pdps.",
+ "name": "defaultGroup",
+ "pdpGroupState": "ACTIVE",
+ "pdpSubgroups": [
+ {
+ "currentInstanceCount": 0,
+ "desiredInstanceCount": 1,
+ "pdpInstances": [],
+ "pdpType": "apex",
+ "policies": [],
+ "properties": {},
+ "supportedPolicyTypes": [
+ {
+ "name": "onap.policies.controlloop.operational.Apex",
+ "version": "1.0.0"
+ }
+ ]
+ },
+ {
+ "currentInstanceCount": 0,
+ "desiredInstanceCount": 1,
+ "pdpInstances": [],
+ "pdpType": "drools",
+ "policies": [],
+ "properties": {},
+ "supportedPolicyTypes": [
+ {
+ "name": "onap.policies.controlloop.Operational",
+ "version": "1.0.0"
+ }
+ ]
+ },
+ {
+ "currentInstanceCount": 0,
+ "desiredInstanceCount": 1,
+ "pdpInstances": [],
+ "pdpType": "xacml",
+ "policies": [],
+ "properties": {},
+ "supportedPolicyTypes": [
+ {
+ "name": "onap.policies.controlloop.guard.FrequencyLimiter",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.controlloop.guard.MinMax",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.controlloop.guard.Blacklist",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.controlloop.guard.coordination.FirstBlocksSecond",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.Monitoring",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.monitoring.cdap.tca.hi.lo.app",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.monitoring.docker.sonhandler.app",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.AffinityPolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.DistancePolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.HpaPolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.OptimizationPolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.PciPolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.QueryPolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.SubscriberPolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.Vim_fit",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.VnfPolicy",
+ "version": "1.0.0"
+ }
+ ]
+ }
+ ],
+ "properties": {}
+ }
+ ]
+}
diff --git a/docs/pap/response/health-check-pap-resp.json b/docs/pap/response/health-check-pap-resp.json
new file mode 100644
index 00000000..faebbe06
--- /dev/null
+++ b/docs/pap/response/health-check-pap-resp.json
@@ -0,0 +1,7 @@
+{
+ "code": 200,
+ "healthy": true,
+ "message": "alive",
+ "name": "Policy PAP",
+ "url": "self"
+}
diff --git a/docs/pap/response/statistics-pap-resp.json b/docs/pap/response/statistics-pap-resp.json
new file mode 100644
index 00000000..836b5956
--- /dev/null
+++ b/docs/pap/response/statistics-pap-resp.json
@@ -0,0 +1,11 @@
+{
+ "code": 200,
+ "policyDeployFailureCount": 0,
+ "policyDeploySuccessCount": 0,
+ "policyDownloadFailureCount": 0,
+ "policyDownloadSuccessCount": 0,
+ "totalPdpCount": 0,
+ "totalPdpGroupCount": 0,
+ "totalPolicyDeployCount": 0,
+ "totalPolicyDownloadCount": 0
+}