From af35b6a245e1587a3f149746c043fc4520daecaa Mon Sep 17 00:00:00 2001 From: Chenfei Gao Date: Tue, 21 May 2019 17:40:21 -0400 Subject: Add more textual explanation in api doc Added more textual explanation and tables for downloading sample policies and preloaded policy types. Also added sample curl commands for api calls. Issue-ID: POLICY-1680 Change-Id: Ia98e37679ae8e632da9d1f7308e156f722648faf Signed-off-by: Chenfei Gao --- docs/api/api.rst | 164 +++- docs/api/guard-policy-api.json | 405 ---------- docs/api/healthcheck-api.json | 99 --- docs/api/operational-policy-api.json | 325 -------- .../vCPE.policy.monitoring.input.tosca.json | 51 ++ .../policies/vCPE.policy.operational.input.json | 4 + .../vDNS.policy.guard.frequency.input.json | 14 + .../policies/vDNS.policy.guard.minmax.input.json | 13 + .../vDNS.policy.monitoring.input.tosca.json | 50 ++ .../policies/vDNS.policy.operational.input.json | 4 + .../vFirewall.policy.monitoring.input.tosca.json | 50 ++ .../vFirewall.policy.operational.input.json | 4 + docs/api/policy-api.json | 824 --------------------- docs/api/policytype-api.json | 662 ----------------- .../onap.policies.controlloop.Operational.json | 12 + .../onap.policies.controlloop.guard.Blacklist.json | 62 ++ ...olicies.controlloop.guard.FrequencyLimiter.json | 77 ++ .../onap.policies.controlloop.guard.MinMax.json | 66 ++ ...nap.policies.monitoring.cdap.tca.hi.lo.app.json | 224 ++++++ ...n2.collectors.datafile.datafile-app-server.json | 28 + .../onap.policies.optimization.AffinityPolicy.json | 103 +++ .../onap.policies.optimization.DistancePolicy.json | 133 ++++ .../onap.policies.optimization.HpaPolicy.json | 205 +++++ ...p.policies.optimization.OptimizationPolicy.json | 141 ++++ .../onap.policies.optimization.PciPolicy.json | 92 +++ .../onap.policies.optimization.QueryPolicy.json | 77 ++ ...nap.policies.optimization.SubscriberPolicy.json | 83 +++ .../onap.policies.optimization.Vim_fit.json | 92 +++ .../onap.policies.optimization.VnfPolicy.json | 116 +++ docs/api/statistics-api.json | 147 ---- docs/api/swagger/guard-policy-api.json | 405 ++++++++++ docs/api/swagger/healthcheck-api.json | 99 +++ docs/api/swagger/operational-policy-api.json | 325 ++++++++ docs/api/swagger/policy-api.json | 824 +++++++++++++++++++++ docs/api/swagger/policytype-api.json | 662 +++++++++++++++++ docs/api/swagger/statistics-api.json | 147 ++++ 36 files changed, 4312 insertions(+), 2477 deletions(-) delete mode 100644 docs/api/guard-policy-api.json delete mode 100644 docs/api/healthcheck-api.json delete mode 100644 docs/api/operational-policy-api.json create mode 100644 docs/api/policies/vCPE.policy.monitoring.input.tosca.json create mode 100644 docs/api/policies/vCPE.policy.operational.input.json create mode 100644 docs/api/policies/vDNS.policy.guard.frequency.input.json create mode 100644 docs/api/policies/vDNS.policy.guard.minmax.input.json create mode 100644 docs/api/policies/vDNS.policy.monitoring.input.tosca.json create mode 100644 docs/api/policies/vDNS.policy.operational.input.json create mode 100644 docs/api/policies/vFirewall.policy.monitoring.input.tosca.json create mode 100644 docs/api/policies/vFirewall.policy.operational.input.json delete mode 100644 docs/api/policy-api.json delete mode 100644 docs/api/policytype-api.json create mode 100644 docs/api/policytypes/onap.policies.controlloop.Operational.json create mode 100644 docs/api/policytypes/onap.policies.controlloop.guard.Blacklist.json create mode 100644 docs/api/policytypes/onap.policies.controlloop.guard.FrequencyLimiter.json create mode 100644 docs/api/policytypes/onap.policies.controlloop.guard.MinMax.json create mode 100644 docs/api/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app.json create mode 100644 docs/api/policytypes/onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server.json create mode 100644 docs/api/policytypes/onap.policies.optimization.AffinityPolicy.json create mode 100644 docs/api/policytypes/onap.policies.optimization.DistancePolicy.json create mode 100644 docs/api/policytypes/onap.policies.optimization.HpaPolicy.json create mode 100644 docs/api/policytypes/onap.policies.optimization.OptimizationPolicy.json create mode 100644 docs/api/policytypes/onap.policies.optimization.PciPolicy.json create mode 100644 docs/api/policytypes/onap.policies.optimization.QueryPolicy.json create mode 100644 docs/api/policytypes/onap.policies.optimization.SubscriberPolicy.json create mode 100644 docs/api/policytypes/onap.policies.optimization.Vim_fit.json create mode 100644 docs/api/policytypes/onap.policies.optimization.VnfPolicy.json delete mode 100644 docs/api/statistics-api.json create mode 100644 docs/api/swagger/guard-policy-api.json create mode 100644 docs/api/swagger/healthcheck-api.json create mode 100644 docs/api/swagger/operational-policy-api.json create mode 100644 docs/api/swagger/policy-api.json create mode 100644 docs/api/swagger/policytype-api.json create mode 100644 docs/api/swagger/statistics-api.json diff --git a/docs/api/api.rst b/docs/api/api.rst index fb42e3e7..fae3a071 100644 --- a/docs/api/api.rst +++ b/docs/api/api.rst @@ -4,10 +4,74 @@ .. _api-label: -Policy Lifecycle API --------------------- +Policy Life Cycle API +---------------------- .. toctree:: - :maxdepth: 1 + :maxdepth: 2 + + +Policy life cycle API comprises of policy design API and policy deployment API. This documentation focuses on policy +design API. Policy design API is publicly exposed for clients to Create/Read/Update/Delete (CRUD) policy types, policy type +implementation and policies which can be recognized and executable by appropriate policy engines incorporated in ONAP +policy framework. Policy design API backend is running in an independent building block component of policy framework +that provides REST service for aforementioned CRUD behaviors. Policy design API component interacts with a policy database +for storing and fetching new policies or policy types as needed. Apart from CRUD, API is also exposed for clients to retrieve +healthcheck status of this API REST service and statistics report including a variety of counters that reflect the history +of API invocation. + +Starting from Dublin release, we strictly follow `TOSCA Specification `_ +to define policy type and policy. Policy type is equivalent to policy model mentioned by clients before Dublin release. +Both policy type and policy are included in a TOSCA Service Template which is used as the entity passed into API POST call +and the entity returned by API GET and DELETE calls. More details are presented in following sessions. +We encourage clients to compose all kinds of policies and corresponding policy types in well-formed TOSCA Service Template. +One Service Template can contain one or more policies and policy types. Each policy type can have multiple policies created +atop. In other words, different policies can match the same or different policy types. Existence of a policy type is a prerequisite +of creating such type of policies. In the payload body of each policy to create, policy type name and version should be indicated and +the specified policy type should be valid and existing in policy database. + +In Dublin release, to ease policy creation, we preload several widely used policy types in policy database. Below is a table summarizing +preloaded policy types. + +.. csv-table:: + :header: "Policy Type Name", "Preloaded JSON" + :widths: 15,10 + + "Controlloop.Guard.Blacklist", ":download:`link `" + "Controlloop.Guard.FrequencyLimiter", ":download:`link `" + "Controlloop.Guard.MinMax", ":download:`link `" + "Controlloop.Operational", ":download:`link `" + "Monitoring.TCA", ":download:`link `" + "Monitoring.Collectors", ":download:`link `" + "Optimization.AffinityPolicy", ":download:`link `" + "Optimization.DistancePolicy", ":download:`link `" + "Optimization.HpaPolicy", ":download:`link `" + "Optimization.OptimizationPolicy", ":download:`link `" + "Optimization.PciPolicy", ":download:`link `" + "Optimization.QueryPolicy", ":download:`link `" + "Optimization.SubscriberPolicy", ":download:`link `" + "Optimization.Vim_fit", ":download:`link `" + "Optimization.VnfPolicy", ":download:`link `" + + +Also, in Dublin release, We provide backward compatibility support for controlloop operational and guard +policies encoded in legacy format. Below is a table containing sample legacy guard/operational policies and +well-formed TOSCA monitoring policies. + +.. csv-table:: + :header: "Policy Name", "Policy JSON" + :widths: 15,10 + + "vCPE.Monitoring.Tosca", ":download:`link `" + "vCPE.Operational.Legacy", ":download:`link `" + "vDNS.Guard.FrequencyLimiting.Legacy", ":download:`link `" + "vDNS.Guard.MinMax.Legacy", ":download:`link `" + "vDNS.Monitoring.Tosca", ":download:`link `" + "vDNS.Operational.Legacy", ":download:`link `" + "vFirewall.Monitoring.Tosca", ":download:`link `" + "vFirewall.Operational.Legacy", ":download:`link `" + + +Below is a global API table from where swagger JSON for different types of policy design API can be downloaded. Global API Table -------------------- @@ -15,24 +79,94 @@ Global API Table :header: "API name", "Swagger JSON" :widths: 10,5 - "Healthcheck API", ":download:`link `" - "Statistics API", ":download:`link `" - "Tosca Policy Type API", ":download:`link `" - "Tosca Policy API", ":download:`link `" - "Legacy Guard Policy API", ":download:`link `" - "Legacy Operational Policy API", ":download:`link `" + "Healthcheck API", ":download:`link `" + "Statistics API", ":download:`link `" + "Tosca Policy Type API", ":download:`link `" + "Tosca Policy API", ":download:`link `" + "Legacy Guard Policy API", ":download:`link `" + "Legacy Operational Policy API", ":download:`link `" API Swagger -------------------- -.. swaggerv2doc:: healthcheck-api.json +It is worth noting that we use basic authorization for API access with username and password set to *healthcheck* and *zb!XztG34* respectively. +Also, the new APIs support both *http* and *https*. + +For every API call, client is encouraged to insert an uuid-type requestID as parameter. It is helpful for tracking each http transaction +and facilitates debugging. Mostly importantly, it complies with Logging requirements v1.2. If client does not provider the requestID in API call, +one will be randomly generated and attached to response header *x-onap-requestid*. + +In accordance with `ONAP API Common Versioning Strategy Guidelines `_, +in the response of each API call, several custom headers are added:: + + x-latestversion: 1.0.0 + x-minorversion: 0 + x-patchversion: 0 + x-onap-requestid: e1763e61-9eef-4911-b952-1be1edd9812b + +x-latestversion is used only to communicate an API's latest version. + +x-minorversion is 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 is 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-onap-requestid is used to track REST transactions for logging purpose, as described above. + + +.. swaggerv2doc:: swagger/healthcheck-api.json + +.. swaggerv2doc:: swagger/statistics-api.json + +.. swaggerv2doc:: swagger/policytype-api.json + +.. swaggerv2doc:: swagger/policy-api.json + +It is worth noting that in POST policy API, client needs to provide a policy payload encoded in well-formed TOSCA Service Template, and +in the JSON payload, "type" field value should strictly match the policy type name embedded in the API path (case sensitive). +Otherwise, it will complain the policy type does not exist. Please check out the sample policies in above policy table. + +.. swaggerv2doc:: swagger/guard-policy-api.json + +It is worth noting that guard policy name should start with one of the three: *guard.frequency.*, *guard.minmax.*, or *guard.blacklist.*. +Otherwise, it will complain that guard policy type cannot be found (does not exist). Apart from policy name, the policy version specified +in API path should be an integer, e.g. 1, 2, 10, instead of "1.0.0", "2.0.1", etc. +These naming restrictions will disappear after we evolve to use well-formed TOSCA Service Template for guard policies and +legacy policy design API is then deprecated. + +.. swaggerv2doc:: swagger/operational-policy-api.json + +Likewise, the policy version specified in operational policy API path should be an integer too, e.g. 1, 2, 10, instead of +"1.0.0", "2.0.1", etc. This restriction will disappear after we deprecate legacy policy design API in the near future release. + + +Regarding DELETE APIs for both TOSCA policies and legacy policies, we only expose API to delete one particular version of policy +or policy type at a time for safety purpose. If client has the need to delete multiple or a group of policies or policy types, +they will need to delete one by one. + +Sample API Curl Commands +------------------------- + +From API client perspective, using *http* or *https* does not have much difference in curl command. Here we list some sample curl commands (using *http*) +for POST, GET and DELETE monitoring and operational policies that are used in vFirewall use case. -.. swaggerv2doc:: statistics-api.json +JSON payload for POST calls can be downloaded from policy table above. -.. swaggerv2doc:: policytype-api.json +Create vFirewall Monitoring Policy:: + curl --user 'healthcheck:zb!XztG34' -X POST "http://{ip}:{port}/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies" -H "Accept: application/json" -H "Content-Type: application/json" -d @vFirewall.policy.monitoring.input.tosca.json -.. swaggerv2doc:: policy-api.json +Get vFirewall Monitoring Policy:: + curl --user 'healthcheck:zb!XztG34' -X GET "http://{ip}:{port}/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies/onap.vfirewall.tca/versions/1.0.0" -H "Accept: application/json" -H "Content-Type: application/json" + +Delete vFirewall Monitoring Policy:: + curl --user 'healthcheck:zb!XztG34' -X DELETE "http://{ip}:{port}/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies/onap.vfirewall.tca/versions/1.0.0" -H "Accept: application/json" -H "Content-Type: application/json" -.. swaggerv2doc:: guard-policy-api.json +Create vFirewall Operational Policy:: + curl --user 'healthcheck:zb!XztG34' -X POST "http://{ip}:{port}/policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies" -H "Accept: application/json" -H "Content-Type: application/json" -d @vFirewall.policy.operational.input.json + +Get vFirewall Operational Policy:: + curl --user 'healthcheck:zb!XztG34' -X GET "http://{ip}:{port}/policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies/operational.modifyconfig/versions/1" -H "Accept: application/json" -H "Content-Type: application/json" + +Delete vFirewall Operational Policy:: + curl --user 'healthcheck:zb!XztG34' -X DELETE "http://{ip}:{port}/policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies/operational.modifyconfig/versions/1" -H "Accept: application/json" -H "Content-Type: application/json" -.. swaggerv2doc:: operational-policy-api.json + \ No newline at end of file diff --git a/docs/api/guard-policy-api.json b/docs/api/guard-policy-api.json deleted file mode 100644 index 18a42587..00000000 --- a/docs/api/guard-policy-api.json +++ /dev/null @@ -1,405 +0,0 @@ -{ - "swagger" : "2.0", - "basePath" : "/", - "tags" : [ { - "name" : "Legacy Guard Policy" - } ], - "schemes" : [ "http", "https" ], - "paths" : { - "/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/{policyId}" : { - "get" : { - "tags" : [ "Legacy Guard Policy" ], - "summary" : "Retrieve all versions of a particular guard policy", - "description" : "Returns a list of all versions of the specified guard policy", - "operationId" : "getAllVersionsOfGuardPolicy", - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "policyId", - "in" : "path", - "description" : "ID of policy", - "required" : true, - "type" : "string" - }, { - "name" : "X-ONAP-RequestID", - "in" : "header", - "description" : "RequestID for http transaction", - "required" : false, - "type" : "string", - "format" : "uuid" - } ], - "responses" : { - "200" : { - "description" : "successful operation; All versions of specified guard policy will be returned.", - "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" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/definitions/LegacyGuardPolicyOutput" - } - } - }, - "401" : { - "description" : "Authentication Error" - }, - "403" : { - "description" : "Authorization Error" - }, - "404" : { - "description" : "Resource Not Found" - }, - "500" : { - "description" : "Internal Server Error" - } - }, - "security" : [ { - "basicAuth" : [ ] - } ], - "x-interface info" : { - "api-version" : "1.0.0", - "last-mod-release" : "Dublin" - } - } - }, - "/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/{policyId}/versions/{policyVersion}" : { - "get" : { - "tags" : [ "Legacy Guard Policy" ], - "summary" : "Retrieve one version of a particular guard policy", - "description" : "Returns a particular version of a specified guard policy", - "operationId" : "getSpecificVersionOfGuardPolicy", - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "policyId", - "in" : "path", - "description" : "ID of policy", - "required" : true, - "type" : "string" - }, { - "name" : "policyVersion", - "in" : "path", - "description" : "Version of policy", - "required" : true, - "type" : "string" - }, { - "name" : "X-ONAP-RequestID", - "in" : "header", - "description" : "RequestID for http transaction", - "required" : false, - "type" : "string", - "format" : "uuid" - } ], - "responses" : { - "200" : { - "description" : "successful operation; Specified version of guard policy will be returned.", - "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" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/definitions/LegacyGuardPolicyOutput" - } - } - }, - "401" : { - "description" : "Authentication Error" - }, - "403" : { - "description" : "Authorization Error" - }, - "404" : { - "description" : "Resource Not Found" - }, - "500" : { - "description" : "Internal Server Error" - } - }, - "security" : [ { - "basicAuth" : [ ] - } ], - "x-interface info" : { - "api-version" : "1.0.0", - "last-mod-release" : "Dublin" - } - }, - "delete" : { - "tags" : [ "Legacy Guard Policy" ], - "summary" : "Delete a particular version of a guard policy", - "description" : "Delete a particular version of a guard policy. It must follow one rule. Rule: the version that has been deployed in PDP group(s) cannot be deleted", - "operationId" : "deleteSpecificVersionOfGuardPolicy", - "consumes" : [ "application/json" ], - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "policyId", - "in" : "path", - "description" : "ID of policy", - "required" : true, - "type" : "string" - }, { - "name" : "policyVersion", - "in" : "path", - "description" : "Version of policy", - "required" : true, - "type" : "string" - }, { - "name" : "X-ONAP-RequestID", - "in" : "header", - "description" : "RequestID for http transaction", - "required" : false, - "type" : "string", - "format" : "uuid" - } ], - "responses" : { - "200" : { - "description" : "successful operation; Newly deleted guard policy will be returned.", - "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" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/definitions/LegacyGuardPolicyOutput" - } - } - }, - "401" : { - "description" : "Authentication Error" - }, - "403" : { - "description" : "Authorization Error" - }, - "404" : { - "description" : "Resource Not Found" - }, - "409" : { - "description" : "Delete Conflict, Rule Violation" - }, - "500" : { - "description" : "Internal Server Error" - } - }, - "security" : [ { - "basicAuth" : [ ] - } ], - "x-interface info" : { - "api-version" : "1.0.0", - "last-mod-release" : "Dublin" - } - } - }, - "/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies" : { - "post" : { - "tags" : [ "Legacy Guard Policy" ], - "summary" : "Create a new guard policy", - "description" : "Create a new guard policy. Client should provide entity body of the new guard policy", - "operationId" : "createGuardPolicy", - "consumes" : [ "application/json" ], - "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" : "Entity body of policy", - "required" : true, - "type" : "ToscaServiceTemplate", - "schema" : { - "$ref" : "#/definitions/LegacyGuardPolicyInput" - } - } ], - "responses" : { - "200" : { - "description" : "successful operation; Newly created guard policy will be returned.", - "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" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/definitions/LegacyGuardPolicyOutput" - } - } - }, - "400" : { - "description" : "Invalid Body" - }, - "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" : { - "LegacyGuardPolicyContent" : { - "type" : "object", - "properties" : { - "actor" : { - "type" : "string" - }, - "recipe" : { - "type" : "string" - }, - "targets" : { - "type" : "string" - }, - "clname" : { - "type" : "string" - }, - "limit" : { - "type" : "string" - }, - "timeWindow" : { - "type" : "string" - }, - "timeUnits" : { - "type" : "string" - }, - "min" : { - "type" : "string" - }, - "max" : { - "type" : "string" - }, - "guardActiveStart" : { - "type" : "string" - }, - "guardActiveEnd" : { - "type" : "string" - }, - "asPropertyMap" : { - "type" : "object", - "additionalProperties" : { - "type" : "string" - } - } - } - }, - "LegacyGuardPolicyOutput" : { - "type" : "object", - "properties" : { - "type" : { - "type" : "string" - }, - "version" : { - "type" : "string" - }, - "metadata" : { - "type" : "object", - "additionalProperties" : { - "type" : "object" - } - }, - "properties" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/definitions/LegacyGuardPolicyContent" - } - } - } - }, - "LegacyGuardPolicyInput" : { - "type" : "object", - "properties" : { - "policy-id" : { - "type" : "string" - }, - "policy-version" : { - "type" : "string" - }, - "content" : { - "$ref" : "#/definitions/LegacyGuardPolicyContent" - } - } - } - } -} \ No newline at end of file diff --git a/docs/api/healthcheck-api.json b/docs/api/healthcheck-api.json deleted file mode 100644 index 6605ee57..00000000 --- a/docs/api/healthcheck-api.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "swagger" : "2.0", - "basePath" : "/", - "tags" : [{ - "name" : "HealthCheck" - }], - "schemes" : [ "http", "https" ], - "paths" : { - "/policy/api/v1/healthcheck" : { - "get" : { - "tags" : [ "HealthCheck" ], - "summary" : "Perform a system healthcheck", - "description" : "Returns healthy status of the Policy API component", - "operationId" : "getHealthCheck", - "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; Healthcheck report will be returned.", - "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/HealthCheckReport" - } - }, - "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" : { - "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/api/operational-policy-api.json b/docs/api/operational-policy-api.json deleted file mode 100644 index ffa460b0..00000000 --- a/docs/api/operational-policy-api.json +++ /dev/null @@ -1,325 +0,0 @@ -{ - "swagger" : "2.0", - "basePath" : "/", - "tags" : [ { - "name" : "Legacy Operational Policy" - } ], - "schemes" : [ "http", "https" ], - "paths" : { - "/policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies/{policyId}" : { - "get" : { - "tags" : [ "Legacy Operational Policy" ], - "summary" : "Retrieve all versions of a particular operational policy", - "description" : "Returns a list of all versions of the specified operational policy", - "operationId" : "getAllVersionsOfOperationalPolicy", - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "policyId", - "in" : "path", - "description" : "ID of policy", - "required" : true, - "type" : "string" - }, { - "name" : "X-ONAP-RequestID", - "in" : "header", - "description" : "RequestID for http transaction", - "required" : false, - "type" : "string", - "format" : "uuid" - } ], - "responses" : { - "200" : { - "description" : "successful operation; All versions of specified operational policy will be returned.", - "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/LegacyOperationalPolicy" - } - }, - "401" : { - "description" : "Authentication Error" - }, - "403" : { - "description" : "Authorization Error" - }, - "404" : { - "description" : "Resource Not Found" - }, - "500" : { - "description" : "Internal Server Error" - } - }, - "security" : [ { - "basicAuth" : [ ] - } ], - "x-interface info" : { - "api-version" : "1.0.0", - "last-mod-release" : "Dublin" - } - } - }, - "/policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies/{policyId}/versions/{policyVersion}" : { - "get" : { - "tags" : [ "Legacy Operational Policy" ], - "summary" : "Retrieve one version of a particular operational policy", - "description" : "Returns a particular version of a specified operational policy", - "operationId" : "getSpecificVersionOfOperationalPolicy", - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "policyId", - "in" : "path", - "description" : "ID of policy", - "required" : true, - "type" : "string" - }, { - "name" : "policyVersion", - "in" : "path", - "description" : "Version of policy", - "required" : true, - "type" : "string" - }, { - "name" : "X-ONAP-RequestID", - "in" : "header", - "description" : "RequestID for http transaction", - "required" : false, - "type" : "string", - "format" : "uuid" - } ], - "responses" : { - "200" : { - "description" : "successful operation; Specified version of specified operational policy will be returned.", - "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/LegacyOperationalPolicy" - } - }, - "401" : { - "description" : "Authentication Error" - }, - "403" : { - "description" : "Authorization Error" - }, - "404" : { - "description" : "Resource Not Found" - }, - "500" : { - "description" : "Internal Server Error" - } - }, - "security" : [ { - "basicAuth" : [ ] - } ], - "x-interface info" : { - "api-version" : "1.0.0", - "last-mod-release" : "Dublin" - } - }, - "delete" : { - "tags" : [ "Legacy Operational Policy" ], - "summary" : "Delete a particular version of a specified operational policy", - "description" : "Delete a particular version of an operational policy. It must follow one rule. Rule: the version that has been deployed in PDP group(s) cannot be deleted", - "operationId" : "deleteSpecificVersionOfOperationalPolicy", - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "policyId", - "in" : "path", - "description" : "ID of policy", - "required" : true, - "type" : "string" - }, { - "name" : "policyVersion", - "in" : "path", - "description" : "Version of policy", - "required" : true, - "type" : "string" - }, { - "name" : "X-ONAP-RequestID", - "in" : "header", - "description" : "RequestID for http transaction", - "required" : false, - "type" : "string", - "format" : "uuid" - } ], - "responses" : { - "200" : { - "description" : "successful operation; Newly deleted operational policy will be returned.", - "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/LegacyOperationalPolicy" - } - }, - "401" : { - "description" : "Authentication Error" - }, - "403" : { - "description" : "Authorization Error" - }, - "404" : { - "description" : "Resource Not Found" - }, - "409" : { - "description" : "Delete Conflict, Rule Violation" - }, - "500" : { - "description" : "Internal Server Error" - } - }, - "security" : [ { - "basicAuth" : [ ] - } ], - "x-interface info" : { - "api-version" : "1.0.0", - "last-mod-release" : "Dublin" - } - } - }, - "/policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies" : { - "post" : { - "tags" : [ "Legacy Operational Policy" ], - "summary" : "Create a new operational policy", - "description" : "Create a new operational policy. Client should provide entity body of the new operational policy", - "operationId" : "createOperationalPolicy", - "consumes" : [ "application/json" ], - "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" : "Entity body of policy", - "required" : true, - "type" : "ToscaServiceTemplate", - "schema" : { - "$ref" : "#/definitions/LegacyOperationalPolicy" - } - } ], - "responses" : { - "200" : { - "description" : "successful operation; Newly created operational policy will be returned.", - "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/LegacyOperationalPolicy" - } - }, - "400" : { - "description" : "Invalid Body" - }, - "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" : { - "LegacyOperationalPolicy" : { - "type" : "object", - "properties" : { - "policy-id" : { - "type" : "string" - }, - "policy-version" : { - "type" : "string" - }, - "content" : { - "type" : "string" - } - } - } - } -} \ No newline at end of file diff --git a/docs/api/policies/vCPE.policy.monitoring.input.tosca.json b/docs/api/policies/vCPE.policy.monitoring.input.tosca.json new file mode 100644 index 00000000..7a63f658 --- /dev/null +++ b/docs/api/policies/vCPE.policy.monitoring.input.tosca.json @@ -0,0 +1,51 @@ +{ + "tosca_definitions_version": "tosca_simple_yaml_1_0_0", + "topology_template": { + "policies": [ + { + "onap.restart.tca": { + "type": "onap.policies.monitoring.cdap.tca.hi.lo.app", + "version": "1.0.0", + "type_version": "1.0.0", + "metadata": { + "policy-id": "onap.restart.tca" + }, + "properties": { + "tca_policy" : { + "domain": "measurementsForVfScaling", + "metricsPerEventName": [ + { + "eventName": "Measurement_vGMUX", + "controlLoopSchemaType": "VNF", + "policyScope": "DCAE", + "policyName": "DCAE.Config_tca-hi-lo", + "policyVersion": "v0.0.1", + "thresholds": [ + { + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e", + "version": "1.0.2", + "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value", + "thresholdValue": 0, + "direction": "EQUAL", + "severity": "MAJOR", + "closedLoopEventStatus": "ABATED" + }, + { + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e", + "version": "1.0.2", + "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value", + "thresholdValue": 0, + "direction": "GREATER", + "severity": "CRITICAL", + "closedLoopEventStatus": "ONSET" + } + ] + } + ] + } + } + } + } + ] + } +} \ No newline at end of file diff --git a/docs/api/policies/vCPE.policy.operational.input.json b/docs/api/policies/vCPE.policy.operational.input.json new file mode 100644 index 00000000..393cb028 --- /dev/null +++ b/docs/api/policies/vCPE.policy.operational.input.json @@ -0,0 +1,4 @@ +{ + "policy-id" : "operational.restart", + "content" : "controlLoop%3A%0A%20%20version%3A%202.0.0%0A%20%20controlLoopName%3A%20ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e%0A%20%20trigger_policy%3A%20unique-policy-id-1-restart%0A%20%20timeout%3A%203600%0A%20%20abatement%3A%20true%0A%20%0Apolicies%3A%0A%20%20-%20id%3A%20unique-policy-id-1-restart%0A%20%20%20%20name%3A%20Restart%20the%20VM%0A%20%20%20%20description%3A%0A%20%20%20%20actor%3A%20APPC%0A%20%20%20%20recipe%3A%20Restart%0A%20%20%20%20target%3A%0A%20%20%20%20%20%20type%3A%20VM%0A%20%20%20%20retry%3A%203%0A%20%20%20%20timeout%3A%201200%0A%20%20%20%20success%3A%20final_success%0A%20%20%20%20failure%3A%20final_failure%0A%20%20%20%20failure_timeout%3A%20final_failure_timeout%0A%20%20%20%20failure_retries%3A%20final_failure_retries%0A%20%20%20%20failure_exception%3A%20final_failure_exception%0A%20%20%20%20failure_guard%3A%20final_failure_guard" +} \ No newline at end of file diff --git a/docs/api/policies/vDNS.policy.guard.frequency.input.json b/docs/api/policies/vDNS.policy.guard.frequency.input.json new file mode 100644 index 00000000..442f3ec4 --- /dev/null +++ b/docs/api/policies/vDNS.policy.guard.frequency.input.json @@ -0,0 +1,14 @@ +{ + "policy-id" : "guard.frequency.scaleout", + "content" : { + "actor": "SO", + "recipe": "scaleOut", + "targets": ".*", + "clname": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3", + "limit": "1", + "timeWindow": "10", + "timeUnits": "minute", + "guardActiveStart": "00:00:01-05:00", + "guardActiveEnd": "23:59:59-05:00" + } +} diff --git a/docs/api/policies/vDNS.policy.guard.minmax.input.json b/docs/api/policies/vDNS.policy.guard.minmax.input.json new file mode 100644 index 00000000..45a7d41d --- /dev/null +++ b/docs/api/policies/vDNS.policy.guard.minmax.input.json @@ -0,0 +1,13 @@ +{ + "policy-id" : "guard.minmax.scaleout", + "content" : { + "actor": "SO", + "recipe": "scaleOut", + "targets": ".*", + "clname": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3", + "min": "1", + "max": "5", + "guardActiveStart": "00:00:01-05:00", + "guardActiveEnd": "23:59:59-05:00" + } +} \ No newline at end of file diff --git a/docs/api/policies/vDNS.policy.monitoring.input.tosca.json b/docs/api/policies/vDNS.policy.monitoring.input.tosca.json new file mode 100644 index 00000000..d2f9584e --- /dev/null +++ b/docs/api/policies/vDNS.policy.monitoring.input.tosca.json @@ -0,0 +1,50 @@ +{ + "tosca_definitions_version": "tosca_simple_yaml_1_0_0", + "topology_template": { + "policies": [ + { + "onap.scaleout.tca": { + "type": "onap.policies.monitoring.cdap.tca.hi.lo.app", + "version": "1.0.0", + "metadata": { + "policy-id": "onap.scaleout.tca" + }, + "properties": { + "tca_policy": { + "domain": "measurementsForVfScaling", + "metricsPerEventName": [ + { + "eventName": "vLoadBalancer", + "controlLoopSchemaType": "VNF", + "policyScope": "type=configuration", + "policyName": "onap.scaleout.tca", + "policyVersion": "v0.0.1", + "thresholds": [ + { + "closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3", + "closedLoopEventStatus": "ONSET", + "version": "1.0.2", + "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated", + "thresholdValue": 500, + "direction": "LESS_OR_EQUAL", + "severity": "MAJOR" + }, + { + "closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3", + "closedLoopEventStatus": "ONSET", + "version": "1.0.2", + "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated", + "thresholdValue": 5000, + "direction": "GREATER_OR_EQUAL", + "severity": "CRITICAL" + } + ] + } + ] + } + } + } + } + ] + } +} \ No newline at end of file diff --git a/docs/api/policies/vDNS.policy.operational.input.json b/docs/api/policies/vDNS.policy.operational.input.json new file mode 100644 index 00000000..dabde011 --- /dev/null +++ b/docs/api/policies/vDNS.policy.operational.input.json @@ -0,0 +1,4 @@ +{ + "policy-id" : "operational.scaleout", + "content" : "controlLoop%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20version%3A%202.0.0%0A%20%20%20%20%20%20%20%20%20%20%20%20%20controlLoopName%3A%20ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3%0A%20%20%20%20%20%20%20%20%20%20%20%20%20trigger_policy%3A%20unique-policy-id-1-scale-up%0A%20%20%20%20%20%20%20%20%20%20%20%20%20timeout%3A%201200%0A%20%20%20%20%20%20%20%20%20%20%20%20%20abatement%3A%20false%0A%20%20%20%20%20%20%20%20%20%20%20policies%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20-%20id%3A%20unique-policy-id-1-scale-up%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20name%3A%20Create%20a%20new%20VF%20Module%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20description%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20actor%3A%20SO%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20recipe%3A%20VF%20Module%20Create%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20target%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20VNF%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20payload%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20requestParameters%3A%20'%7B%22usePreload%22%3Atrue%2C%22userParams%22%3A%5B%5D%7D'%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20configurationParameters%3A%20'%5B%7B%22ip-addr%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B9%5D%22%2C%22oam-ip-addr%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B16%5D%22%2C%22enabled%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B23%5D%22%7D%5D'%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20retry%3A%200%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20timeout%3A%201200%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20success%3A%20final_success%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure%3A%20final_failure%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_timeout%3A%20final_failure_timeout%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_retries%3A%20final_failure_retries%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_exception%3A%20final_failure_exception%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_guard%3A%20final_failure_guard" +} \ No newline at end of file diff --git a/docs/api/policies/vFirewall.policy.monitoring.input.tosca.json b/docs/api/policies/vFirewall.policy.monitoring.input.tosca.json new file mode 100644 index 00000000..a0046fb5 --- /dev/null +++ b/docs/api/policies/vFirewall.policy.monitoring.input.tosca.json @@ -0,0 +1,50 @@ +{ + "tosca_definitions_version": "tosca_simple_yaml_1_0_0", + "topology_template": { + "policies": [ + { + "onap.vfirewall.tca": { + "type": "onap.policies.monitoring.cdap.tca.hi.lo.app", + "version": "1.0.0", + "metadata": { + "policy-id": "onap.vfirewall.tca" + }, + "properties": { + "tca_policy": { + "domain": "measurementsForVfScaling", + "metricsPerEventName": [ + { + "eventName": "vLoadBalancer", + "controlLoopSchemaType": "VNF", + "policyScope": "resource=vLoadBalancer;type=configuration", + "policyName": "onap.vfirewall.tca", + "policyVersion": "v0.0.1", + "thresholds": [ + { + "closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a", + "closedLoopEventStatus": "ONSET", + "version": "1.0.2", + "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated", + "thresholdValue": 500, + "direction": "LESS_OR_EQUAL", + "severity": "MAJOR" + }, + { + "closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a", + "closedLoopEventStatus": "ONSET", + "version": "1.0.2", + "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated", + "thresholdValue": 5000, + "direction": "GREATER_OR_EQUAL", + "severity": "CRITICAL" + } + ] + } + ] + } + } + } + } + ] + } +} \ No newline at end of file diff --git a/docs/api/policies/vFirewall.policy.operational.input.json b/docs/api/policies/vFirewall.policy.operational.input.json new file mode 100644 index 00000000..623a6899 --- /dev/null +++ b/docs/api/policies/vFirewall.policy.operational.input.json @@ -0,0 +1,4 @@ +{ + "policy-id" : "operational.modifyconfig", + "content" : "controlLoop%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20version%3A%202.0.0%0A%20%20%20%20%20%20%20%20%20%20%20%20%20controlLoopName%3A%20ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a%0A%20%20%20%20%20%20%20%20%20%20%20%20%20trigger_policy%3A%20unique-policy-id-1-modifyConfig%0A%20%20%20%20%20%20%20%20%20%20%20%20%20timeout%3A%201200%0A%20%20%20%20%20%20%20%20%20%20%20%20%20abatement%3A%20false%0A%20%0A%20%20%20%20%20%20%20%20%20%20%20policies%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20-%20id%3A%20unique-policy-id-1-modifyConfig%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20name%3A%20modify%20packet%20gen%20config%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20description%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20actor%3A%20APPC%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20recipe%3A%20ModifyConfig%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20target%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20TBD%20-%20Cannot%20be%20known%20until%20instantiation%20is%20done%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20resourceID%3A%20Eace933104d443b496b8.nodes.heat.vpg%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20VNF%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20retry%3A%200%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20timeout%3A%20300%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20success%3A%20final_success%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure%3A%20final_failure%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_timeout%3A%20final_failure_timeout%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_retries%3A%20final_failure_retries%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_exception%3A%20final_failure_exception%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_guard%3A%20final_failure_guard" +} \ No newline at end of file diff --git a/docs/api/policy-api.json b/docs/api/policy-api.json deleted file mode 100644 index 0037fd5d..00000000 --- a/docs/api/policy-api.json +++ /dev/null @@ -1,824 +0,0 @@ -{ - "swagger" : "2.0", - "basePath" : "/", - "tags" : [ { - "name" : "Policy" - } ], - "schemes" : [ "http", "https" ], - "paths" : { - "/policy/api/v1/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies" : { - "get" : { - "tags" : [ "Policy" ], - "summary" : "Retrieve all versions of a policy created for a particular policy type version", - "description" : "Returns a list of all versions of specified policy created for the specified policy type version", - "operationId" : "getAllPolicies", - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "policyTypeId", - "in" : "path", - "description" : "ID of policy type", - "required" : true, - "type" : "string" - }, { - "name" : "policyTypeVersion", - "in" : "path", - "description" : "Version of policy type", - "required" : true, - "type" : "string" - }, { - "name" : "X-ONAP-RequestID", - "in" : "header", - "description" : "RequestID for http transaction", - "required" : false, - "type" : "string", - "format" : "uuid" - } ], - "responses" : { - "200" : { - "description" : "successful operation; All policies matching specified policy type will be returned.", - "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/ToscaServiceTemplate" - } - }, - "401" : { - "description" : "Authentication Error" - }, - "403" : { - "description" : "Authorization Error" - }, - "404" : { - "description" : "Resource Not Found" - }, - "500" : { - "description" : "Internal Server Error" - } - }, - "security" : [ { - "basicAuth" : [ ] - } ], - "x-interface info" : { - "api-version" : "1.0.0", - "last-mod-release" : "Dublin" - } - }, - "post" : { - "tags" : [ "Policy" ], - "summary" : "Create a new policy for a policy type version", - "description" : "Create a new policy for a policy type. Client should provide TOSCA body of the new policy", - "operationId" : "createPolicy", - "consumes" : [ "application/json" ], - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "policyTypeId", - "in" : "path", - "description" : "ID of policy type", - "required" : true, - "type" : "string" - }, { - "name" : "policyTypeVersion", - "in" : "path", - "description" : "Version of policy type", - "required" : true, - "type" : "string" - }, { - "name" : "X-ONAP-RequestID", - "in" : "header", - "description" : "RequestID for http transaction", - "required" : false, - "type" : "string", - "format" : "uuid" - }, { - "in" : "body", - "name" : "body", - "description" : "Entity body of policy", - "required" : true, - "type" : "ToscaServiceTemplate", - "schema" : { - "$ref" : "#/definitions/ToscaServiceTemplate" - } - } ], - "responses" : { - "200" : { - "description" : "successful operation; Newly created policy matching specified policy type will be returned.", - "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/ToscaServiceTemplate" - } - }, - "400" : { - "description" : "Invalid Body" - }, - "401" : { - "description" : "Authentication Error" - }, - "403" : { - "description" : "Authorization Error" - }, - "404" : { - "description" : "Resource Not Found" - }, - "500" : { - "description" : "Internal Server Error" - } - }, - "security" : [ { - "basicAuth" : [ ] - } ], - "x-interface info" : { - "api-version" : "1.0.0", - "last-mod-release" : "Dublin" - } - } - }, - "/policy/api/v1/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}" : { - "get" : { - "tags" : [ "Policy" ], - "summary" : "Retrieve all version details of a policy created for a particular policy type version", - "description" : "Returns a list of all version details of the specified policy", - "operationId" : "getAllVersionsOfPolicy", - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "policyTypeId", - "in" : "path", - "description" : "ID of policy type", - "required" : true, - "type" : "string" - }, { - "name" : "policyTypeVersion", - "in" : "path", - "description" : "Version of policy type", - "required" : true, - "type" : "string" - }, { - "name" : "policyId", - "in" : "path", - "description" : "ID of policy", - "required" : true, - "type" : "string" - }, { - "name" : "X-ONAP-RequestID", - "in" : "header", - "description" : "RequestID for http transaction", - "required" : false, - "type" : "string", - "format" : "uuid" - } ], - "responses" : { - "200" : { - "description" : "successful operation; All versions of specified policy matching specified policy type will be returned.", - "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/ToscaServiceTemplate" - } - }, - "401" : { - "description" : "Authentication Error" - }, - "403" : { - "description" : "Authorization Error" - }, - "404" : { - "description" : "Resource Not Found" - }, - "500" : { - "description" : "Internal Server Error" - } - }, - "security" : [ { - "basicAuth" : [ ] - } ], - "x-interface info" : { - "api-version" : "1.0.0", - "last-mod-release" : "Dublin" - } - } - }, - "/policy/api/v1/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}/versions/{policyVersion}" : { - "get" : { - "tags" : [ "Policy" ], - "summary" : "Retrieve one version of a policy created for a particular policy type version", - "description" : "Returns a particular version of specified policy created for the specified policy type version", - "operationId" : "getSpecificVersionOfPolicy", - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "policyTypeId", - "in" : "path", - "description" : "ID of policy type", - "required" : true, - "type" : "string" - }, { - "name" : "policyTypeVersion", - "in" : "path", - "description" : "Version of policy type", - "required" : true, - "type" : "string" - }, { - "name" : "policyId", - "in" : "path", - "description" : "ID of policy", - "required" : true, - "type" : "string" - }, { - "name" : "policyVersion", - "in" : "path", - "description" : "Version of policy", - "required" : true, - "type" : "string" - }, { - "name" : "X-ONAP-RequestID", - "in" : "header", - "description" : "RequestID for http transaction", - "required" : false, - "type" : "string", - "format" : "uuid" - } ], - "responses" : { - "200" : { - "description" : "successful operation; The specified policy matching specified policy type will be returned.", - "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/ToscaServiceTemplate" - } - }, - "401" : { - "description" : "Authentication Error" - }, - "403" : { - "description" : "Authorization Error" - }, - "404" : { - "description" : "Resource Not Found" - }, - "500" : { - "description" : "Internal Server Error" - } - }, - "security" : [ { - "basicAuth" : [ ] - } ], - "x-interface info" : { - "api-version" : "1.0.0", - "last-mod-release" : "Dublin" - } - }, - "delete" : { - "tags" : [ "Policy" ], - "summary" : "Delete a particular version of a policy", - "description" : "Delete a particular version of a policy. It must follow one rule. Rule: the version that has been deployed in PDP group(s) cannot be deleted", - "operationId" : "deleteSpecificVersionOfPolicy", - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "policyTypeId", - "in" : "path", - "description" : "PolicyType ID", - "required" : true, - "type" : "string" - }, { - "name" : "policyTypeVersion", - "in" : "path", - "description" : "Version of policy type", - "required" : true, - "type" : "string" - }, { - "name" : "policyId", - "in" : "path", - "description" : "ID of policy", - "required" : true, - "type" : "string" - }, { - "name" : "policyVersion", - "in" : "path", - "description" : "Version of policy", - "required" : true, - "type" : "string" - }, { - "name" : "X-ONAP-RequestID", - "in" : "header", - "description" : "RequestID for http transaction", - "required" : false, - "type" : "string", - "format" : "uuid" - } ], - "responses" : { - "200" : { - "description" : "successful operation; Newly deleted policy matching specified policy type will be returned.", - "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/ToscaServiceTemplate" - } - }, - "401" : { - "description" : "Authentication Error" - }, - "403" : { - "description" : "Authorization Error" - }, - "404" : { - "description" : "Resource Not Found" - }, - "409" : { - "description" : "Delete Conflict, Rule Violation" - }, - "500" : { - "description" : "Internal Server Error" - } - }, - "security" : [ { - "basicAuth" : [ ] - } ], - "x-interface info" : { - "api-version" : "1.0.0", - "last-mod-release" : "Dublin" - } - } - }, - "/policy/api/v1/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}/versions/latest" : { - "get" : { - "tags" : [ "Policy" ], - "summary" : "Retrieve the latest version of a particular policy", - "description" : "Returns the latest version of specified policy", - "operationId" : "getLatestVersionOfPolicy", - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "policyTypeId", - "in" : "path", - "description" : "ID of policy type", - "required" : true, - "type" : "string" - }, { - "name" : "policyTypeVersion", - "in" : "path", - "description" : "Version of policy type", - "required" : true, - "type" : "string" - }, { - "name" : "policyId", - "in" : "path", - "description" : "ID of policy", - "required" : true, - "type" : "string" - }, { - "name" : "X-ONAP-RequestID", - "in" : "header", - "description" : "RequestID for http transaction", - "required" : false, - "type" : "string", - "format" : "uuid" - } ], - "responses" : { - "200" : { - "description" : "successful operation; Latest version of specified policy matching specified policy type will be returned.", - "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/ToscaServiceTemplate" - } - }, - "401" : { - "description" : "Authentication Error" - }, - "403" : { - "description" : "Authorization Error" - }, - "404" : { - "description" : "Resource Not Found" - }, - "500" : { - "description" : "Internal Server Error" - } - }, - "security" : [ { - "basicAuth" : [ ] - } ], - "x-interface info" : { - "api-version" : "1.0.0", - "last-mod-release" : "Dublin" - } - } - }, - "/policy/api/v1/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}/versions/deployed" : { - "get" : { - "tags" : [ "Policy" ], - "summary" : "Retrieve deployed versions of a particular policy in pdp groups", - "description" : "Returns deployed versions of specified policy in pdp groups", - "operationId" : "getDeployedVersionsOfPolicy", - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "policyTypeId", - "in" : "path", - "description" : "ID of policy type", - "required" : true, - "type" : "string" - }, { - "name" : "policyTypeVersion", - "in" : "path", - "description" : "Version of policy type", - "required" : true, - "type" : "string" - }, { - "name" : "policyId", - "in" : "path", - "description" : "ID of policy", - "required" : true, - "type" : "string" - }, { - "name" : "X-ONAP-RequestID", - "in" : "header", - "description" : "RequestID for http transaction", - "required" : false, - "type" : "string", - "format" : "uuid" - } ], - "responses" : { - "200" : { - "description" : "successful operation; Deployed versions of specified policy matching specified policy type will be returned.", - "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" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ToscaPolicy" - } - } - }, - "401" : { - "description" : "Authentication Error" - }, - "403" : { - "description" : "Authorization Error" - }, - "404" : { - "description" : "Resource Not Found" - }, - "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" : { - "ToscaConstraint" : { - "type" : "object", - "properties" : { - "valid_values" : { - "type" : "array", - "items" : { - "type" : "string" - } - }, - "equal" : { - "type" : "string" - }, - "greater_than" : { - "type" : "string" - }, - "greater_or_equal" : { - "type" : "string" - }, - "less_than" : { - "type" : "string" - }, - "less_or_equal" : { - "type" : "string" - } - } - }, - "ToscaDataType" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string" - }, - "version" : { - "type" : "string" - }, - "derived_from" : { - "type" : "string" - }, - "metadata" : { - "type" : "object", - "additionalProperties" : { - "type" : "string" - } - }, - "description" : { - "type" : "string" - }, - "constraints" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ToscaConstraint" - } - }, - "properties" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/definitions/ToscaProperty" - } - } - } - }, - "ToscaEntrySchema" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string" - }, - "type" : { - "type" : "string" - }, - "typeVersion" : { - "type" : "string" - }, - "description" : { - "type" : "string" - }, - "constraints" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ToscaConstraint" - } - } - } - }, - "ToscaPolicyType" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string" - }, - "version" : { - "type" : "string" - }, - "derived_from" : { - "type" : "string" - }, - "metadata" : { - "type" : "object", - "additionalProperties" : { - "type" : "string" - } - }, - "description" : { - "type" : "string" - }, - "properties" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/definitions/ToscaProperty" - } - } - } - }, - "ToscaPolicyTypeIdentifier" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string" - }, - "version" : { - "type" : "string" - } - } - }, - "ToscaProperty" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string" - }, - "type" : { - "type" : "string" - }, - "typeVersion" : { - "type" : "string" - }, - "description" : { - "type" : "string" - }, - "default" : { - "type" : "string" - }, - "required" : { - "type" : "boolean" - }, - "status" : { - "type" : "string", - "enum" : [ "SUPPORTED", "UNSUPPORTED", "EXPERIMENTAL", "DEPRECATED" ] - }, - "constraints" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ToscaConstraint" - } - }, - "entry_schema" : { - "$ref" : "#/definitions/ToscaEntrySchema" - } - } - }, - "ToscaServiceTemplate" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string" - }, - "version" : { - "type" : "string" - }, - "derived_from" : { - "type" : "string" - }, - "metadata" : { - "type" : "object", - "additionalProperties" : { - "type" : "string" - } - }, - "description" : { - "type" : "string" - }, - "tosca_definitions_version" : { - "type" : "string" - }, - "topology_template" : { - "$ref" : "#/definitions/ToscaTopologyTemplate" - }, - "policy_types" : { - "type" : "array", - "items" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/definitions/ToscaPolicyType" - } - } - }, - "data_types" : { - "type" : "array", - "items" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/definitions/ToscaDataType" - } - } - } - } - }, - "ToscaTopologyTemplate" : { - "type" : "object", - "properties" : { - "description" : { - "type" : "string" - }, - "policies" : { - "type" : "array", - "items" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/definitions/ToscaPolicy" - } - } - } - } - } - } -} \ No newline at end of file diff --git a/docs/api/policytype-api.json b/docs/api/policytype-api.json deleted file mode 100644 index 22151645..00000000 --- a/docs/api/policytype-api.json +++ /dev/null @@ -1,662 +0,0 @@ -{ - "swagger" : "2.0", - "basePath" : "/", - "tags" : [ { - "name" : "PolicyType" - } ], - "schemes" : [ "http", "https" ], - "paths" : { - "/policy/api/v1/policytypes" : { - "get" : { - "tags" : [ "PolicyType" ], - "summary" : "Retrieve existing policy types", - "description" : "Returns a list of existing policy types stored in Policy Framework", - "operationId" : "getAllPolicyTypes", - "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; All policy types will be returned.", - "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/ToscaServiceTemplate" - } - }, - "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" - } - }, - "post" : { - "tags" : [ "PolicyType" ], - "summary" : "Create a new policy type", - "description" : "Create a new policy type. Client should provide TOSCA body of the new policy type", - "operationId" : "createPolicyType", - "consumes" : [ "application/json" ], - "produces" : [ "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Entity body of policy type", - "required" : true, - "type" : "ToscaServiceTemplate", - "schema" : { - "$ref" : "#/definitions/ToscaServiceTemplate" - } - }, { - "name" : "X-ONAP-RequestID", - "in" : "header", - "description" : "RequestID for http transaction", - "required" : false, - "type" : "string", - "format" : "uuid" - } ], - "responses" : { - "200" : { - "description" : "successful operation; The newly created policy type will be returned.", - "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/ToscaServiceTemplate" - } - }, - "400" : { - "description" : "Invalid Body" - }, - "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/api/v1/policytypes/{policyTypeId}" : { - "get" : { - "tags" : [ "PolicyType" ], - "summary" : "Retrieve all available versions of a policy type", - "description" : "Returns a list of all available versions for the specified policy type", - "operationId" : "getAllVersionsOfPolicyType", - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "policyTypeId", - "in" : "path", - "description" : "ID of policy type", - "required" : true, - "type" : "string" - }, { - "name" : "X-ONAP-RequestID", - "in" : "header", - "description" : "RequestID for http transaction", - "required" : false, - "type" : "string", - "format" : "uuid" - } ], - "responses" : { - "200" : { - "description" : "successful operation; All versions of specified policy type will be returned.", - "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/ToscaServiceTemplate" - } - }, - "401" : { - "description" : "Authentication Error" - }, - "403" : { - "description" : "Authorization Error" - }, - "404" : { - "description" : "Resource Not Found" - }, - "500" : { - "description" : "Internal Server Error" - } - }, - "security" : [ { - "basicAuth" : [ ] - } ], - "x-interface info" : { - "api-version" : "1.0.0", - "last-mod-release" : "Dublin" - } - } - }, - "/policy/api/v1/policytypes/{policyTypeId}/versions/{versionId}" : { - "get" : { - "tags" : [ "PolicyType" ], - "summary" : "Retrieve one particular version of a policy type", - "description" : "Returns a particular version for the specified policy type", - "operationId" : "getSpecificVersionOfPolicyType", - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "policyTypeId", - "in" : "path", - "description" : "ID of policy type", - "required" : true, - "type" : "string" - }, { - "name" : "versionId", - "in" : "path", - "description" : "Version of policy type", - "required" : true, - "type" : "string" - }, { - "name" : "X-ONAP-RequestID", - "in" : "header", - "description" : "RequestID for http transaction", - "required" : false, - "type" : "string", - "format" : "uuid" - } ], - "responses" : { - "200" : { - "description" : "successful operation; One specified version of specified policy type will be returned.", - "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/ToscaServiceTemplate" - } - }, - "401" : { - "description" : "Authentication Error" - }, - "403" : { - "description" : "Authorization Error" - }, - "404" : { - "description" : "Resource Not Found" - }, - "500" : { - "description" : "Internal Server Error" - } - }, - "security" : [ { - "basicAuth" : [ ] - } ], - "x-interface info" : { - "api-version" : "1.0.0", - "last-mod-release" : "Dublin" - } - }, - "delete" : { - "tags" : [ "PolicyType" ], - "summary" : "Delete one version of a policy type", - "description" : "Delete one version of a policy type. It must follow two rules. Rule 1: pre-defined policy types cannot be deleted; Rule 2: policy types that are in use (parameterized by a TOSCA policy) cannot be deleted. The parameterizing TOSCA policies must be deleted first.", - "operationId" : "deleteSpecificVersionOfPolicyType", - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "policyTypeId", - "in" : "path", - "description" : "ID of policy type", - "required" : true, - "type" : "string" - }, { - "name" : "versionId", - "in" : "path", - "description" : "Version of policy type", - "required" : true, - "type" : "string" - }, { - "name" : "X-ONAP-RequestID", - "in" : "header", - "description" : "RequestID for http transaction", - "required" : false, - "type" : "string", - "format" : "uuid" - } ], - "responses" : { - "200" : { - "description" : "successful operation; Newly deleted policy type will be returned.", - "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/ToscaServiceTemplate" - } - }, - "401" : { - "description" : "Authentication Error" - }, - "403" : { - "description" : "Authorization Error" - }, - "404" : { - "description" : "Resource Not Found" - }, - "409" : { - "description" : "Delete Conflict, Rule Violation" - }, - "500" : { - "description" : "Internal Server Error" - } - }, - "security" : [ { - "basicAuth" : [ ] - } ], - "x-interface info" : { - "api-version" : "1.0.0", - "last-mod-release" : "Dublin" - } - } - }, - "/policy/api/v1/policytypes/{policyTypeId}/versions/latest" : { - "get" : { - "tags" : [ "PolicyType" ], - "summary" : "Retrieve latest version of a policy type", - "description" : "Returns latest version for the specified policy type", - "operationId" : "getLatestVersionOfPolicyType", - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "policyTypeId", - "in" : "path", - "description" : "ID of policy type", - "required" : true, - "type" : "string" - }, { - "name" : "X-ONAP-RequestID", - "in" : "header", - "description" : "RequestID for http transaction", - "required" : false, - "type" : "string", - "format" : "uuid" - } ], - "responses" : { - "200" : { - "description" : "successful operation; Latest version of specified policy type will be returned.", - "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/ToscaServiceTemplate" - } - }, - "401" : { - "description" : "Authentication Error" - }, - "403" : { - "description" : "Authorization Error" - }, - "404" : { - "description" : "Resource Not Found" - }, - "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" : { - "ToscaConstraint" : { - "type" : "object", - "properties" : { - "valid_values" : { - "type" : "array", - "items" : { - "type" : "string" - } - }, - "equal" : { - "type" : "string" - }, - "greater_than" : { - "type" : "string" - }, - "greater_or_equal" : { - "type" : "string" - }, - "less_than" : { - "type" : "string" - }, - "less_or_equal" : { - "type" : "string" - } - } - }, - "ToscaDataType" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string" - }, - "version" : { - "type" : "string" - }, - "derived_from" : { - "type" : "string" - }, - "metadata" : { - "type" : "object", - "additionalProperties" : { - "type" : "string" - } - }, - "description" : { - "type" : "string" - }, - "constraints" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ToscaConstraint" - } - }, - "properties" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/definitions/ToscaProperty" - } - } - } - }, - "ToscaEntrySchema" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string" - }, - "type" : { - "type" : "string" - }, - "typeVersion" : { - "type" : "string" - }, - "description" : { - "type" : "string" - }, - "constraints" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ToscaConstraint" - } - } - } - }, - "ToscaPolicyType" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string" - }, - "version" : { - "type" : "string" - }, - "derived_from" : { - "type" : "string" - }, - "metadata" : { - "type" : "object", - "additionalProperties" : { - "type" : "string" - } - }, - "description" : { - "type" : "string" - }, - "properties" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/definitions/ToscaProperty" - } - } - } - }, - "ToscaPolicyTypeIdentifier" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string" - }, - "version" : { - "type" : "string" - } - } - }, - "ToscaProperty" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string" - }, - "type" : { - "type" : "string" - }, - "typeVersion" : { - "type" : "string" - }, - "description" : { - "type" : "string" - }, - "default" : { - "type" : "string" - }, - "required" : { - "type" : "boolean" - }, - "status" : { - "type" : "string", - "enum" : [ "SUPPORTED", "UNSUPPORTED", "EXPERIMENTAL", "DEPRECATED" ] - }, - "constraints" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ToscaConstraint" - } - }, - "entry_schema" : { - "$ref" : "#/definitions/ToscaEntrySchema" - } - } - }, - "ToscaServiceTemplate" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string" - }, - "version" : { - "type" : "string" - }, - "derived_from" : { - "type" : "string" - }, - "metadata" : { - "type" : "object", - "additionalProperties" : { - "type" : "string" - } - }, - "description" : { - "type" : "string" - }, - "tosca_definitions_version" : { - "type" : "string" - }, - "topology_template" : { - "$ref" : "#/definitions/ToscaTopologyTemplate" - }, - "policy_types" : { - "type" : "array", - "items" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/definitions/ToscaPolicyType" - } - } - }, - "data_types" : { - "type" : "array", - "items" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/definitions/ToscaDataType" - } - } - } - } - }, - "ToscaTopologyTemplate" : { - "type" : "object", - "properties" : { - "description" : { - "type" : "string" - }, - "policies" : { - "type" : "array", - "items" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/definitions/ToscaPolicy" - } - } - } - } - } - } -} diff --git a/docs/api/policytypes/onap.policies.controlloop.Operational.json b/docs/api/policytypes/onap.policies.controlloop.Operational.json new file mode 100644 index 00000000..2d36a258 --- /dev/null +++ b/docs/api/policytypes/onap.policies.controlloop.Operational.json @@ -0,0 +1,12 @@ +{ + "tosca_definitions_version": "tosca_simple_yaml_1_0_0", + "policy_types": [ + { + "onap.policies.controlloop.Operational": { + "derived_from": "tosca.policies.Root", + "version": "1.0.0", + "description": "Operational Policy for Control Loops" + } + } + ] +} \ No newline at end of file diff --git a/docs/api/policytypes/onap.policies.controlloop.guard.Blacklist.json b/docs/api/policytypes/onap.policies.controlloop.guard.Blacklist.json new file mode 100644 index 00000000..9391496c --- /dev/null +++ b/docs/api/policytypes/onap.policies.controlloop.guard.Blacklist.json @@ -0,0 +1,62 @@ +{ + "tosca_definitions_version": "tosca_simple_yaml_1_0_0", + "policy_types": [ + { + "onap.policies.controlloop.Guard": { + "derived_from": "tosca.policies.Root", + "version": "1.0.0", + "description": "Guard Policies for Control Loop Operational Policies" + } + }, + { + "onap.policies.controlloop.guard.Blacklist": { + "derived_from": "onap.policies.controlloop.Guard", + "version": "1.0.0", + "description": "Supports blacklist of VNF's from performing control loop actions on.", + "properties": { + "blacklist_policy": { + "type": "map", + "description": null, + "entry_schema": { + "type": "onap.datatypes.guard.Blacklist" + } + } + } + } + } + ], + "data_types": [ + { + "onap.datatypes.guard.Blacklist": { + "derived_from": "tosca.datatypes.Root", + "properties": { + "actor": { + "type": "string", + "description": "Specifies the Actor", + "required": true + }, + "recipe": { + "type": "string", + "description": "Specified the Recipe", + "required": true + }, + "time_range": { + "type": "tosca.datatypes.TimeInterval", + "description": "An optional range of time during the day the blacklist is valid for.", + "required": false + }, + "controlLoopName": { + "type": "string", + "description": "An optional specific control loop to apply this guard to.", + "required": false + }, + "blacklist": { + "type": "list", + "description": "List of VNF's", + "required": true + } + } + } + } + ] +} \ No newline at end of file diff --git a/docs/api/policytypes/onap.policies.controlloop.guard.FrequencyLimiter.json b/docs/api/policytypes/onap.policies.controlloop.guard.FrequencyLimiter.json new file mode 100644 index 00000000..598bd3c7 --- /dev/null +++ b/docs/api/policytypes/onap.policies.controlloop.guard.FrequencyLimiter.json @@ -0,0 +1,77 @@ +{ + "tosca_definitions_version": "tosca_simple_yaml_1_0_0", + "policy_types": [ + { + "onap.policies.controlloop.Guard": { + "derived_from": "tosca.policies.Root", + "version": "1.0.0", + "description": "Guard Policies for Control Loop Operational Policies" + } + }, + { + "onap.policies.controlloop.guard.FrequencyLimiter": { + "derived_from": "onap.policies.controlloop.Guard", + "version": "1.0.0", + "description": "Supports limiting the frequency of actions being taken by a Actor.", + "properties": { + "frequency_policy": { + "type": "map", + "description": null, + "entry_schema": { + "type": "onap.datatypes.guard.FrequencyLimiter" + } + } + } + } + } + ], + "data_types": [ + { + "onap.datatypes.guard.FrequencyLimiter": { + "derived_from": "tosca.datatypes.Root", + "properties": { + "actor": { + "type": "string", + "description": "Specifies the Actor", + "required": true + }, + "recipe": { + "type": "string", + "description": "Specified the Recipe", + "required": true + }, + "time_window": { + "type": "scalar-unit.time", + "description": "The time window to count the actions against.", + "required": true + }, + "limit": { + "type": "integer", + "description": "The limit", + "required": true, + "constraints": [ + { + "greater_than": 0 + } + ] + }, + "time_range": { + "type": "tosca.datatypes.TimeInterval", + "description": "An optional range of time during the day the frequency is valid for.", + "required": false + }, + "controlLoopName": { + "type": "string", + "description": "An optional specific control loop to apply this guard to.", + "required": false + }, + "target": { + "type": "string", + "description": "An optional specific VNF to apply this guard to.", + "required": false + } + } + } + } + ] +} \ No newline at end of file diff --git a/docs/api/policytypes/onap.policies.controlloop.guard.MinMax.json b/docs/api/policytypes/onap.policies.controlloop.guard.MinMax.json new file mode 100644 index 00000000..71658dd4 --- /dev/null +++ b/docs/api/policytypes/onap.policies.controlloop.guard.MinMax.json @@ -0,0 +1,66 @@ +{ + "policy_types": [ + { + "onap.policies.controlloop.Guard": { + "derived_from": "tosca.policies.Root", + "version": "1.0.0", + "description": "Guard Policies for Control Loop Operational Policies" + } + }, + { + "onap.policies.controlloop.guard.MinMax": { + "derived_from": "onap.policies.controlloop.Guard", + "version": "1.0.0", + "description": "Supports Min/Max number of VF Modules", + "properties": { + "minmax_policy": { + "type": "map", + "description": null, + "entry_schema": { + "type": "onap.datatypes.guard.MinMax" + } + } + } + } + } + ], + "data_types": [ + { + "onap.datatypes.guard.MinMax": { + "derived_from": "tosca.datatypes.Root", + "properties": { + "actor": { + "type": "string", + "description": "Specifies the Actor", + "required": true + }, + "recipe": { + "type": "string", + "description": "Specified the Recipe", + "required": true + }, + "time_range": { + "type": "tosca.datatypes.TimeInterval", + "description": "An optional range of time during the day the Min/Max limit is valid for.", + "required": false + }, + "controlLoopName": { + "type": "string", + "description": "An optional specific control loop to apply this guard to.", + "required": false + }, + "min_vf_module_instances": { + "type": "integer", + "required": true, + "description": "The minimum instances of this VF-Module" + }, + "max_vf_module_instances": { + "type": "integer", + "required": false, + "description": "The maximum instances of this VF-Module" + } + } + } + } + ] +} \ No newline at end of file diff --git a/docs/api/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app.json b/docs/api/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app.json new file mode 100644 index 00000000..ce46dac8 --- /dev/null +++ b/docs/api/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app.json @@ -0,0 +1,224 @@ +{ + "tosca_definitions_version": "tosca_simple_yaml_1_0_0", + "policy_types": [ + { + "onap.policies.Monitoring": { + "derived_from": "tosca.policies.Root", + "version": "1.0.0", + "description": "a base policy type for all policies that governs monitoring provisioning" + } + }, + { + "onap.policies.monitoring.cdap.tca.hi.lo.app": { + "derived_from": "onap.policies.Monitoring", + "version": "1.0.0", + "properties": { + "tca_policy": { + "type": "map", + "description": "TCA Policy JSON", + "entry_schema": { + "type": "onap.datatypes.monitoring.tca_policy" + } + } + } + } + } + ], + "data_types": [ + { + "onap.datatypes.monitoring.metricsPerEventName": { + "derived_from": "tosca.datatypes.Root", + "properties": { + "controlLoopSchemaType": { + "type": "string", + "required": true, + "description": "Specifies Control Loop Schema Type for the event Name e.g. VNF, VM", + "constraints": [ + { + "valid_values": [ + "VM", + "VNF" + ] + } + ] + }, + "eventName": { + "type": "string", + "required": true, + "description": "Event name to which thresholds need to be applied" + }, + "policyName": { + "type": "string", + "required": true, + "description": "TCA Policy Scope Name" + }, + "policyScope": { + "type": "string", + "required": true, + "description": "TCA Policy Scope" + }, + "policyVersion": { + "type": "string", + "required": true, + "description": "TCA Policy Scope Version" + }, + "thresholds": { + "type": "list", + "required": true, + "description": "Thresholds associated with eventName", + "entry_schema": { + "type": "onap.datatypes.monitoring.thresholds" + } + } + } + } + }, + { + "onap.datatypes.monitoring.tca_policy": { + "derived_from": "tosca.datatypes.Root", + "properties": { + "domain": { + "type": "string", + "required": true, + "description": "Domain name to which TCA needs to be applied", + "default": "measurementsForVfScaling", + "constraints": [ + { + "equal": "measurementsForVfScaling" + } + ] + }, + "metricsPerEventName": { + "type": "list", + "required": true, + "description": "Contains eventName and threshold details that need to be applied to given eventName", + "entry_schema": { + "type": "onap.datatypes.monitoring.metricsPerEventName" + } + } + } + } + }, + { + "onap.datatypes.monitoring.thresholds": { + "derived_from": "tosca.datatypes.Root", + "properties": { + "closedLoopControlName": { + "type": "string", + "required": true, + "description": "Closed Loop Control Name associated with the threshold" + }, + "closedLoopEventStatus": { + "type": "string", + "required": true, + "description": "Closed Loop Event Status of the threshold", + "constraints": [ + { + "valid_values": [ + "ONSET", + "ABATED" + ] + } + ] + }, + "direction": { + "type": "string", + "required": true, + "description": "Direction of the threshold", + "constraints": [ + { + "valid_values": [ + "LESS", + "LESS_OR_EQUAL", + "GREATER", + "GREATER_OR_EQUAL", + "EQUAL" + ] + } + ] + }, + "fieldPath": { + "type": "string", + "required": true, + "description": "Json field Path as per CEF message which needs to be analyzed for TCA", + "constraints": [ + { + "valid_values": [ + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated", + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle", + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt", + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice", + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq", + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal", + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem", + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait", + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage", + "$.event.measurementsForVfScalingFields.meanRequestLatency", + "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered", + "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached", + "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured", + "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree", + "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed", + "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value" + ] + } + ] + }, + "severity": { + "type": "string", + "required": true, + "description": "Threshold Event Severity", + "constraints": [ + { + "valid_values": [ + "CRITICAL", + "MAJOR", + "MINOR", + "WARNING", + "NORMAL" + ] + } + ] + }, + "thresholdValue": { + "type": "integer", + "required": true, + "description": "Threshold value for the field Path inside CEF message" + }, + "version": { + "type": "string", + "required": true, + "description": "Version number associated with the threshold" + } + } + } + } + ] +} diff --git a/docs/api/policytypes/onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server.json b/docs/api/policytypes/onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server.json new file mode 100644 index 00000000..26f4c021 --- /dev/null +++ b/docs/api/policytypes/onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server.json @@ -0,0 +1,28 @@ +{ + "tosca_definitions_version": "tosca_simple_yaml_1_0_0", + "policy_types": [ + { + "onap.policies.Monitoring": { + "derived_from": "tosca.policies.Root", + "description": "a base policy type for all policies that govern monitoring provision", + "version": "1.0.0" + } + }, + { + "onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server": { + "derived_from": "policy.nodes.Root", + "version": "1.0.0", + "properties": { + "buscontroller_feed_publishing_endpoint": { + "type": "string", + "description": "DMAAP Bus Controller feed endpoint" + }, + "datafile.policy": { + "type": "string", + "description": "datafile Policy JSON as string" + } + } + } + } + ] +} \ No newline at end of file diff --git a/docs/api/policytypes/onap.policies.optimization.AffinityPolicy.json b/docs/api/policytypes/onap.policies.optimization.AffinityPolicy.json new file mode 100644 index 00000000..62ad6efa --- /dev/null +++ b/docs/api/policytypes/onap.policies.optimization.AffinityPolicy.json @@ -0,0 +1,103 @@ +{ + "tosca_definitions_version": "tosca_simple_yaml_1_0_0", + "policy_types": [ + { + "onap.policies.Optimization": { + "derived_from": "tosca.policies.Root", + "version": "1.0.0", + "description": "a base policy type for all policies that govern optimization" + } + }, + { + "onap.policies.optimization.AffinityPolicy": { + "derived_from": "onap.policies.Optimization", + "version": "1.0.0", + "properties": { + "policyScope": { + "type": "list", + "description": "scope where the policy is applicable", + "required": true, + "matchable": true, + "entry_schema": { + "type": "string" + } + }, + "policyType": { + "type": "list", + "description": "type of a policy", + "required": true, + "matchable": true, + "entry_schema": { + "type": "string", + "constraints": [ + { + "valid_values": [ + "zone" + ] + } + ] + } + }, + "identity": { + "type": "string", + "required": true + }, + "applicableResources": { + "type": "list", + "required": true, + "entry_schema": { + "type": "string", + "constraints": [ + { + "valid_values": [ + "any", + "all" + ] + } + ] + } + }, + "affinityProperties": { + "type": "policy.data.affinityProperties_properties", + "required": true + }, + "resources": { + "type": "list", + "required": true, + "entry_schema": { + "type": "string" + } + } + } + } + } + ], + "data_types": [ + { + "policy.data.affinityProperties_properties": { + "derived_from": "tosca.nodes.Root", + "properties": { + "qualifier": { + "type": "list", + "required": true, + "entry_schema": { + "type": "string", + "constraints": [ + { + "valid_values": [ + "same", + "different" + ] + } + ] + } + }, + "category": { + "type": "string", + "required": true + } + } + } + } + ] +} diff --git a/docs/api/policytypes/onap.policies.optimization.DistancePolicy.json b/docs/api/policytypes/onap.policies.optimization.DistancePolicy.json new file mode 100644 index 00000000..16cd649f --- /dev/null +++ b/docs/api/policytypes/onap.policies.optimization.DistancePolicy.json @@ -0,0 +1,133 @@ +{ + "tosca_definitions_version": "tosca_simple_yaml_1_0_0", + "policy_types": [ + { + "onap.policies.Optimization": { + "derived_from": "tosca.policies.Root", + "version": "1.0.0", + "description": "a base policy type for all policies that govern optimization" + } + }, + { + "onap.policies.optimization.DistancePolicy": { + "derived_from": "onap.policies.Optimization", + "version": "1.0.0", + "properties": { + "policyScope": { + "type": "list", + "description": "scope where the policy is applicable", + "required": true, + "matchable": true, + "entry_schema": { + "type": "string" + } + }, + "policyType": { + "type": "list", + "description": "type of a policy", + "required": true, + "matchable": true, + "entry_schema": { + "type": "string", + "constraints": [ + { + "valid_values": [ + "distance_to_location" + ] + } + ] + } + }, + "identity": { + "type": "string", + "required": true + }, + "resources": { + "type": "list", + "required": true, + "entry_schema": { + "type": "string" + } + }, + "applicableResources": { + "type": "list", + "required": true, + "entry_schema": { + "type": "string", + "constraints": [ + { + "valid_values": [ + "any", + "all" + ] + } + ] + } + }, + "distanceProperties": { + "type": "policy.data.distanceProperties_properties", + "required": true + } + } + } + } + ], + "data_types": [ + { + "policy.data.distanceProperties_properties": { + "derived_from": "tosca.nodes.Root", + "properties": { + "locationInfo": { + "type": "string", + "required": true + }, + "distance": { + "type": "policy.data.distance_properties", + "required": true + } + } + }, + "policy.data.distance_properties": { + "derived_from": "tosca.nodes.Root", + "properties": { + "value": { + "type": "string", + "required": true + }, + "operator": { + "type": "list", + "required": true, + "entry_schema": { + "type": "string", + "constraints": [ + { + "valid_values": [ + "<", + "<=", + ">", + ">=", + "=" + ] + } + ] + } + }, + "unit": { + "type": "list", + "required": true, + "entry_schema": { + "type": "string", + "constraints": [ + { + "valid_values": [ + "km" + ] + } + ] + } + } + } + } + } + ] +} diff --git a/docs/api/policytypes/onap.policies.optimization.HpaPolicy.json b/docs/api/policytypes/onap.policies.optimization.HpaPolicy.json new file mode 100644 index 00000000..b02e17c4 --- /dev/null +++ b/docs/api/policytypes/onap.policies.optimization.HpaPolicy.json @@ -0,0 +1,205 @@ +{ + "tosca_definitions_version": "tosca_simple_yaml_1_0_0", + "policy_types": [ + { + "onap.policies.Optimization": { + "derived_from": "tosca.policies.Root", + "version": "1.0.0", + "description": "a base policy type for all policies that govern optimization" + } + }, + { + "onap.policies.optimization.HpaPolicy": { + "derived_from": "onap.policies.Optimization", + "version": "1.0.0", + "properties": { + "policyScope": { + "type": "list", + "description": "scope where the policy is applicable", + "required": true, + "matchable": true, + "entry_schema": { + "type": "string" + } + }, + "policyType": { + "type": "list", + "description": "type of a policy", + "required": true, + "matchable": true, + "entry_schema": { + "type": "string", + "constraints": [ + { + "valid_values": [ + "hpa" + ] + } + ] + } + }, + "resources": { + "type": "list", + "required": true, + "entry_schema": { + "type": "string" + } + }, + "identity": { + "type": "string", + "required": true + }, + "flavorFeatures": { + "type": "list", + "required": true, + "entry_schema": { + "type": "policy.data.flavorFeatures_properties" + } + } + } + } + } + ], + "data_types": [ + { + "policy.data.flavorFeatures_properties": { + "derived_from": "tosca.nodes.Root", + "properties": { + "id": { + "type": "string", + "required": true + }, + "type": { + "type": "string", + "required": true + }, + "directives": { + "type": "list", + "required": true, + "entry_schema": { + "type": "policy.data.directives_properties" + } + }, + "flavorProperties": { + "type": "list", + "required": true, + "entry_schema": { + "type": "policy.data.flavorProperties_properties" + } + } + } + } + }, + { + "policy.data.directives_properties": { + "derived_from": "tosca.nodes.Root", + "properties": { + "type": { + "type": "string" + }, + "attributes": { + "type": "list", + "entry_schema": { + "type": "policy.data.directives_attributes_properties" + } + } + } + } + }, + { + "policy.data.directives_attributes_properties": { + "derived_from": "tosca.nodes.Root", + "properties": { + "attribute_name": { + "type": "string" + }, + "attribute_value": { + "type": "string" + } + } + } + }, + { + "policy.data.flavorProperties_properties": { + "derived_from": "tosca.nodes.Root", + "properties": { + "hpa-feature": { + "type": "string", + "required": true + }, + "mandatory": { + "type": "string", + "required": true + }, + "score": { + "type": "string", + "required": false + }, + "architecture": { + "type": "string", + "required": true + }, + "hpa-version": { + "type": "string", + "required": true + }, + "directives": { + "type": "list", + "required": true, + "entry_schema": { + "type": "policy.data.directives_properties" + } + }, + "hpa-feature-attributes": { + "type": "list", + "required": true, + "entry_schema": { + "type": "policy.data.hpa-feature-attributes_properties" + } + } + } + } + }, + { + "policy.data.hpa-feature-attributes_properties": { + "derived_from": "tosca.nodes.Root", + "properties": { + "hpa-attribute-key": { + "type": "string", + "required": true + }, + "hpa-attribute-value": { + "type": "string", + "required": true + }, + "operator": { + "type": "list", + "required": true, + "entry_schema": { + "type": "string", + "constraints": [ + { + "valid_values": [ + "<", + "<=", + ">", + ">=", + "=", + "!=", + "any", + "all", + "subset" + ] + } + ] + } + }, + "unit": { + "type": "string", + "required": false + } + } + } + } + ] +} diff --git a/docs/api/policytypes/onap.policies.optimization.OptimizationPolicy.json b/docs/api/policytypes/onap.policies.optimization.OptimizationPolicy.json new file mode 100644 index 00000000..153b1e30 --- /dev/null +++ b/docs/api/policytypes/onap.policies.optimization.OptimizationPolicy.json @@ -0,0 +1,141 @@ +{ + "tosca_definitions_version": "tosca_simple_yaml_1_0_0", + "policy_types": [ + { + "onap.policies.Optimization": { + "derived_from": "tosca.policies.Root", + "version": "1.0.0", + "description": "a base policy type for all policies that govern optimization" + } + }, + { + "onap.policies.optimization.OptimizationPolicy": { + "derived_from": "onap.policies.Optimization", + "version": "1.0.0", + "properties": { + "policyScope": { + "type": "list", + "description": "scope where the policy is applicable", + "required": true, + "matchable": true, + "entry_schema": { + "type": "string" + } + }, + "policyType": { + "type": "list", + "description": "type of a policy", + "required": true, + "matchable": true, + "entry_schema": { + "type": "string", + "constraints": [ + { + "valid_values": [ + "placement_optimization" + ] + } + ] + } + }, + "identity": { + "type": "string", + "required": true + }, + "objective": { + "type": "list", + "required": true, + "entry_schema": { + "type": "string", + "constraints": [ + { + "valid_values": [ + "minimize", + "maximize" + ] + } + ] + } + }, + "objectiveParameter": { + "type": "policy.data.objectiveParameter_properties", + "required": true + } + } + } + } + ], + "data_types": [ + { + "policy.data.objectiveParameter_properties": { + "derived_from": "tosca.nodes.Root", + "properties": { + "parameterAttributes": { + "type": "list", + "required": true, + "entry_schema": { + "type": "policy.data.parameterAttributes_properties" + } + }, + "operator": { + "type": "list", + "required": true, + "entry_schema": { + "type": "string", + "constraints": [ + { + "valid_values": [ + "*", + "+", + "-", + "/", + "%" + ] + } + ] + } + } + } + }, + "policy.data.parameterAttributes_properties": { + "derived_from": "tosca.nodes.Root", + "properties": { + "resources": { + "type": "string", + "required": true + }, + "customerLocationInfo": { + "type": "string", + "required": true + }, + "parameter": { + "type": "string", + "required": true + }, + "weight": { + "type": "string", + "required": true + }, + "operator": { + "type": "list", + "required": true, + "entry_schema": { + "type": "string", + "constraints": [ + { + "valid_values": [ + "*", + "+", + "-", + "/", + "%" + ] + } + ] + } + } + } + } + } + ] +} diff --git a/docs/api/policytypes/onap.policies.optimization.PciPolicy.json b/docs/api/policytypes/onap.policies.optimization.PciPolicy.json new file mode 100644 index 00000000..4adb631d --- /dev/null +++ b/docs/api/policytypes/onap.policies.optimization.PciPolicy.json @@ -0,0 +1,92 @@ +{ + "tosca_definitions_version": "tosca_simple_yaml_1_0_0", + "policy_types": [ + { + "onap.policies.Optimization": { + "derived_from": "tosca.policies.Root", + "version": "1.0.0", + "description": "a base policy type for all policies that govern optimization" + } + }, + { + "onap.policies.optimization.PciPolicy": { + "derived_from": "onap.policies.Optimization", + "version": "1.0.0", + "properties": { + "policyScope": { + "type": "list", + "description": "scope where the policy is applicable", + "required": true, + "matchable": true, + "entry_schema": { + "type": "string" + } + }, + "policyType": { + "type": "list", + "description": "type of a policy", + "required": true, + "matchable": true, + "entry_schema": { + "type": "string", + "constraints": [ + { + "valid_values": [ + "pciPolicy" + ] + } + ] + } + }, + "identity": { + "type": "string", + "required": true + }, + "resources": { + "type": "list", + "required": true, + "entry_schema": { + "type": "string" + } + }, + "pciProperties": { + "type": "list", + "required": false, + "entry_schema": { + "type": "policy.data.pciProperties_properties" + } + } + } + } + } + ], + "data_types": [ + { + "policy.data.pciProperties_properties": { + "derived_from": "tosca.nodes.Root", + "properties": { + "algoCategory": { + "type": "string", + "required": false + }, + "pciOptmizationAlgoName": { + "type": "string", + "required": false + }, + "pciOptimizationNwConstraint": { + "type": "string", + "required": false + }, + "pciOptimizationPriority": { + "type": "string", + "required": false + }, + "pciOptimizationTimeConstraint": { + "type": "string", + "required": false + } + } + } + } + ] +} diff --git a/docs/api/policytypes/onap.policies.optimization.QueryPolicy.json b/docs/api/policytypes/onap.policies.optimization.QueryPolicy.json new file mode 100644 index 00000000..98bd3408 --- /dev/null +++ b/docs/api/policytypes/onap.policies.optimization.QueryPolicy.json @@ -0,0 +1,77 @@ +{ + "tosca_definitions_version": "tosca_simple_yaml_1_0_0", + "policy_types": [ + { + "onap.policies.Optimization": { + "derived_from": "tosca.policies.Root", + "version": "1.0.0", + "description": "a base policy type for all policies that govern optimization" + } + }, + { + "onap.policies.optimization.QueryPolicy": { + "derived_from": "onap.policies.Optimization", + "version": "1.0.0", + "properties": { + "policyScope": { + "type": "list", + "description": "scope where the policy is applicable", + "required": true, + "matchable": true, + "entry_schema": { + "type": "string" + } + }, + "policyType": { + "type": "list", + "description": "type of a policy", + "required": true, + "matchable": true, + "entry_schema": { + "type": "string", + "constraints": [ + { + "valid_values": [ + "request_param_query" + ] + } + ] + } + }, + "identity": { + "type": "string", + "required": true + }, + "queryProperties": { + "type": "list", + "required": true, + "entry_schema": { + "type": "policy.data.queryProperties_properties" + } + } + } + } + } + ], + "data_types": [ + { + "policy.data.queryProperties_properties": { + "derived_from": "tosca.nodes.Root", + "properties": { + "attribute": { + "type": "string", + "required": true + }, + "value": { + "type": "string", + "required": true + }, + "attribute_location": { + "type": "string", + "required": true + } + } + } + } + ] +} diff --git a/docs/api/policytypes/onap.policies.optimization.SubscriberPolicy.json b/docs/api/policytypes/onap.policies.optimization.SubscriberPolicy.json new file mode 100644 index 00000000..81e0b0a7 --- /dev/null +++ b/docs/api/policytypes/onap.policies.optimization.SubscriberPolicy.json @@ -0,0 +1,83 @@ +{ + "tosca_definitions_version": "tosca_simple_yaml_1_0_0", + "policy_types": [ + { + "onap.policies.Optimization": { + "derived_from": "tosca.policies.Root", + "version": "1.0.0", + "description": "a base policy type for all policies that govern optimization" + } + }, + { + "onap.policies.optimization.SubscriberPolicy": { + "derived_from": "onap.policies.Optimization", + "version": "1.0.0", + "properties": { + "policyScope": { + "type": "list", + "description": "scope where the policy is applicable", + "required": true, + "matchable": true, + "entry_schema": { + "type": "string" + } + }, + "policyType": { + "type": "list", + "description": "type of a policy", + "required": true, + "matchable": true, + "entry_schema": { + "type": "string", + "constraints": [ + { + "valid_values": [ + "subscriberPolicy" + ] + } + ] + } + }, + "identity": { + "type": "string", + "required": true + }, + "properties": { + "type": "policy.data.properties_properties", + "required": true + } + } + } + } + ], + "data_types": [ + { + "policy.data.properties_properties": { + "derived_from": "tosca.nodes.Root", + "properties": { + "subscriberName": { + "type": "list", + "required": true, + "entry_schema": { + "type": "string" + } + }, + "subscriberRole": { + "type": "list", + "required": true, + "entry_schema": { + "type": "string" + } + }, + "provStatus": { + "type": "list", + "required": true, + "entry_schema": { + "type": "string" + } + } + } + } + } + ] +} diff --git a/docs/api/policytypes/onap.policies.optimization.Vim_fit.json b/docs/api/policytypes/onap.policies.optimization.Vim_fit.json new file mode 100644 index 00000000..a7894b3f --- /dev/null +++ b/docs/api/policytypes/onap.policies.optimization.Vim_fit.json @@ -0,0 +1,92 @@ +{ + "tosca_definitions_version": "tosca_simple_yaml_1_0_0", + "policy_types": [ + { + "onap.policies.Optimization": { + "derived_from": "tosca.policies.Root", + "version": "1.0.0", + "description": "a base policy type for all policies that govern optimization" + } + }, + { + "onap.policies.optimization.Vim_fit": { + "derived_from": "onap.policies.Optimization", + "version": "1.0.0", + "properties": { + "policyScope": { + "type": "list", + "description": "scope where the policy is applicable", + "required": true, + "matchable": true, + "entry_schema": { + "type": "string" + } + }, + "policyType": { + "type": "list", + "description": "type of a policy", + "required": true, + "matchable": true, + "entry_schema": { + "type": "string", + "constraints": [ + { + "valid_values": [ + "vim_fit" + ] + } + ] + } + }, + "identity": { + "type": "string", + "required": true + }, + "applicableResources": { + "type": "list", + "required": true, + "entry_schema": { + "type": "string", + "constraints": [ + { + "valid_values": [ + "any", + "all" + ] + } + ] + } + }, + "resources": { + "type": "list", + "required": true, + "entry_schema": { + "type": "string" + } + }, + "capacityProperties": { + "type": "policy.data.capacityProperties_properties", + "required": true + } + } + } + } + ], + "data_types": [ + { + "policy.data.capacityProperties_properties": { + "derived_from": "tosca.nodes.Root", + "properties": { + "controller": { + "type": "string", + "required": true + }, + "request": { + "type": "string", + "required": true + } + } + } + } + ] +} diff --git a/docs/api/policytypes/onap.policies.optimization.VnfPolicy.json b/docs/api/policytypes/onap.policies.optimization.VnfPolicy.json new file mode 100644 index 00000000..8c7c1be4 --- /dev/null +++ b/docs/api/policytypes/onap.policies.optimization.VnfPolicy.json @@ -0,0 +1,116 @@ +{ + "tosca_definitions_version": "tosca_simple_yaml_1_0_0", + "policy_types": [ + { + "onap.policies.Optimization": { + "derived_from": "tosca.policies.Root", + "version": "1.0.0", + "description": "a base policy type for all policies that govern optimization" + } + }, + { + "onap.policies.optimization.VnfPolicy": { + "derived_from": "onap.policies.Optimization", + "version": "1.0.0", + "properties": { + "policyScope": { + "type": "list", + "description": "scope where the policy is applicable", + "required": true, + "matchable": true, + "entry_schema": { + "type": "string" + } + }, + "policyType": { + "type": "list", + "description": "type of a policy", + "required": true, + "matchable": true, + "entry_schema": { + "type": "string", + "constraints": [ + { + "valid_values": [ + "vnfPolicy" + ] + } + ] + } + }, + "identity": { + "type": "string", + "required": true + }, + "resources": { + "type": "list", + "required": true, + "entry_schema": { + "type": "string" + } + }, + "applicableResources": { + "type": "list", + "required": true, + "entry_schema": { + "type": "string", + "constraints": [ + { + "valid_values": [ + "any", + "all" + ] + } + ] + } + }, + "vnfProperties": { + "type": "list", + "required": true, + "entry_schema": { + "type": "policy.data.vnfProperties_properties" + } + } + } + } + } + ], + "data_types": [ + { + "policy.data.vnfProperties_properties": { + "derived_from": "tosca.nodes.Root", + "properties": { + "inventoryProvider": { + "type": "string", + "required": true + }, + "serviceType": { + "type": "string", + "required": true + }, + "inventoryType": { + "type": "list", + "required": true, + "entry_schema": { + "type": "string", + "constraints": [ + { + "valid_values": [ + "serviceInstanceId", + "vnfName", + "cloudRegionId", + "vimId" + ] + } + ] + } + }, + "customerId": { + "type": "string", + "required": true + } + } + } + } + ] +} diff --git a/docs/api/statistics-api.json b/docs/api/statistics-api.json deleted file mode 100644 index a55f03c8..00000000 --- a/docs/api/statistics-api.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "swagger" : "2.0", - "basePath" : "/", - "tags" : [{ - "name" : "Statistics" - }], - "schemes" : [ "http", "https" ], - "paths" : { - "/policy/api/v1/statistics" : { - "get" : { - "tags" : [ "Statistics" ], - "summary" : "Retrieve current statistics", - "description" : "Returns current statistics including the counters of API invocation", - "operationId" : "getStatistics", - "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; All statistics counters of API invocation will be returned.", - "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/StatisticsReport" - } - }, - "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" : { - "StatisticsReport" : { - "type" : "object", - "properties" : { - "code" : { - "type" : "integer", - "format" : "int32" - }, - "totalApiCallCount" : { - "type" : "integer", - "format" : "int64" - }, - "apiCallSuccessCount" : { - "type" : "integer", - "format" : "int64" - }, - "apiCallFailureCount" : { - "type" : "integer", - "format" : "int64" - }, - "totalPolicyGetCount" : { - "type" : "integer", - "format" : "int64" - }, - "totalPolicyPostCount" : { - "type" : "integer", - "format" : "int64" - }, - "totalPolicyTypeGetCount" : { - "type" : "integer", - "format" : "int64" - }, - "totalPolicyTypePostCount" : { - "type" : "integer", - "format" : "int64" - }, - "policyGetSuccessCount" : { - "type" : "integer", - "format" : "int64" - }, - "policyGetFailureCount" : { - "type" : "integer", - "format" : "int64" - }, - "policyPostSuccessCount" : { - "type" : "integer", - "format" : "int64" - }, - "policyPostFailureCount" : { - "type" : "integer", - "format" : "int64" - }, - "policyTypeGetSuccessCount" : { - "type" : "integer", - "format" : "int64" - }, - "policyTypeGetFailureCount" : { - "type" : "integer", - "format" : "int64" - }, - "policyTypePostSuccessCount" : { - "type" : "integer", - "format" : "int64" - }, - "policyTypePostFailureCount" : { - "type" : "integer", - "format" : "int64" - } - } - } - } -} diff --git a/docs/api/swagger/guard-policy-api.json b/docs/api/swagger/guard-policy-api.json new file mode 100644 index 00000000..866472ac --- /dev/null +++ b/docs/api/swagger/guard-policy-api.json @@ -0,0 +1,405 @@ +{ + "swagger" : "2.0", + "basePath" : "/", + "tags" : [ { + "name" : "Legacy Guard Policy" + } ], + "schemes" : [ "http", "https" ], + "paths" : { + "/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/{policyId}/versions/latest" : { + "get" : { + "tags" : [ "Legacy Guard Policy" ], + "summary" : "Retrieve the latest version of a particular guard policy", + "description" : "Returns the latest version of the specified guard policy", + "operationId" : "getLatestVersionOfGuardPolicy", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "policyId", + "in" : "path", + "description" : "ID of policy", + "required" : true, + "type" : "string" + }, { + "name" : "X-ONAP-RequestID", + "in" : "header", + "description" : "RequestID for http transaction", + "required" : false, + "type" : "string", + "format" : "uuid" + } ], + "responses" : { + "200" : { + "description" : "successful operation; Latest version of specified guard policy will be returned.", + "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" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/definitions/LegacyGuardPolicyOutput" + } + } + }, + "401" : { + "description" : "Authentication Error" + }, + "403" : { + "description" : "Authorization Error" + }, + "404" : { + "description" : "Resource Not Found" + }, + "500" : { + "description" : "Internal Server Error" + } + }, + "security" : [ { + "basicAuth" : [ ] + } ], + "x-interface info" : { + "api-version" : "1.0.0", + "last-mod-release" : "Dublin" + } + } + }, + "/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/{policyId}/versions/{policyVersion}" : { + "get" : { + "tags" : [ "Legacy Guard Policy" ], + "summary" : "Retrieve one version of a particular guard policy", + "description" : "Returns a particular version of a specified guard policy", + "operationId" : "getSpecificVersionOfGuardPolicy", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "policyId", + "in" : "path", + "description" : "ID of policy", + "required" : true, + "type" : "string" + }, { + "name" : "policyVersion", + "in" : "path", + "description" : "Version of policy", + "required" : true, + "type" : "string" + }, { + "name" : "X-ONAP-RequestID", + "in" : "header", + "description" : "RequestID for http transaction", + "required" : false, + "type" : "string", + "format" : "uuid" + } ], + "responses" : { + "200" : { + "description" : "successful operation; Specified version of guard policy will be returned.", + "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" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/definitions/LegacyGuardPolicyOutput" + } + } + }, + "401" : { + "description" : "Authentication Error" + }, + "403" : { + "description" : "Authorization Error" + }, + "404" : { + "description" : "Resource Not Found" + }, + "500" : { + "description" : "Internal Server Error" + } + }, + "security" : [ { + "basicAuth" : [ ] + } ], + "x-interface info" : { + "api-version" : "1.0.0", + "last-mod-release" : "Dublin" + } + }, + "delete" : { + "tags" : [ "Legacy Guard Policy" ], + "summary" : "Delete a particular version of a guard policy", + "description" : "Delete a particular version of a guard policy. It must follow one rule. Rule: the version that has been deployed in PDP group(s) cannot be deleted", + "operationId" : "deleteSpecificVersionOfGuardPolicy", + "consumes" : [ "application/json" ], + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "policyId", + "in" : "path", + "description" : "ID of policy", + "required" : true, + "type" : "string" + }, { + "name" : "policyVersion", + "in" : "path", + "description" : "Version of policy", + "required" : true, + "type" : "string" + }, { + "name" : "X-ONAP-RequestID", + "in" : "header", + "description" : "RequestID for http transaction", + "required" : false, + "type" : "string", + "format" : "uuid" + } ], + "responses" : { + "200" : { + "description" : "successful operation; Newly deleted guard policy will be returned.", + "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" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/definitions/LegacyGuardPolicyOutput" + } + } + }, + "401" : { + "description" : "Authentication Error" + }, + "403" : { + "description" : "Authorization Error" + }, + "404" : { + "description" : "Resource Not Found" + }, + "409" : { + "description" : "Delete Conflict, Rule Violation" + }, + "500" : { + "description" : "Internal Server Error" + } + }, + "security" : [ { + "basicAuth" : [ ] + } ], + "x-interface info" : { + "api-version" : "1.0.0", + "last-mod-release" : "Dublin" + } + } + }, + "/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies" : { + "post" : { + "tags" : [ "Legacy Guard Policy" ], + "summary" : "Create a new guard policy", + "description" : "Create a new guard policy. Client should provide entity body of the new guard policy", + "operationId" : "createGuardPolicy", + "consumes" : [ "application/json" ], + "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" : "Entity body of policy", + "required" : true, + "type" : "ToscaServiceTemplate", + "schema" : { + "$ref" : "#/definitions/LegacyGuardPolicyInput" + } + } ], + "responses" : { + "200" : { + "description" : "successful operation; Newly created guard policy will be returned.", + "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" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/definitions/LegacyGuardPolicyOutput" + } + } + }, + "400" : { + "description" : "Invalid Body" + }, + "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" : { + "LegacyGuardPolicyContent" : { + "type" : "object", + "properties" : { + "actor" : { + "type" : "string" + }, + "recipe" : { + "type" : "string" + }, + "targets" : { + "type" : "string" + }, + "clname" : { + "type" : "string" + }, + "limit" : { + "type" : "string" + }, + "timeWindow" : { + "type" : "string" + }, + "timeUnits" : { + "type" : "string" + }, + "min" : { + "type" : "string" + }, + "max" : { + "type" : "string" + }, + "guardActiveStart" : { + "type" : "string" + }, + "guardActiveEnd" : { + "type" : "string" + }, + "asPropertyMap" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + } + } + }, + "LegacyGuardPolicyOutput" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string" + }, + "version" : { + "type" : "string" + }, + "metadata" : { + "type" : "object", + "additionalProperties" : { + "type" : "object" + } + }, + "properties" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/definitions/LegacyGuardPolicyContent" + } + } + } + }, + "LegacyGuardPolicyInput" : { + "type" : "object", + "properties" : { + "policy-id" : { + "type" : "string" + }, + "policy-version" : { + "type" : "string" + }, + "content" : { + "$ref" : "#/definitions/LegacyGuardPolicyContent" + } + } + } + } +} \ No newline at end of file diff --git a/docs/api/swagger/healthcheck-api.json b/docs/api/swagger/healthcheck-api.json new file mode 100644 index 00000000..6605ee57 --- /dev/null +++ b/docs/api/swagger/healthcheck-api.json @@ -0,0 +1,99 @@ +{ + "swagger" : "2.0", + "basePath" : "/", + "tags" : [{ + "name" : "HealthCheck" + }], + "schemes" : [ "http", "https" ], + "paths" : { + "/policy/api/v1/healthcheck" : { + "get" : { + "tags" : [ "HealthCheck" ], + "summary" : "Perform a system healthcheck", + "description" : "Returns healthy status of the Policy API component", + "operationId" : "getHealthCheck", + "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; Healthcheck report will be returned.", + "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/HealthCheckReport" + } + }, + "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" : { + "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/api/swagger/operational-policy-api.json b/docs/api/swagger/operational-policy-api.json new file mode 100644 index 00000000..ad098f37 --- /dev/null +++ b/docs/api/swagger/operational-policy-api.json @@ -0,0 +1,325 @@ +{ + "swagger" : "2.0", + "basePath" : "/", + "tags" : [ { + "name" : "Legacy Operational Policy" + } ], + "schemes" : [ "http", "https" ], + "paths" : { + "/policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies/{policyId}/versions/latest" : { + "get" : { + "tags" : [ "Legacy Operational Policy" ], + "summary" : "Retrieve the latest version of a particular operational policy", + "description" : "Returns the latest version of the specified operational policy", + "operationId" : "getLatestVersionOfOperationalPolicy", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "policyId", + "in" : "path", + "description" : "ID of policy", + "required" : true, + "type" : "string" + }, { + "name" : "X-ONAP-RequestID", + "in" : "header", + "description" : "RequestID for http transaction", + "required" : false, + "type" : "string", + "format" : "uuid" + } ], + "responses" : { + "200" : { + "description" : "successful operation; Latest version of specified operational policy will be returned.", + "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/LegacyOperationalPolicy" + } + }, + "401" : { + "description" : "Authentication Error" + }, + "403" : { + "description" : "Authorization Error" + }, + "404" : { + "description" : "Resource Not Found" + }, + "500" : { + "description" : "Internal Server Error" + } + }, + "security" : [ { + "basicAuth" : [ ] + } ], + "x-interface info" : { + "api-version" : "1.0.0", + "last-mod-release" : "Dublin" + } + } + }, + "/policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies/{policyId}/versions/{policyVersion}" : { + "get" : { + "tags" : [ "Legacy Operational Policy" ], + "summary" : "Retrieve one version of a particular operational policy", + "description" : "Returns a particular version of a specified operational policy", + "operationId" : "getSpecificVersionOfOperationalPolicy", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "policyId", + "in" : "path", + "description" : "ID of policy", + "required" : true, + "type" : "string" + }, { + "name" : "policyVersion", + "in" : "path", + "description" : "Version of policy", + "required" : true, + "type" : "string" + }, { + "name" : "X-ONAP-RequestID", + "in" : "header", + "description" : "RequestID for http transaction", + "required" : false, + "type" : "string", + "format" : "uuid" + } ], + "responses" : { + "200" : { + "description" : "successful operation; Specified version of specified operational policy will be returned.", + "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/LegacyOperationalPolicy" + } + }, + "401" : { + "description" : "Authentication Error" + }, + "403" : { + "description" : "Authorization Error" + }, + "404" : { + "description" : "Resource Not Found" + }, + "500" : { + "description" : "Internal Server Error" + } + }, + "security" : [ { + "basicAuth" : [ ] + } ], + "x-interface info" : { + "api-version" : "1.0.0", + "last-mod-release" : "Dublin" + } + }, + "delete" : { + "tags" : [ "Legacy Operational Policy" ], + "summary" : "Delete a particular version of a specified operational policy", + "description" : "Delete a particular version of an operational policy. It must follow one rule. Rule: the version that has been deployed in PDP group(s) cannot be deleted", + "operationId" : "deleteSpecificVersionOfOperationalPolicy", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "policyId", + "in" : "path", + "description" : "ID of policy", + "required" : true, + "type" : "string" + }, { + "name" : "policyVersion", + "in" : "path", + "description" : "Version of policy", + "required" : true, + "type" : "string" + }, { + "name" : "X-ONAP-RequestID", + "in" : "header", + "description" : "RequestID for http transaction", + "required" : false, + "type" : "string", + "format" : "uuid" + } ], + "responses" : { + "200" : { + "description" : "successful operation; Newly deleted operational policy will be returned.", + "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/LegacyOperationalPolicy" + } + }, + "401" : { + "description" : "Authentication Error" + }, + "403" : { + "description" : "Authorization Error" + }, + "404" : { + "description" : "Resource Not Found" + }, + "409" : { + "description" : "Delete Conflict, Rule Violation" + }, + "500" : { + "description" : "Internal Server Error" + } + }, + "security" : [ { + "basicAuth" : [ ] + } ], + "x-interface info" : { + "api-version" : "1.0.0", + "last-mod-release" : "Dublin" + } + } + }, + "/policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies" : { + "post" : { + "tags" : [ "Legacy Operational Policy" ], + "summary" : "Create a new operational policy", + "description" : "Create a new operational policy. Client should provide entity body of the new operational policy", + "operationId" : "createOperationalPolicy", + "consumes" : [ "application/json" ], + "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" : "Entity body of policy", + "required" : true, + "type" : "ToscaServiceTemplate", + "schema" : { + "$ref" : "#/definitions/LegacyOperationalPolicy" + } + } ], + "responses" : { + "200" : { + "description" : "successful operation; Newly created operational policy will be returned.", + "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/LegacyOperationalPolicy" + } + }, + "400" : { + "description" : "Invalid Body" + }, + "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" : { + "LegacyOperationalPolicy" : { + "type" : "object", + "properties" : { + "policy-id" : { + "type" : "string" + }, + "policy-version" : { + "type" : "string" + }, + "content" : { + "type" : "string" + } + } + } + } +} \ No newline at end of file diff --git a/docs/api/swagger/policy-api.json b/docs/api/swagger/policy-api.json new file mode 100644 index 00000000..0037fd5d --- /dev/null +++ b/docs/api/swagger/policy-api.json @@ -0,0 +1,824 @@ +{ + "swagger" : "2.0", + "basePath" : "/", + "tags" : [ { + "name" : "Policy" + } ], + "schemes" : [ "http", "https" ], + "paths" : { + "/policy/api/v1/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies" : { + "get" : { + "tags" : [ "Policy" ], + "summary" : "Retrieve all versions of a policy created for a particular policy type version", + "description" : "Returns a list of all versions of specified policy created for the specified policy type version", + "operationId" : "getAllPolicies", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "policyTypeId", + "in" : "path", + "description" : "ID of policy type", + "required" : true, + "type" : "string" + }, { + "name" : "policyTypeVersion", + "in" : "path", + "description" : "Version of policy type", + "required" : true, + "type" : "string" + }, { + "name" : "X-ONAP-RequestID", + "in" : "header", + "description" : "RequestID for http transaction", + "required" : false, + "type" : "string", + "format" : "uuid" + } ], + "responses" : { + "200" : { + "description" : "successful operation; All policies matching specified policy type will be returned.", + "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/ToscaServiceTemplate" + } + }, + "401" : { + "description" : "Authentication Error" + }, + "403" : { + "description" : "Authorization Error" + }, + "404" : { + "description" : "Resource Not Found" + }, + "500" : { + "description" : "Internal Server Error" + } + }, + "security" : [ { + "basicAuth" : [ ] + } ], + "x-interface info" : { + "api-version" : "1.0.0", + "last-mod-release" : "Dublin" + } + }, + "post" : { + "tags" : [ "Policy" ], + "summary" : "Create a new policy for a policy type version", + "description" : "Create a new policy for a policy type. Client should provide TOSCA body of the new policy", + "operationId" : "createPolicy", + "consumes" : [ "application/json" ], + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "policyTypeId", + "in" : "path", + "description" : "ID of policy type", + "required" : true, + "type" : "string" + }, { + "name" : "policyTypeVersion", + "in" : "path", + "description" : "Version of policy type", + "required" : true, + "type" : "string" + }, { + "name" : "X-ONAP-RequestID", + "in" : "header", + "description" : "RequestID for http transaction", + "required" : false, + "type" : "string", + "format" : "uuid" + }, { + "in" : "body", + "name" : "body", + "description" : "Entity body of policy", + "required" : true, + "type" : "ToscaServiceTemplate", + "schema" : { + "$ref" : "#/definitions/ToscaServiceTemplate" + } + } ], + "responses" : { + "200" : { + "description" : "successful operation; Newly created policy matching specified policy type will be returned.", + "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/ToscaServiceTemplate" + } + }, + "400" : { + "description" : "Invalid Body" + }, + "401" : { + "description" : "Authentication Error" + }, + "403" : { + "description" : "Authorization Error" + }, + "404" : { + "description" : "Resource Not Found" + }, + "500" : { + "description" : "Internal Server Error" + } + }, + "security" : [ { + "basicAuth" : [ ] + } ], + "x-interface info" : { + "api-version" : "1.0.0", + "last-mod-release" : "Dublin" + } + } + }, + "/policy/api/v1/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}" : { + "get" : { + "tags" : [ "Policy" ], + "summary" : "Retrieve all version details of a policy created for a particular policy type version", + "description" : "Returns a list of all version details of the specified policy", + "operationId" : "getAllVersionsOfPolicy", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "policyTypeId", + "in" : "path", + "description" : "ID of policy type", + "required" : true, + "type" : "string" + }, { + "name" : "policyTypeVersion", + "in" : "path", + "description" : "Version of policy type", + "required" : true, + "type" : "string" + }, { + "name" : "policyId", + "in" : "path", + "description" : "ID of policy", + "required" : true, + "type" : "string" + }, { + "name" : "X-ONAP-RequestID", + "in" : "header", + "description" : "RequestID for http transaction", + "required" : false, + "type" : "string", + "format" : "uuid" + } ], + "responses" : { + "200" : { + "description" : "successful operation; All versions of specified policy matching specified policy type will be returned.", + "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/ToscaServiceTemplate" + } + }, + "401" : { + "description" : "Authentication Error" + }, + "403" : { + "description" : "Authorization Error" + }, + "404" : { + "description" : "Resource Not Found" + }, + "500" : { + "description" : "Internal Server Error" + } + }, + "security" : [ { + "basicAuth" : [ ] + } ], + "x-interface info" : { + "api-version" : "1.0.0", + "last-mod-release" : "Dublin" + } + } + }, + "/policy/api/v1/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}/versions/{policyVersion}" : { + "get" : { + "tags" : [ "Policy" ], + "summary" : "Retrieve one version of a policy created for a particular policy type version", + "description" : "Returns a particular version of specified policy created for the specified policy type version", + "operationId" : "getSpecificVersionOfPolicy", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "policyTypeId", + "in" : "path", + "description" : "ID of policy type", + "required" : true, + "type" : "string" + }, { + "name" : "policyTypeVersion", + "in" : "path", + "description" : "Version of policy type", + "required" : true, + "type" : "string" + }, { + "name" : "policyId", + "in" : "path", + "description" : "ID of policy", + "required" : true, + "type" : "string" + }, { + "name" : "policyVersion", + "in" : "path", + "description" : "Version of policy", + "required" : true, + "type" : "string" + }, { + "name" : "X-ONAP-RequestID", + "in" : "header", + "description" : "RequestID for http transaction", + "required" : false, + "type" : "string", + "format" : "uuid" + } ], + "responses" : { + "200" : { + "description" : "successful operation; The specified policy matching specified policy type will be returned.", + "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/ToscaServiceTemplate" + } + }, + "401" : { + "description" : "Authentication Error" + }, + "403" : { + "description" : "Authorization Error" + }, + "404" : { + "description" : "Resource Not Found" + }, + "500" : { + "description" : "Internal Server Error" + } + }, + "security" : [ { + "basicAuth" : [ ] + } ], + "x-interface info" : { + "api-version" : "1.0.0", + "last-mod-release" : "Dublin" + } + }, + "delete" : { + "tags" : [ "Policy" ], + "summary" : "Delete a particular version of a policy", + "description" : "Delete a particular version of a policy. It must follow one rule. Rule: the version that has been deployed in PDP group(s) cannot be deleted", + "operationId" : "deleteSpecificVersionOfPolicy", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "policyTypeId", + "in" : "path", + "description" : "PolicyType ID", + "required" : true, + "type" : "string" + }, { + "name" : "policyTypeVersion", + "in" : "path", + "description" : "Version of policy type", + "required" : true, + "type" : "string" + }, { + "name" : "policyId", + "in" : "path", + "description" : "ID of policy", + "required" : true, + "type" : "string" + }, { + "name" : "policyVersion", + "in" : "path", + "description" : "Version of policy", + "required" : true, + "type" : "string" + }, { + "name" : "X-ONAP-RequestID", + "in" : "header", + "description" : "RequestID for http transaction", + "required" : false, + "type" : "string", + "format" : "uuid" + } ], + "responses" : { + "200" : { + "description" : "successful operation; Newly deleted policy matching specified policy type will be returned.", + "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/ToscaServiceTemplate" + } + }, + "401" : { + "description" : "Authentication Error" + }, + "403" : { + "description" : "Authorization Error" + }, + "404" : { + "description" : "Resource Not Found" + }, + "409" : { + "description" : "Delete Conflict, Rule Violation" + }, + "500" : { + "description" : "Internal Server Error" + } + }, + "security" : [ { + "basicAuth" : [ ] + } ], + "x-interface info" : { + "api-version" : "1.0.0", + "last-mod-release" : "Dublin" + } + } + }, + "/policy/api/v1/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}/versions/latest" : { + "get" : { + "tags" : [ "Policy" ], + "summary" : "Retrieve the latest version of a particular policy", + "description" : "Returns the latest version of specified policy", + "operationId" : "getLatestVersionOfPolicy", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "policyTypeId", + "in" : "path", + "description" : "ID of policy type", + "required" : true, + "type" : "string" + }, { + "name" : "policyTypeVersion", + "in" : "path", + "description" : "Version of policy type", + "required" : true, + "type" : "string" + }, { + "name" : "policyId", + "in" : "path", + "description" : "ID of policy", + "required" : true, + "type" : "string" + }, { + "name" : "X-ONAP-RequestID", + "in" : "header", + "description" : "RequestID for http transaction", + "required" : false, + "type" : "string", + "format" : "uuid" + } ], + "responses" : { + "200" : { + "description" : "successful operation; Latest version of specified policy matching specified policy type will be returned.", + "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/ToscaServiceTemplate" + } + }, + "401" : { + "description" : "Authentication Error" + }, + "403" : { + "description" : "Authorization Error" + }, + "404" : { + "description" : "Resource Not Found" + }, + "500" : { + "description" : "Internal Server Error" + } + }, + "security" : [ { + "basicAuth" : [ ] + } ], + "x-interface info" : { + "api-version" : "1.0.0", + "last-mod-release" : "Dublin" + } + } + }, + "/policy/api/v1/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}/versions/deployed" : { + "get" : { + "tags" : [ "Policy" ], + "summary" : "Retrieve deployed versions of a particular policy in pdp groups", + "description" : "Returns deployed versions of specified policy in pdp groups", + "operationId" : "getDeployedVersionsOfPolicy", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "policyTypeId", + "in" : "path", + "description" : "ID of policy type", + "required" : true, + "type" : "string" + }, { + "name" : "policyTypeVersion", + "in" : "path", + "description" : "Version of policy type", + "required" : true, + "type" : "string" + }, { + "name" : "policyId", + "in" : "path", + "description" : "ID of policy", + "required" : true, + "type" : "string" + }, { + "name" : "X-ONAP-RequestID", + "in" : "header", + "description" : "RequestID for http transaction", + "required" : false, + "type" : "string", + "format" : "uuid" + } ], + "responses" : { + "200" : { + "description" : "successful operation; Deployed versions of specified policy matching specified policy type will be returned.", + "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" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/ToscaPolicy" + } + } + }, + "401" : { + "description" : "Authentication Error" + }, + "403" : { + "description" : "Authorization Error" + }, + "404" : { + "description" : "Resource Not Found" + }, + "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" : { + "ToscaConstraint" : { + "type" : "object", + "properties" : { + "valid_values" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "equal" : { + "type" : "string" + }, + "greater_than" : { + "type" : "string" + }, + "greater_or_equal" : { + "type" : "string" + }, + "less_than" : { + "type" : "string" + }, + "less_or_equal" : { + "type" : "string" + } + } + }, + "ToscaDataType" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "version" : { + "type" : "string" + }, + "derived_from" : { + "type" : "string" + }, + "metadata" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + }, + "description" : { + "type" : "string" + }, + "constraints" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/ToscaConstraint" + } + }, + "properties" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/definitions/ToscaProperty" + } + } + } + }, + "ToscaEntrySchema" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "type" : { + "type" : "string" + }, + "typeVersion" : { + "type" : "string" + }, + "description" : { + "type" : "string" + }, + "constraints" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/ToscaConstraint" + } + } + } + }, + "ToscaPolicyType" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "version" : { + "type" : "string" + }, + "derived_from" : { + "type" : "string" + }, + "metadata" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + }, + "description" : { + "type" : "string" + }, + "properties" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/definitions/ToscaProperty" + } + } + } + }, + "ToscaPolicyTypeIdentifier" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "version" : { + "type" : "string" + } + } + }, + "ToscaProperty" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "type" : { + "type" : "string" + }, + "typeVersion" : { + "type" : "string" + }, + "description" : { + "type" : "string" + }, + "default" : { + "type" : "string" + }, + "required" : { + "type" : "boolean" + }, + "status" : { + "type" : "string", + "enum" : [ "SUPPORTED", "UNSUPPORTED", "EXPERIMENTAL", "DEPRECATED" ] + }, + "constraints" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/ToscaConstraint" + } + }, + "entry_schema" : { + "$ref" : "#/definitions/ToscaEntrySchema" + } + } + }, + "ToscaServiceTemplate" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "version" : { + "type" : "string" + }, + "derived_from" : { + "type" : "string" + }, + "metadata" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + }, + "description" : { + "type" : "string" + }, + "tosca_definitions_version" : { + "type" : "string" + }, + "topology_template" : { + "$ref" : "#/definitions/ToscaTopologyTemplate" + }, + "policy_types" : { + "type" : "array", + "items" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/definitions/ToscaPolicyType" + } + } + }, + "data_types" : { + "type" : "array", + "items" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/definitions/ToscaDataType" + } + } + } + } + }, + "ToscaTopologyTemplate" : { + "type" : "object", + "properties" : { + "description" : { + "type" : "string" + }, + "policies" : { + "type" : "array", + "items" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/definitions/ToscaPolicy" + } + } + } + } + } + } +} \ No newline at end of file diff --git a/docs/api/swagger/policytype-api.json b/docs/api/swagger/policytype-api.json new file mode 100644 index 00000000..22151645 --- /dev/null +++ b/docs/api/swagger/policytype-api.json @@ -0,0 +1,662 @@ +{ + "swagger" : "2.0", + "basePath" : "/", + "tags" : [ { + "name" : "PolicyType" + } ], + "schemes" : [ "http", "https" ], + "paths" : { + "/policy/api/v1/policytypes" : { + "get" : { + "tags" : [ "PolicyType" ], + "summary" : "Retrieve existing policy types", + "description" : "Returns a list of existing policy types stored in Policy Framework", + "operationId" : "getAllPolicyTypes", + "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; All policy types will be returned.", + "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/ToscaServiceTemplate" + } + }, + "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" + } + }, + "post" : { + "tags" : [ "PolicyType" ], + "summary" : "Create a new policy type", + "description" : "Create a new policy type. Client should provide TOSCA body of the new policy type", + "operationId" : "createPolicyType", + "consumes" : [ "application/json" ], + "produces" : [ "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Entity body of policy type", + "required" : true, + "type" : "ToscaServiceTemplate", + "schema" : { + "$ref" : "#/definitions/ToscaServiceTemplate" + } + }, { + "name" : "X-ONAP-RequestID", + "in" : "header", + "description" : "RequestID for http transaction", + "required" : false, + "type" : "string", + "format" : "uuid" + } ], + "responses" : { + "200" : { + "description" : "successful operation; The newly created policy type will be returned.", + "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/ToscaServiceTemplate" + } + }, + "400" : { + "description" : "Invalid Body" + }, + "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/api/v1/policytypes/{policyTypeId}" : { + "get" : { + "tags" : [ "PolicyType" ], + "summary" : "Retrieve all available versions of a policy type", + "description" : "Returns a list of all available versions for the specified policy type", + "operationId" : "getAllVersionsOfPolicyType", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "policyTypeId", + "in" : "path", + "description" : "ID of policy type", + "required" : true, + "type" : "string" + }, { + "name" : "X-ONAP-RequestID", + "in" : "header", + "description" : "RequestID for http transaction", + "required" : false, + "type" : "string", + "format" : "uuid" + } ], + "responses" : { + "200" : { + "description" : "successful operation; All versions of specified policy type will be returned.", + "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/ToscaServiceTemplate" + } + }, + "401" : { + "description" : "Authentication Error" + }, + "403" : { + "description" : "Authorization Error" + }, + "404" : { + "description" : "Resource Not Found" + }, + "500" : { + "description" : "Internal Server Error" + } + }, + "security" : [ { + "basicAuth" : [ ] + } ], + "x-interface info" : { + "api-version" : "1.0.0", + "last-mod-release" : "Dublin" + } + } + }, + "/policy/api/v1/policytypes/{policyTypeId}/versions/{versionId}" : { + "get" : { + "tags" : [ "PolicyType" ], + "summary" : "Retrieve one particular version of a policy type", + "description" : "Returns a particular version for the specified policy type", + "operationId" : "getSpecificVersionOfPolicyType", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "policyTypeId", + "in" : "path", + "description" : "ID of policy type", + "required" : true, + "type" : "string" + }, { + "name" : "versionId", + "in" : "path", + "description" : "Version of policy type", + "required" : true, + "type" : "string" + }, { + "name" : "X-ONAP-RequestID", + "in" : "header", + "description" : "RequestID for http transaction", + "required" : false, + "type" : "string", + "format" : "uuid" + } ], + "responses" : { + "200" : { + "description" : "successful operation; One specified version of specified policy type will be returned.", + "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/ToscaServiceTemplate" + } + }, + "401" : { + "description" : "Authentication Error" + }, + "403" : { + "description" : "Authorization Error" + }, + "404" : { + "description" : "Resource Not Found" + }, + "500" : { + "description" : "Internal Server Error" + } + }, + "security" : [ { + "basicAuth" : [ ] + } ], + "x-interface info" : { + "api-version" : "1.0.0", + "last-mod-release" : "Dublin" + } + }, + "delete" : { + "tags" : [ "PolicyType" ], + "summary" : "Delete one version of a policy type", + "description" : "Delete one version of a policy type. It must follow two rules. Rule 1: pre-defined policy types cannot be deleted; Rule 2: policy types that are in use (parameterized by a TOSCA policy) cannot be deleted. The parameterizing TOSCA policies must be deleted first.", + "operationId" : "deleteSpecificVersionOfPolicyType", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "policyTypeId", + "in" : "path", + "description" : "ID of policy type", + "required" : true, + "type" : "string" + }, { + "name" : "versionId", + "in" : "path", + "description" : "Version of policy type", + "required" : true, + "type" : "string" + }, { + "name" : "X-ONAP-RequestID", + "in" : "header", + "description" : "RequestID for http transaction", + "required" : false, + "type" : "string", + "format" : "uuid" + } ], + "responses" : { + "200" : { + "description" : "successful operation; Newly deleted policy type will be returned.", + "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/ToscaServiceTemplate" + } + }, + "401" : { + "description" : "Authentication Error" + }, + "403" : { + "description" : "Authorization Error" + }, + "404" : { + "description" : "Resource Not Found" + }, + "409" : { + "description" : "Delete Conflict, Rule Violation" + }, + "500" : { + "description" : "Internal Server Error" + } + }, + "security" : [ { + "basicAuth" : [ ] + } ], + "x-interface info" : { + "api-version" : "1.0.0", + "last-mod-release" : "Dublin" + } + } + }, + "/policy/api/v1/policytypes/{policyTypeId}/versions/latest" : { + "get" : { + "tags" : [ "PolicyType" ], + "summary" : "Retrieve latest version of a policy type", + "description" : "Returns latest version for the specified policy type", + "operationId" : "getLatestVersionOfPolicyType", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "policyTypeId", + "in" : "path", + "description" : "ID of policy type", + "required" : true, + "type" : "string" + }, { + "name" : "X-ONAP-RequestID", + "in" : "header", + "description" : "RequestID for http transaction", + "required" : false, + "type" : "string", + "format" : "uuid" + } ], + "responses" : { + "200" : { + "description" : "successful operation; Latest version of specified policy type will be returned.", + "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/ToscaServiceTemplate" + } + }, + "401" : { + "description" : "Authentication Error" + }, + "403" : { + "description" : "Authorization Error" + }, + "404" : { + "description" : "Resource Not Found" + }, + "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" : { + "ToscaConstraint" : { + "type" : "object", + "properties" : { + "valid_values" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "equal" : { + "type" : "string" + }, + "greater_than" : { + "type" : "string" + }, + "greater_or_equal" : { + "type" : "string" + }, + "less_than" : { + "type" : "string" + }, + "less_or_equal" : { + "type" : "string" + } + } + }, + "ToscaDataType" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "version" : { + "type" : "string" + }, + "derived_from" : { + "type" : "string" + }, + "metadata" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + }, + "description" : { + "type" : "string" + }, + "constraints" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/ToscaConstraint" + } + }, + "properties" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/definitions/ToscaProperty" + } + } + } + }, + "ToscaEntrySchema" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "type" : { + "type" : "string" + }, + "typeVersion" : { + "type" : "string" + }, + "description" : { + "type" : "string" + }, + "constraints" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/ToscaConstraint" + } + } + } + }, + "ToscaPolicyType" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "version" : { + "type" : "string" + }, + "derived_from" : { + "type" : "string" + }, + "metadata" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + }, + "description" : { + "type" : "string" + }, + "properties" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/definitions/ToscaProperty" + } + } + } + }, + "ToscaPolicyTypeIdentifier" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "version" : { + "type" : "string" + } + } + }, + "ToscaProperty" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "type" : { + "type" : "string" + }, + "typeVersion" : { + "type" : "string" + }, + "description" : { + "type" : "string" + }, + "default" : { + "type" : "string" + }, + "required" : { + "type" : "boolean" + }, + "status" : { + "type" : "string", + "enum" : [ "SUPPORTED", "UNSUPPORTED", "EXPERIMENTAL", "DEPRECATED" ] + }, + "constraints" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/ToscaConstraint" + } + }, + "entry_schema" : { + "$ref" : "#/definitions/ToscaEntrySchema" + } + } + }, + "ToscaServiceTemplate" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "version" : { + "type" : "string" + }, + "derived_from" : { + "type" : "string" + }, + "metadata" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + }, + "description" : { + "type" : "string" + }, + "tosca_definitions_version" : { + "type" : "string" + }, + "topology_template" : { + "$ref" : "#/definitions/ToscaTopologyTemplate" + }, + "policy_types" : { + "type" : "array", + "items" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/definitions/ToscaPolicyType" + } + } + }, + "data_types" : { + "type" : "array", + "items" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/definitions/ToscaDataType" + } + } + } + } + }, + "ToscaTopologyTemplate" : { + "type" : "object", + "properties" : { + "description" : { + "type" : "string" + }, + "policies" : { + "type" : "array", + "items" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/definitions/ToscaPolicy" + } + } + } + } + } + } +} diff --git a/docs/api/swagger/statistics-api.json b/docs/api/swagger/statistics-api.json new file mode 100644 index 00000000..a55f03c8 --- /dev/null +++ b/docs/api/swagger/statistics-api.json @@ -0,0 +1,147 @@ +{ + "swagger" : "2.0", + "basePath" : "/", + "tags" : [{ + "name" : "Statistics" + }], + "schemes" : [ "http", "https" ], + "paths" : { + "/policy/api/v1/statistics" : { + "get" : { + "tags" : [ "Statistics" ], + "summary" : "Retrieve current statistics", + "description" : "Returns current statistics including the counters of API invocation", + "operationId" : "getStatistics", + "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; All statistics counters of API invocation will be returned.", + "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/StatisticsReport" + } + }, + "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" : { + "StatisticsReport" : { + "type" : "object", + "properties" : { + "code" : { + "type" : "integer", + "format" : "int32" + }, + "totalApiCallCount" : { + "type" : "integer", + "format" : "int64" + }, + "apiCallSuccessCount" : { + "type" : "integer", + "format" : "int64" + }, + "apiCallFailureCount" : { + "type" : "integer", + "format" : "int64" + }, + "totalPolicyGetCount" : { + "type" : "integer", + "format" : "int64" + }, + "totalPolicyPostCount" : { + "type" : "integer", + "format" : "int64" + }, + "totalPolicyTypeGetCount" : { + "type" : "integer", + "format" : "int64" + }, + "totalPolicyTypePostCount" : { + "type" : "integer", + "format" : "int64" + }, + "policyGetSuccessCount" : { + "type" : "integer", + "format" : "int64" + }, + "policyGetFailureCount" : { + "type" : "integer", + "format" : "int64" + }, + "policyPostSuccessCount" : { + "type" : "integer", + "format" : "int64" + }, + "policyPostFailureCount" : { + "type" : "integer", + "format" : "int64" + }, + "policyTypeGetSuccessCount" : { + "type" : "integer", + "format" : "int64" + }, + "policyTypeGetFailureCount" : { + "type" : "integer", + "format" : "int64" + }, + "policyTypePostSuccessCount" : { + "type" : "integer", + "format" : "int64" + }, + "policyTypePostFailureCount" : { + "type" : "integer", + "format" : "int64" + } + } + } + } +} -- cgit 1.2.3-korg