summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/pap/pap.rst113
-rw-r--r--docs/pap/swagger/group-delete-pap.json94
-rw-r--r--docs/pap/swagger/group-pap.json226
-rw-r--r--docs/pap/swagger/group-query-pap.json210
-rw-r--r--docs/pap/swagger/health-check-pap.json71
-rw-r--r--docs/pap/swagger/policy-deploy-pap.json118
-rw-r--r--docs/pap/swagger/policy-undeploy-pap.json166
-rw-r--r--docs/pap/swagger/state-change-pap.json101
-rw-r--r--docs/pap/swagger/statistics-pap.json91
9 files changed, 1188 insertions, 2 deletions
diff --git a/docs/pap/pap.rst b/docs/pap/pap.rst
index a7edc64f..a76ab807 100644
--- a/docs/pap/pap.rst
+++ b/docs/pap/pap.rst
@@ -1,13 +1,122 @@
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
.. _pap-label:
Policy Administration Point (PAP) Architecture
-----------------------------------------------
+==============================================
.. toctree::
- :maxdepth: 1
+The PAP keeps track of PDPs, supporting the deployment of PDP groups and the
+deployment of a *policy set* across those PDP groups. Policies are created
+using the Policy API, but are deployed via the PAP.
+A PAP is stateless in
+a RESTful sense, using the database (persistent storage) to track PDPs and
+the deployment of policies to those PDPs. In short, policy management on PDPs
+is the responsibility of PAPs; management of policy sets or policies by any
+other manner is not permitted.
+Because the PDP is the main unit of scalability in the Policy Framework, the
+framework is designed to allow PDPs in a PDP group to arbitrarily appear and
+disappear and for policy consistency across all PDPs in a PDP group to be
+easily maintained. The PAP is responsible for controlling the state across
+the PDPs in a PDP group. The PAP interacts with the Policy database and
+transfers policy sets to PDPs.
+
+
+REST API
+--------
+
+PAP supports the operations listed in the following table, via its REST API:
+
+.. csv-table::
+ :header: "Operation", "Description"
+ :widths: 25,70
+
+ "Health check", "Queries the health of the PAP"
+ "Statistics", "Queries various statistics"
+ "PDP state change", "Changes the state of all PDPs in a PDP Group"
+ "PDP Group create/update", "Creates/updates PDP Groups"
+ "PDP Group delete", "Deletes a PDP Group"
+ "PDP Group query", "Queries all PDP Groups"
+ "Deploy policy", "Deploys one or more policies to the PDPs"
+ "Undeploy policy", "Undeploys a policy from the PDPs"
+
+
+DMaaP API
+---------
+
+PAP interacts with the PDPs via the DMaaP Message Router. The messages listed
+in the following table are transmitted via DMaaP:
+
+.. csv-table::
+ :header: "Message", "Direction", "Description"
+ :widths: 25,10,70
+
+ "PDP status", "Incoming", "Registers a PDP with PAP; also sent as a periodic heart beat; also sent in response to requests from the PAP"
+ "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"
+
+
+PAP REST API Swagger
+--------------------
+
+It is worth noting that we use basic authorization for access with user name
+and password set to *healthcheck* and *zb!XztG34*, respectively.
+
+For every call, the client is encouraged to insert a uuid-type *requestID* as
+parameter. It is helpful for tracking each http transaction and facilitates
+debugging. More importantly, it complies with Logging requirements v1.2. If
+the client does not provide the requestID in a call, one will be randomly
+generated and attached to the response header, *x-onap-requestid*.
+
+In accordance with `ONAP API Common Versioning Strategy Guidelines <https://wiki.onap.org/display/DW/ONAP+API+Common+Versioning+Strategy+%28CVS%29+Guidelines>`_,
+several custom headers are added in the response to each call:
+
+.. csv-table::
+ :header: "Header", "Example value", "Description"
+ :widths: 25,10,70
+
+ "x-latestversion", "1.0.0", "latest version of the API"
+ "x-minorversion", "0", "MINOR version of the API"
+ "x-patchversion", "0", "PATCH version of the API"
+ "x-onap-requestid", "e1763e61-9eef-4911-b952-1be1edd9812b", "described above; used for logging purposes"
+
+
+.. swaggerv2doc:: swagger/health-check-pap.json
+
+.. swaggerv2doc:: swagger/statistics-pap.json
+
+Note: while this API is supported, most of the statistics
+are not currently updated; that work has been deferred to a later release.
+
+.. swaggerv2doc:: swagger/state-change-pap.json
+
+.. swaggerv2doc:: swagger/group-pap.json
+
+Note: 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.
+
+.. swaggerv2doc:: swagger/group-delete-pap.json
+
+.. swaggerv2doc:: swagger/group-query-pap.json
+
+.. swaggerv2doc:: swagger/policy-deploy-pap.json
+
+Note: 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").
+
+.. swaggerv2doc:: swagger/policy-undeploy-pap.json
+
+Note: if the policy version is specified, then it
+may be an integer, or it may be a fully qualified version (e.g., "3.0.2").
+On the other hand, if left unspecified, then the latest deployed version
+will be undeployed.
+
+Note: due to current limitations, a fully qualified policy version must
+always be specified.
End of Document
diff --git a/docs/pap/swagger/group-delete-pap.json b/docs/pap/swagger/group-delete-pap.json
new file mode 100644
index 00000000..e670b5db
--- /dev/null
+++ b/docs/pap/swagger/group-delete-pap.json
@@ -0,0 +1,94 @@
+{
+ "swagger" : "2.0",
+ "basePath" : "/",
+ "tags" : [ {
+ "name" : "PdpGroupDelete"
+ } ],
+ "schemes" : [ "http", "https" ],
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "paths" : {
+ "/policy/pap/v1/pdps/groups/{name}" : {
+ "delete" : {
+ "tags" : [ "PdpGroupDelete" ],
+ "summary" : "Delete PDP Group",
+ "description" : "Deletes a PDP Group, returning optional error details",
+ "operationId" : "deleteGroup",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "X-ONAP-RequestID",
+ "in" : "header",
+ "description" : "RequestID for http transaction",
+ "required" : false,
+ "type" : "string",
+ "format" : "uuid"
+ }, {
+ "name" : "name",
+ "in" : "path",
+ "description" : "PDP Group Name",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "headers" : {
+ "X-MinorVersion" : {
+ "type" : "string",
+ "description" : "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client"
+ },
+ "X-PatchVersion" : {
+ "type" : "string",
+ "description" : "Used only to communicate a PATCH version in a response for troubleshooting purposes only, and will not be provided by the client on request"
+ },
+ "X-LatestVersion" : {
+ "type" : "string",
+ "description" : "Used only to communicate an API's latest version"
+ },
+ "X-ONAP-RequestID" : {
+ "type" : "string",
+ "format" : "uuid",
+ "description" : "Used to track REST transactions for logging purpose"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/definitions/PdpGroupDeleteResponse"
+ }
+ },
+ "401" : {
+ "description" : "Authentication Error"
+ },
+ "403" : {
+ "description" : "Authorization Error"
+ },
+ "500" : {
+ "description" : "Internal Server Error"
+ }
+ },
+ "security" : [ {
+ "basicAuth" : [ ]
+ } ],
+ "x-interface info" : {
+ "api-version" : "1.0.0",
+ "last-mod-release" : "Dublin"
+ }
+ }
+ }
+ },
+ "securityDefinitions" : {
+ "basicAuth" : {
+ "description" : "",
+ "type" : "basic"
+ }
+ },
+ "definitions" : {
+ "PdpGroupDeleteResponse" : {
+ "type" : "object",
+ "properties" : {
+ "errorDetails" : {
+ "type" : "string"
+ }
+ }
+ }
+ }
+}
diff --git a/docs/pap/swagger/group-pap.json b/docs/pap/swagger/group-pap.json
new file mode 100644
index 00000000..1298fffa
--- /dev/null
+++ b/docs/pap/swagger/group-pap.json
@@ -0,0 +1,226 @@
+{
+ "swagger" : "2.0",
+ "basePath" : "/",
+ "tags" : [ {
+ "name" : "PdpGroupDeploy"
+ } ],
+ "schemes" : [ "http", "https" ],
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "paths" : {
+ "/policy/pap/v1/pdps" : {
+ "post" : {
+ "tags" : [ "PdpGroupDeploy" ],
+ "summary" : "Deploy or update PDP Groups",
+ "description" : "Deploys or updates a PDP Group, returning optional error details",
+ "operationId" : "deployGroup",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "X-ONAP-RequestID",
+ "in" : "header",
+ "description" : "RequestID for http transaction",
+ "required" : false,
+ "type" : "string",
+ "format" : "uuid"
+ }, {
+ "in" : "body",
+ "name" : "body",
+ "description" : "List of PDP Group Configuration",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/definitions/PdpGroups"
+ }
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "headers" : {
+ "X-MinorVersion" : {
+ "type" : "string",
+ "description" : "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client"
+ },
+ "X-PatchVersion" : {
+ "type" : "string",
+ "description" : "Used only to communicate a PATCH version in a response for troubleshooting purposes only, and will not be provided by the client on request"
+ },
+ "X-LatestVersion" : {
+ "type" : "string",
+ "description" : "Used only to communicate an API's latest version"
+ },
+ "X-ONAP-RequestID" : {
+ "type" : "string",
+ "format" : "uuid",
+ "description" : "Used to track REST transactions for logging purpose"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/definitions/PdpGroupDeployResponse"
+ }
+ },
+ "401" : {
+ "description" : "Authentication Error"
+ },
+ "403" : {
+ "description" : "Authorization Error"
+ },
+ "500" : {
+ "description" : "Internal Server Error"
+ }
+ },
+ "security" : [ {
+ "basicAuth" : [ ]
+ } ],
+ "x-interface info" : {
+ "api-version" : "1.0.0",
+ "last-mod-release" : "Dublin"
+ }
+ }
+ }
+ },
+ "securityDefinitions" : {
+ "basicAuth" : {
+ "description" : "",
+ "type" : "basic"
+ }
+ },
+ "definitions" : {
+ "Pdp" : {
+ "type" : "object",
+ "properties" : {
+ "instanceId" : {
+ "type" : "string"
+ },
+ "pdpState" : {
+ "type" : "string",
+ "enum" : [ "PASSIVE", "SAFE", "TEST", "ACTIVE", "TERMINATED" ]
+ },
+ "healthy" : {
+ "type" : "string",
+ "enum" : [ "HEALTHY", "NOT_HEALTHY", "TEST_IN_PROGRESS", "UNKNOWN" ]
+ },
+ "message" : {
+ "type" : "string"
+ }
+ }
+ },
+ "PdpGroup" : {
+ "type" : "object",
+ "properties" : {
+ "name" : {
+ "type" : "string"
+ },
+ "description" : {
+ "type" : "string"
+ },
+ "pdpGroupState" : {
+ "type" : "string",
+ "enum" : [ "PASSIVE", "SAFE", "TEST", "ACTIVE", "TERMINATED" ]
+ },
+ "properties" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string"
+ }
+ },
+ "pdpSubgroups" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/PdpSubGroup"
+ }
+ }
+ }
+ },
+ "PdpGroups" : {
+ "type" : "object",
+ "properties" : {
+ "groups" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/PdpGroup"
+ }
+ }
+ }
+ },
+ "PdpSubGroup" : {
+ "type" : "object",
+ "properties" : {
+ "pdpType" : {
+ "type" : "string"
+ },
+ "supportedPolicyTypes" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/ToscaPolicyTypeIdentifier"
+ }
+ },
+ "policies" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/ToscaPolicyIdentifier"
+ }
+ },
+ "currentInstanceCount" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "desiredInstanceCount" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "properties" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string"
+ }
+ },
+ "pdpInstances" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/Pdp"
+ }
+ }
+ }
+ },
+ "ToscaPolicyIdentifier" : {
+ "type" : "object",
+ "properties" : {
+ "name" : {
+ "type" : "string"
+ },
+ "version" : {
+ "type" : "string"
+ }
+ }
+ },
+ "ToscaPolicyTypeIdentifier" : {
+ "type" : "object",
+ "properties" : {
+ "name" : {
+ "type" : "string"
+ },
+ "version" : {
+ "type" : "string"
+ }
+ }
+ },
+ "PdpGroupDeployResponse" : {
+ "type" : "object",
+ "properties" : {
+ "errorDetails" : {
+ "type" : "string"
+ }
+ }
+ },
+ "ToscaPolicyIdentifierOptVersion" : {
+ "type" : "object",
+ "properties" : {
+ "name" : {
+ "type" : "string"
+ },
+ "version" : {
+ "type" : "string"
+ }
+ }
+ }
+ }
+}
diff --git a/docs/pap/swagger/group-query-pap.json b/docs/pap/swagger/group-query-pap.json
new file mode 100644
index 00000000..959ecc3c
--- /dev/null
+++ b/docs/pap/swagger/group-query-pap.json
@@ -0,0 +1,210 @@
+{
+ "swagger" : "2.0",
+ "basePath" : "/",
+ "tags" : [ {
+ "name" : "PdpGroupQuery"
+ } ],
+ "schemes" : [ "http", "https" ],
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "paths" : {
+ "/policy/pap/v1/pdps" : {
+ "get" : {
+ "tags" : [ "PdpGroupQuery" ],
+ "summary" : "Query details of all PDP groups",
+ "description" : "Queries details of all PDP groups, returning all group details",
+ "operationId" : "queryGroupDetails",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "X-ONAP-RequestID",
+ "in" : "header",
+ "description" : "RequestID for http transaction",
+ "required" : false,
+ "type" : "string",
+ "format" : "uuid"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "headers" : {
+ "X-MinorVersion" : {
+ "type" : "string",
+ "description" : "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client"
+ },
+ "X-PatchVersion" : {
+ "type" : "string",
+ "description" : "Used only to communicate a PATCH version in a response for troubleshooting purposes only, and will not be provided by the client on request"
+ },
+ "X-LatestVersion" : {
+ "type" : "string",
+ "description" : "Used only to communicate an API's latest version"
+ },
+ "X-ONAP-RequestID" : {
+ "type" : "string",
+ "format" : "uuid",
+ "description" : "Used to track REST transactions for logging purpose"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/definitions/PdpGroups"
+ }
+ },
+ "401" : {
+ "description" : "Authentication Error"
+ },
+ "403" : {
+ "description" : "Authorization Error"
+ },
+ "500" : {
+ "description" : "Internal Server Error"
+ }
+ },
+ "security" : [ {
+ "basicAuth" : [ ]
+ } ],
+ "x-interface info" : {
+ "api-version" : "1.0.0",
+ "last-mod-release" : "Dublin"
+ }
+ }
+ }
+ },
+ "securityDefinitions" : {
+ "basicAuth" : {
+ "description" : "",
+ "type" : "basic"
+ }
+ },
+ "definitions" : {
+ "Pdp" : {
+ "type" : "object",
+ "properties" : {
+ "instanceId" : {
+ "type" : "string"
+ },
+ "pdpState" : {
+ "type" : "string",
+ "enum" : [ "PASSIVE", "SAFE", "TEST", "ACTIVE", "TERMINATED" ]
+ },
+ "healthy" : {
+ "type" : "string",
+ "enum" : [ "HEALTHY", "NOT_HEALTHY", "TEST_IN_PROGRESS", "UNKNOWN" ]
+ },
+ "message" : {
+ "type" : "string"
+ }
+ }
+ },
+ "PdpGroup" : {
+ "type" : "object",
+ "properties" : {
+ "name" : {
+ "type" : "string"
+ },
+ "description" : {
+ "type" : "string"
+ },
+ "pdpGroupState" : {
+ "type" : "string",
+ "enum" : [ "PASSIVE", "SAFE", "TEST", "ACTIVE", "TERMINATED" ]
+ },
+ "properties" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string"
+ }
+ },
+ "pdpSubgroups" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/PdpSubGroup"
+ }
+ }
+ }
+ },
+ "PdpGroups" : {
+ "type" : "object",
+ "properties" : {
+ "groups" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/PdpGroup"
+ }
+ }
+ }
+ },
+ "PdpSubGroup" : {
+ "type" : "object",
+ "properties" : {
+ "pdpType" : {
+ "type" : "string"
+ },
+ "supportedPolicyTypes" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/ToscaPolicyTypeIdentifier"
+ }
+ },
+ "policies" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/ToscaPolicyIdentifier"
+ }
+ },
+ "currentInstanceCount" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "desiredInstanceCount" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "properties" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string"
+ }
+ },
+ "pdpInstances" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/Pdp"
+ }
+ }
+ }
+ },
+ "ToscaPolicyIdentifier" : {
+ "type" : "object",
+ "properties" : {
+ "name" : {
+ "type" : "string"
+ },
+ "version" : {
+ "type" : "string"
+ }
+ }
+ },
+ "ToscaPolicyTypeIdentifier" : {
+ "type" : "object",
+ "properties" : {
+ "name" : {
+ "type" : "string"
+ },
+ "version" : {
+ "type" : "string"
+ }
+ }
+ },
+ "ToscaPolicyIdentifierOptVersion" : {
+ "type" : "object",
+ "properties" : {
+ "name" : {
+ "type" : "string"
+ },
+ "version" : {
+ "type" : "string"
+ }
+ }
+ }
+ }
+}
diff --git a/docs/pap/swagger/health-check-pap.json b/docs/pap/swagger/health-check-pap.json
new file mode 100644
index 00000000..3bf87e22
--- /dev/null
+++ b/docs/pap/swagger/health-check-pap.json
@@ -0,0 +1,71 @@
+{
+ "swagger" : "2.0",
+ "basePath" : "/",
+ "tags" : [ {
+ "name" : "HealthCheck"
+ } ],
+ "schemes" : [ "http", "https" ],
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "paths" : {
+ "/policy/pap/v1/healthcheck" : {
+ "get" : {
+ "tags" : [ "HealthCheck" ],
+ "summary" : "Perform healthcheck",
+ "description" : "Returns healthy status of the Policy Administration component",
+ "operationId" : "healthcheck",
+ "produces" : [ "application/json" ],
+ "parameters" : [ ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "$ref" : "#/definitions/HealthCheckReport"
+ }
+ },
+ "401" : {
+ "description" : "Authentication Error"
+ },
+ "403" : {
+ "description" : "Authorization Error"
+ },
+ "500" : {
+ "description" : "Internal Server Error"
+ }
+ },
+ "security" : [ {
+ "basicAuth" : [ ]
+ } ]
+ }
+ }
+ },
+ "securityDefinitions" : {
+ "basicAuth" : {
+ "description" : "",
+ "type" : "basic"
+ }
+ },
+ "definitions" : {
+ "HealthCheckReport" : {
+ "type" : "object",
+ "properties" : {
+ "name" : {
+ "type" : "string"
+ },
+ "url" : {
+ "type" : "string"
+ },
+ "healthy" : {
+ "type" : "boolean"
+ },
+ "code" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "message" : {
+ "type" : "string"
+ }
+ }
+ }
+ }
+}
diff --git a/docs/pap/swagger/policy-deploy-pap.json b/docs/pap/swagger/policy-deploy-pap.json
new file mode 100644
index 00000000..a6d49346
--- /dev/null
+++ b/docs/pap/swagger/policy-deploy-pap.json
@@ -0,0 +1,118 @@
+{
+ "swagger" : "2.0",
+ "basePath" : "/",
+ "tags" : [ {
+ "name" : "PdpPolicyDeploy"
+ } ],
+ "schemes" : [ "http", "https" ],
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "paths" : {
+ "/policy/pap/v1/pdps/policies" : {
+ "post" : {
+ "tags" : [ "PdpPolicyDeploy" ],
+ "summary" : "Deploy or update PDP Policies",
+ "description" : "Deploys or updates PDP Policies, returning optional error details",
+ "operationId" : "deployPolicies",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "X-ONAP-RequestID",
+ "in" : "header",
+ "description" : "RequestID for http transaction",
+ "required" : false,
+ "type" : "string",
+ "format" : "uuid"
+ }, {
+ "in" : "body",
+ "name" : "body",
+ "description" : "PDP Policies; only the name is required",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/definitions/PdpDeployPolicies"
+ }
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "headers" : {
+ "X-MinorVersion" : {
+ "type" : "string",
+ "description" : "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client"
+ },
+ "X-PatchVersion" : {
+ "type" : "string",
+ "description" : "Used only to communicate a PATCH version in a response for troubleshooting purposes only, and will not be provided by the client on request"
+ },
+ "X-LatestVersion" : {
+ "type" : "string",
+ "description" : "Used only to communicate an API's latest version"
+ },
+ "X-ONAP-RequestID" : {
+ "type" : "string",
+ "format" : "uuid",
+ "description" : "Used to track REST transactions for logging purpose"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/definitions/PdpGroupDeployResponse"
+ }
+ },
+ "401" : {
+ "description" : "Authentication Error"
+ },
+ "403" : {
+ "description" : "Authorization Error"
+ },
+ "500" : {
+ "description" : "Internal Server Error"
+ }
+ },
+ "security" : [ {
+ "basicAuth" : [ ]
+ } ],
+ "x-interface info" : {
+ "api-version" : "1.0.0",
+ "last-mod-release" : "Dublin"
+ }
+ }
+ }
+ },
+ "securityDefinitions" : {
+ "basicAuth" : {
+ "description" : "",
+ "type" : "basic"
+ }
+ },
+ "definitions" : {
+ "PdpGroupDeployResponse" : {
+ "type" : "object",
+ "properties" : {
+ "errorDetails" : {
+ "type" : "string"
+ }
+ }
+ },
+ "PdpDeployPolicies" : {
+ "type" : "object",
+ "properties" : {
+ "policies" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/ToscaPolicyIdentifierOptVersion"
+ }
+ }
+ }
+ },
+ "ToscaPolicyIdentifierOptVersion" : {
+ "type" : "object",
+ "properties" : {
+ "name" : {
+ "type" : "string"
+ },
+ "version" : {
+ "type" : "string"
+ }
+ }
+ }
+ }
+}
diff --git a/docs/pap/swagger/policy-undeploy-pap.json b/docs/pap/swagger/policy-undeploy-pap.json
new file mode 100644
index 00000000..4235b04e
--- /dev/null
+++ b/docs/pap/swagger/policy-undeploy-pap.json
@@ -0,0 +1,166 @@
+{
+ "swagger" : "2.0",
+ "basePath" : "/",
+ "tags" : [ {
+ "name" : "PdpPolicyUndeploy"
+ } ],
+ "schemes" : [ "http", "https" ],
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "paths" : {
+ "/policy/pap/v1/pdps/policies/{name}" : {
+ "delete" : {
+ "tags" : [ "PdpPolicyUndeploy" ],
+ "summary" : "Undeploy a PDP Policy from PDPs",
+ "description" : "Undeploys the latest version of a policy from the PDPs, returning optional error details",
+ "operationId" : "deletePolicy",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "X-ONAP-RequestID",
+ "in" : "header",
+ "description" : "RequestID for http transaction",
+ "required" : false,
+ "type" : "string",
+ "format" : "uuid"
+ }, {
+ "name" : "name",
+ "in" : "path",
+ "description" : "PDP Policy Name",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "headers" : {
+ "X-MinorVersion" : {
+ "type" : "string",
+ "description" : "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client"
+ },
+ "X-PatchVersion" : {
+ "type" : "string",
+ "description" : "Used only to communicate a PATCH version in a response for troubleshooting purposes only, and will not be provided by the client on request"
+ },
+ "X-LatestVersion" : {
+ "type" : "string",
+ "description" : "Used only to communicate an API's latest version"
+ },
+ "X-ONAP-RequestID" : {
+ "type" : "string",
+ "format" : "uuid",
+ "description" : "Used to track REST transactions for logging purpose"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/definitions/PdpGroupDeleteResponse"
+ }
+ },
+ "401" : {
+ "description" : "Authentication Error"
+ },
+ "403" : {
+ "description" : "Authorization Error"
+ },
+ "500" : {
+ "description" : "Internal Server Error"
+ }
+ },
+ "security" : [ {
+ "basicAuth" : [ ]
+ } ],
+ "x-interface info" : {
+ "api-version" : "1.0.0",
+ "last-mod-release" : "Dublin"
+ }
+ }
+ },
+ "/policy/pap/v1/pdps/policies/{name}/versions/{version}" : {
+ "delete" : {
+ "tags" : [ "PdpPolicyUndeploy" ],
+ "summary" : "Undeploy version of a PDP Policy from PDPs",
+ "description" : "Undeploys a specific version of a policy from the PDPs, returning optional error details",
+ "operationId" : "deletePolicyVersion",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "X-ONAP-RequestID",
+ "in" : "header",
+ "description" : "RequestID for http transaction",
+ "required" : false,
+ "type" : "string",
+ "format" : "uuid"
+ }, {
+ "name" : "name",
+ "in" : "path",
+ "description" : "PDP Policy Name",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "version",
+ "in" : "path",
+ "description" : "PDP Policy Version",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "headers" : {
+ "X-MinorVersion" : {
+ "type" : "string",
+ "description" : "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client"
+ },
+ "X-PatchVersion" : {
+ "type" : "string",
+ "description" : "Used only to communicate a PATCH version in a response for troubleshooting purposes only, and will not be provided by the client on request"
+ },
+ "X-LatestVersion" : {
+ "type" : "string",
+ "description" : "Used only to communicate an API's latest version"
+ },
+ "X-ONAP-RequestID" : {
+ "type" : "string",
+ "format" : "uuid",
+ "description" : "Used to track REST transactions for logging purpose"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/definitions/PdpGroupDeleteResponse"
+ }
+ },
+ "401" : {
+ "description" : "Authentication Error"
+ },
+ "403" : {
+ "description" : "Authorization Error"
+ },
+ "500" : {
+ "description" : "Internal Server Error"
+ }
+ },
+ "security" : [ {
+ "basicAuth" : [ ]
+ } ],
+ "x-interface info" : {
+ "api-version" : "1.0.0",
+ "last-mod-release" : "Dublin"
+ }
+ }
+ }
+ },
+ "securityDefinitions" : {
+ "basicAuth" : {
+ "description" : "",
+ "type" : "basic"
+ }
+ },
+ "definitions" : {
+ "PdpGroupDeleteResponse" : {
+ "type" : "object",
+ "properties" : {
+ "errorDetails" : {
+ "type" : "string"
+ }
+ }
+ }
+ }
+}
diff --git a/docs/pap/swagger/state-change-pap.json b/docs/pap/swagger/state-change-pap.json
new file mode 100644
index 00000000..16ef6360
--- /dev/null
+++ b/docs/pap/swagger/state-change-pap.json
@@ -0,0 +1,101 @@
+{
+ "swagger" : "2.0",
+ "basePath" : "/",
+ "tags" : [ {
+ "name" : "PdpGroupStateChange"
+ } ],
+ "schemes" : [ "http", "https" ],
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "paths" : {
+ "/policy/pap/v1/pdps/groups/{name}" : {
+ "put" : {
+ "tags" : [ "PdpGroupStateChange" ],
+ "summary" : "Change state of a PDP Group",
+ "description" : "Changes state of PDP Group, returning optional error details",
+ "operationId" : "changeGroupState",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "X-ONAP-RequestID",
+ "in" : "header",
+ "description" : "RequestID for http transaction",
+ "required" : false,
+ "type" : "string",
+ "format" : "uuid"
+ }, {
+ "name" : "name",
+ "in" : "path",
+ "description" : "PDP Group Name",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "state",
+ "in" : "query",
+ "description" : "PDP Group State",
+ "required" : true,
+ "type" : "string",
+ "enum" : [ "PASSIVE", "SAFE", "TEST", "ACTIVE", "TERMINATED" ]
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "headers" : {
+ "X-MinorVersion" : {
+ "type" : "string",
+ "description" : "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client"
+ },
+ "X-PatchVersion" : {
+ "type" : "string",
+ "description" : "Used only to communicate a PATCH version in a response for troubleshooting purposes only, and will not be provided by the client on request"
+ },
+ "X-LatestVersion" : {
+ "type" : "string",
+ "description" : "Used only to communicate an API's latest version"
+ },
+ "X-ONAP-RequestID" : {
+ "type" : "string",
+ "format" : "uuid",
+ "description" : "Used to track REST transactions for logging purpose"
+ }
+ },
+ "schema" : {
+ "$ref" : "#/definitions/PdpGroupStateChangeResponse"
+ }
+ },
+ "401" : {
+ "description" : "Authentication Error"
+ },
+ "403" : {
+ "description" : "Authorization Error"
+ },
+ "500" : {
+ "description" : "Internal Server Error"
+ }
+ },
+ "security" : [ {
+ "basicAuth" : [ ]
+ } ],
+ "x-interface info" : {
+ "api-version" : "1.0.0",
+ "last-mod-release" : "Dublin"
+ }
+ }
+ }
+ },
+ "securityDefinitions" : {
+ "basicAuth" : {
+ "description" : "",
+ "type" : "basic"
+ }
+ },
+ "definitions" : {
+ "PdpGroupStateChangeResponse" : {
+ "type" : "object",
+ "properties" : {
+ "errorDetails" : {
+ "type" : "string"
+ }
+ }
+ }
+ }
+}
diff --git a/docs/pap/swagger/statistics-pap.json b/docs/pap/swagger/statistics-pap.json
new file mode 100644
index 00000000..390fe1a0
--- /dev/null
+++ b/docs/pap/swagger/statistics-pap.json
@@ -0,0 +1,91 @@
+{
+ "swagger" : "2.0",
+ "basePath" : "/",
+ "tags" : [ {
+ "name" : "Statistics"
+ } ],
+ "schemes" : [ "http", "https" ],
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "paths" : {
+ "/policy/pap/v1/statistics" : {
+ "get" : {
+ "tags" : [ "Statistics" ],
+ "summary" : "Fetch current statistics",
+ "description" : "Returns current statistics of the Policy Administration component",
+ "operationId" : "statistics",
+ "produces" : [ "application/json" ],
+ "parameters" : [ ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "$ref" : "#/definitions/StatisticsReport"
+ }
+ },
+ "401" : {
+ "description" : "Authentication Error"
+ },
+ "403" : {
+ "description" : "Authorization Error"
+ },
+ "500" : {
+ "description" : "Internal Server Error"
+ }
+ },
+ "security" : [ {
+ "basicAuth" : [ ]
+ } ]
+ }
+ }
+ },
+ "securityDefinitions" : {
+ "basicAuth" : {
+ "description" : "",
+ "type" : "basic"
+ }
+ },
+ "definitions" : {
+ "StatisticsReport" : {
+ "type" : "object",
+ "properties" : {
+ "code" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "totalPdpCount" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "totalPdpGroupCount" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "totalPolicyDeployCount" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "policyDeploySuccessCount" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "policyDeployFailureCount" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "totalPolicyDownloadCount" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "policyDownloadSuccessCount" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "policyDownloadFailureCount" : {
+ "type" : "integer",
+ "format" : "int64"
+ }
+ }
+ }
+ }
+}