summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/admin-guide.rst20
-rw-r--r--docs/api/swagger/cps/openapi.yaml1350
-rw-r--r--docs/api/swagger/ncmp/openapi-inventory.yaml15
-rw-r--r--docs/api/swagger/ncmp/openapi.yaml130
-rw-r--r--docs/cps-path.rst150
-rw-r--r--docs/deployment.rst20
-rwxr-xr-xdocs/index.rst13
-rw-r--r--docs/overview.rst24
-rwxr-xr-xdocs/release-notes.rst51
-rw-r--r--docs/requirements-docs.txt4
10 files changed, 1323 insertions, 454 deletions
diff --git a/docs/admin-guide.rst b/docs/admin-guide.rst
index 203151bf8f..1bc7f4ff38 100644
--- a/docs/admin-guide.rst
+++ b/docs/admin-guide.rst
@@ -1,6 +1,6 @@
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0
-.. Copyright (C) 2021 Nordix Foundation
+.. Copyright (C) 2021-2022 Nordix Foundation
.. DO NOT CHANGE THIS LABEL FOR RELEASE NOTES - EVEN THOUGH IT GIVES A WARNING
.. _adminGuide:
@@ -49,8 +49,6 @@ CPS Log pattern
Change logging level
--------------------
-.. container:: ulist
-
- Curl command 1. Check current log level of "logging.level.org.onap.cps" if it is set to it's default value (INFO)
.. code-block:: java
@@ -193,3 +191,19 @@ Prometheus Metrics can be checked at the following endpoint
.. code::
http://<cps-component-service-name>:8081/manage/prometheus
+
+Naming Validation
+-----------------
+
+As part of the Jakarta 3.1.0 release, CPS has added validation to the names of the following components:
+
+ - Dataspace names
+ - Schema Set names
+ - Anchor names
+ - Cm-Handle identifiers
+
+The following characters along with spaces are no longer valid for naming of these components.
+
+.. code::
+
+ !"#$%&'()*+,./\:;<=>?@[]^`{|}~
diff --git a/docs/api/swagger/cps/openapi.yaml b/docs/api/swagger/cps/openapi.yaml
index 2fc8d7f338..983252f5af 100644
--- a/docs/api/swagger/cps/openapi.yaml
+++ b/docs/api/swagger/cps/openapi.yaml
@@ -15,27 +15,28 @@ info:
x-logo:
url: cps_logo.png
servers:
- - url: /cps/api
+- url: /cps/api
tags:
- - name: cps-admin
- description: cps Admin
- - name: cps-data
- description: cps Data
+- name: cps-admin
+ description: cps Admin
+- name: cps-data
+ description: cps Data
paths:
/v1/dataspaces:
post:
tags:
- - cps-admin
+ - cps-admin
summary: Create a dataspace
description: Create a new dataspace
operationId: createDataspace
parameters:
- - name: dataspace-name
- in: query
- description: dataspace-name
- required: true
- schema:
- type: string
+ - name: dataspace-name
+ in: query
+ description: dataspace-name
+ required: true
+ schema:
+ type: string
+ example: my-dataspace
responses:
"201":
description: Created
@@ -43,38 +44,130 @@ paths:
text/plain:
schema:
type: string
+ example: my-resource
+ "401":
+ description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 401
+ message: Unauthorized request
+ details: This request is unauthorized
+ "403":
+ description: Forbidden
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 403
+ message: Request Forbidden
+ details: This request is forbidden
+ "409":
+ description: Conflict
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 409
+ message: Conflicting request
+ details: The request cannot be processed as the resource is in use.
+ "500":
+ description: Internal Server Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 500
+ message: Internal Server Error
+ details: Internal Server Error occurred
+ delete:
+ tags:
+ - cps-admin
+ summary: Delete a dataspace
+ description: Delete a dataspace
+ operationId: deleteDataspace
+ parameters:
+ - name: dataspace-name
+ in: query
+ description: dataspace-name
+ required: true
+ schema:
+ type: string
+ example: my-dataspace
+ responses:
+ "204":
+ description: No Content
+ content: {}
"400":
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 400
+ message: Bad Request
+ details: The provided request is not valid
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 401
+ message: Unauthorized request
+ details: This request is unauthorized
"403":
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 403
+ message: Request Forbidden
+ details: This request is forbidden
+ "409":
+ description: Conflict
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 409
+ message: Conflicting request
+ details: The request cannot be processed as the resource is in use.
+ "500":
+ description: Internal Server Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 500
+ message: Internal Server Error
+ details: Internal Server Error occurred
/v1/dataspaces/{dataspace-name}/anchors:
get:
tags:
- - cps-admin
+ - cps-admin
summary: Get anchors
description: "Read all anchors, given a dataspace"
operationId: getAnchors
parameters:
- - name: dataspace-name
- in: path
- description: dataspace-name
- required: true
- schema:
- type: string
+ - name: dataspace-name
+ in: path
+ description: dataspace-name
+ required: true
+ schema:
+ type: string
+ example: my-dataspace
responses:
"200":
description: OK
@@ -90,49 +183,68 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 400
+ message: Bad Request
+ details: The provided request is not valid
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 401
+ message: Unauthorized request
+ details: This request is unauthorized
"403":
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
- "404":
- description: The specified resource was not found
+ example:
+ status: 403
+ message: Request Forbidden
+ details: This request is forbidden
+ "500":
+ description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 500
+ message: Internal Server Error
+ details: Internal Server Error occurred
post:
tags:
- - cps-admin
+ - cps-admin
summary: Create an anchor
description: Create a new anchor in the given dataspace
operationId: createAnchor
parameters:
- - name: dataspace-name
- in: path
- description: dataspace-name
- required: true
- schema:
- type: string
- - name: schema-set-name
- in: query
- description: schema-set-name
- required: true
- schema:
- type: string
- - name: anchor-name
- in: query
- description: anchor-name
- required: true
- schema:
- type: string
+ - name: dataspace-name
+ in: path
+ description: dataspace-name
+ required: true
+ schema:
+ type: string
+ example: my-dataspace
+ - name: schema-set-name
+ in: query
+ description: schema-set-name
+ required: true
+ schema:
+ type: string
+ example: my-schema-set
+ - name: anchor-name
+ in: query
+ description: anchor-name
+ required: true
+ schema:
+ type: string
+ example: my-anchor
responses:
"201":
description: Created
@@ -140,44 +252,79 @@ paths:
text/plain:
schema:
type: string
+ example: my-resource
"400":
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 400
+ message: Bad Request
+ details: The provided request is not valid
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 401
+ message: Unauthorized request
+ details: This request is unauthorized
"403":
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 403
+ message: Request Forbidden
+ details: This request is forbidden
+ "409":
+ description: Conflict
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 409
+ message: Conflicting request
+ details: The request cannot be processed as the resource is in use.
+ "500":
+ description: Internal Server Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 500
+ message: Internal Server Error
+ details: Internal Server Error occurred
/v1/dataspaces/{dataspace-name}/anchors/{anchor-name}:
get:
tags:
- - cps-admin
+ - cps-admin
summary: Get an anchor
description: Read an anchor given an anchor name and a dataspace
operationId: getAnchor
parameters:
- - name: dataspace-name
- in: path
- description: dataspace-name
- required: true
- schema:
- type: string
- - name: anchor-name
- in: path
- description: anchor-name
- required: true
- schema:
- type: string
+ - name: dataspace-name
+ in: path
+ description: dataspace-name
+ required: true
+ schema:
+ type: string
+ example: my-dataspace
+ - name: anchor-name
+ in: path
+ description: anchor-name
+ required: true
+ schema:
+ type: string
+ example: my-anchor
responses:
"200":
description: OK
@@ -191,43 +338,61 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 400
+ message: Bad Request
+ details: The provided request is not valid
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 401
+ message: Unauthorized request
+ details: This request is unauthorized
"403":
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
- "404":
- description: The specified resource was not found
+ example:
+ status: 403
+ message: Request Forbidden
+ details: This request is forbidden
+ "500":
+ description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 500
+ message: Internal Server Error
+ details: Internal Server Error occurred
delete:
tags:
- - cps-admin
+ - cps-admin
summary: Delete an anchor
description: Delete an anchor given an anchor name and a dataspace
operationId: deleteAnchor
parameters:
- - name: dataspace-name
- in: path
- description: dataspace-name
- required: true
- schema:
- type: string
- - name: anchor-name
- in: path
- description: anchor-name
- required: true
- schema:
- type: string
+ - name: dataspace-name
+ in: path
+ description: dataspace-name
+ required: true
+ schema:
+ type: string
+ example: my-dataspace
+ - name: anchor-name
+ in: path
+ description: anchor-name
+ required: true
+ schema:
+ type: string
+ example: my-anchor
responses:
"204":
description: No Content
@@ -238,38 +403,62 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 400
+ message: Bad Request
+ details: The provided request is not valid
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 401
+ message: Unauthorized request
+ details: This request is unauthorized
"403":
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 403
+ message: Request Forbidden
+ details: This request is forbidden
+ "500":
+ description: Internal Server Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 500
+ message: Internal Server Error
+ details: Internal Server Error occurred
/v1/dataspaces/{dataspace-name}/schema-sets:
post:
tags:
- - cps-admin
+ - cps-admin
summary: Create a schema set
description: Create a new schema set in the given dataspace
operationId: createSchemaSet
parameters:
- - name: dataspace-name
- in: path
- description: dataspace-name
- required: true
- schema:
- type: string
- - name: schema-set-name
- in: query
- description: schema-set-name
- required: true
- schema:
- type: string
+ - name: dataspace-name
+ in: path
+ description: dataspace-name
+ required: true
+ schema:
+ type: string
+ example: my-dataspace
+ - name: schema-set-name
+ in: query
+ description: schema-set-name
+ required: true
+ schema:
+ type: string
+ example: my-schema-set
requestBody:
content:
multipart/form-data:
@@ -283,44 +472,79 @@ paths:
text/plain:
schema:
type: string
+ example: my-resource
"400":
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 400
+ message: Bad Request
+ details: The provided request is not valid
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 401
+ message: Unauthorized request
+ details: This request is unauthorized
"403":
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 403
+ message: Request Forbidden
+ details: This request is forbidden
+ "409":
+ description: Conflict
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 409
+ message: Conflicting request
+ details: The request cannot be processed as the resource is in use.
+ "500":
+ description: Internal Server Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 500
+ message: Internal Server Error
+ details: Internal Server Error occurred
/v1/dataspaces/{dataspace-name}/schema-sets/{schema-set-name}:
get:
tags:
- - cps-admin
+ - cps-admin
summary: Get a schema set
description: Read a schema set given a schema set name and a dataspace
operationId: getSchemaSet
parameters:
- - name: dataspace-name
- in: path
- description: dataspace-name
- required: true
- schema:
- type: string
- - name: schema-set-name
- in: path
- description: schema-set-name
- required: true
- schema:
- type: string
+ - name: dataspace-name
+ in: path
+ description: dataspace-name
+ required: true
+ schema:
+ type: string
+ example: my-dataspace
+ - name: schema-set-name
+ in: path
+ description: schema-set-name
+ required: true
+ schema:
+ type: string
+ example: my-schema-set
responses:
"200":
description: OK
@@ -334,43 +558,61 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 400
+ message: Bad Request
+ details: The provided request is not valid
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 401
+ message: Unauthorized request
+ details: This request is unauthorized
"403":
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
- "404":
- description: The specified resource was not found
+ example:
+ status: 403
+ message: Request Forbidden
+ details: This request is forbidden
+ "500":
+ description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 500
+ message: Internal Server Error
+ details: Internal Server Error occurred
delete:
tags:
- - cps-admin
+ - cps-admin
summary: Delete a schema set
description: Delete a schema set given a schema set name and a dataspace
operationId: deleteSchemaSet
parameters:
- - name: dataspace-name
- in: path
- description: dataspace-name
- required: true
- schema:
- type: string
- - name: schema-set-name
- in: path
- description: schema-set-name
- required: true
- schema:
- type: string
+ - name: dataspace-name
+ in: path
+ description: dataspace-name
+ required: true
+ schema:
+ type: string
+ example: my-dataspace
+ - name: schema-set-name
+ in: path
+ description: schema-set-name
+ required: true
+ schema:
+ type: string
+ example: my-schema-set
responses:
"204":
description: No Content
@@ -381,59 +623,93 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 400
+ message: Bad Request
+ details: The provided request is not valid
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 401
+ message: Unauthorized request
+ details: This request is unauthorized
"403":
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 403
+ message: Request Forbidden
+ details: This request is forbidden
"409":
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 409
+ message: Conflicting request
+ details: The request cannot be processed as the resource is in use.
+ "500":
+ description: Internal Server Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 500
+ message: Internal Server Error
+ details: Internal Server Error occurred
/v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/node:
get:
tags:
- - cps-data
+ - cps-data
summary: Get a node
description: Get a node with an option to retrieve all the children for a given
anchor and dataspace
operationId: getNodeByDataspaceAndAnchor
parameters:
- - name: dataspace-name
- in: path
- description: dataspace-name
- required: true
- schema:
- type: string
- - name: anchor-name
- in: path
- description: anchor-name
- required: true
- schema:
- type: string
- - name: xpath
- in: query
- description: xpath
- required: false
- schema:
- type: string
- default: /
- - name: include-descendants
- in: query
- description: include-descendants
- required: false
- schema:
- type: boolean
- default: false
+ - name: dataspace-name
+ in: path
+ description: dataspace-name
+ required: true
+ schema:
+ type: string
+ example: my-dataspace
+ - name: anchor-name
+ in: path
+ description: anchor-name
+ required: true
+ schema:
+ type: string
+ example: my-anchor
+ - name: xpath
+ in: query
+ description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
+ required: false
+ schema:
+ type: string
+ default: /
+ examples:
+ container xpath:
+ value: /shops/bookstore
+ list attributes xpath:
+ value: "/shops/bookstore/categories[@code=1]"
+ - name: include-descendants
+ in: query
+ description: include-descendants
+ required: false
+ schema:
+ type: boolean
+ example: false
+ default: false
responses:
"200":
description: OK
@@ -441,75 +717,100 @@ paths:
application/json:
schema:
type: object
- example:
- child: my_child
- leafList: "leafListElement1, leafListElement2"
- leaf: my_leaf
+ examples:
+ dataSample:
+ $ref: '#/components/examples/dataSample'
"400":
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 400
+ message: Bad Request
+ details: The provided request is not valid
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 401
+ message: Unauthorized request
+ details: This request is unauthorized
"403":
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
- "404":
- description: The specified resource was not found
+ example:
+ status: 403
+ message: Request Forbidden
+ details: This request is forbidden
+ "500":
+ description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 500
+ message: Internal Server Error
+ details: Internal Server Error occurred
x-codegen-request-body-name: xpath
/v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes:
put:
tags:
- - cps-data
+ - cps-data
summary: Replace a node with descendants
description: "Replace a node with descendants for a given dataspace, anchor\
\ and a parent node xpath"
operationId: replaceNode
parameters:
- - name: dataspace-name
- in: path
- description: dataspace-name
- required: true
- schema:
- type: string
- - name: anchor-name
- in: path
- description: anchor-name
- required: true
- schema:
- type: string
- - name: xpath
- in: query
- description: xpath
- required: false
- schema:
- type: string
- default: /
- - name: observed-timestamp
- in: query
- description: observed-timestamp
- required: false
- schema:
- type: string
- example: 2021-03-21T00:10:34.030-0100
+ - name: dataspace-name
+ in: path
+ description: dataspace-name
+ required: true
+ schema:
+ type: string
+ example: my-dataspace
+ - name: anchor-name
+ in: path
+ description: anchor-name
+ required: true
+ schema:
+ type: string
+ example: my-anchor
+ - name: xpath
+ in: query
+ description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
+ required: false
+ schema:
+ type: string
+ default: /
+ examples:
+ container xpath:
+ value: /shops/bookstore
+ list attributes xpath:
+ value: "/shops/bookstore/categories[@code=1]"
+ - name: observed-timestamp
+ in: query
+ description: observed-timestamp
+ required: false
+ schema:
+ type: string
+ example: 2021-03-21T00:10:34.030-0100
requestBody:
content:
application/json:
schema:
- type: string
+ type: object
+ examples:
+ dataSample:
+ $ref: '#/components/examples/dataSample'
required: true
responses:
"200":
@@ -518,64 +819,97 @@ paths:
application/json:
schema:
type: object
- example:
- key: value
+ examples:
+ dataSample:
+ value: ""
"400":
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 400
+ message: Bad Request
+ details: The provided request is not valid
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 401
+ message: Unauthorized request
+ details: This request is unauthorized
"403":
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 403
+ message: Request Forbidden
+ details: This request is forbidden
+ "500":
+ description: Internal Server Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 500
+ message: Internal Server Error
+ details: Internal Server Error occurred
post:
tags:
- - cps-data
+ - cps-data
summary: Create a node
description: Create a node for a given anchor and dataspace
operationId: createNode
parameters:
- - name: dataspace-name
- in: path
- description: dataspace-name
- required: true
- schema:
- type: string
- - name: anchor-name
- in: path
- description: anchor-name
- required: true
- schema:
- type: string
- - name: xpath
- in: query
- description: xpath
- required: false
- schema:
- type: string
- default: /
- - name: observed-timestamp
- in: query
- description: observed-timestamp
- required: false
- schema:
- type: string
- example: 2021-03-21T00:10:34.030-0100
+ - name: dataspace-name
+ in: path
+ description: dataspace-name
+ required: true
+ schema:
+ type: string
+ example: my-dataspace
+ - name: anchor-name
+ in: path
+ description: anchor-name
+ required: true
+ schema:
+ type: string
+ example: my-anchor
+ - name: xpath
+ in: query
+ description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
+ required: false
+ schema:
+ type: string
+ default: /
+ examples:
+ container xpath:
+ value: /shops/bookstore
+ list attributes xpath:
+ value: "/shops/bookstore/categories[@code=1]"
+ - name: observed-timestamp
+ in: query
+ description: observed-timestamp
+ required: false
+ schema:
+ type: string
+ example: 2021-03-21T00:10:34.030-0100
requestBody:
content:
application/json:
schema:
- type: string
+ type: object
+ examples:
+ dataSample:
+ $ref: '#/components/examples/dataSample'
required: true
responses:
"201":
@@ -584,63 +918,191 @@ paths:
text/plain:
schema:
type: string
+ example: my-resource
+ "400":
+ description: Bad Request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 400
+ message: Bad Request
+ details: The provided request is not valid
+ "401":
+ description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 401
+ message: Unauthorized request
+ details: This request is unauthorized
+ "403":
+ description: Forbidden
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 403
+ message: Request Forbidden
+ details: This request is forbidden
+ "409":
+ description: Conflict
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 409
+ message: Conflicting request
+ details: The request cannot be processed as the resource is in use.
+ "500":
+ description: Internal Server Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 500
+ message: Internal Server Error
+ details: Internal Server Error occurred
+ delete:
+ tags:
+ - cps-data
+ summary: Delete a data node
+ description: Delete a datanode for a given dataspace and anchor given a node
+ xpath.
+ operationId: deleteDataNode
+ parameters:
+ - name: dataspace-name
+ in: path
+ description: dataspace-name
+ required: true
+ schema:
+ type: string
+ example: my-dataspace
+ - name: anchor-name
+ in: path
+ description: anchor-name
+ required: true
+ schema:
+ type: string
+ example: my-anchor
+ - name: xpath
+ in: query
+ description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
+ required: false
+ schema:
+ type: string
+ default: /
+ examples:
+ container xpath:
+ value: /shops/bookstore
+ list attributes xpath:
+ value: "/shops/bookstore/categories[@code=1]"
+ - name: observed-timestamp
+ in: query
+ description: observed-timestamp
+ required: false
+ schema:
+ type: string
+ example: 2021-03-21T00:10:34.030-0100
+ responses:
+ "204":
+ description: No Content
+ content: {}
"400":
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 400
+ message: Bad Request
+ details: The provided request is not valid
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 401
+ message: Unauthorized request
+ details: This request is unauthorized
"403":
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 403
+ message: Request Forbidden
+ details: This request is forbidden
+ "500":
+ description: Internal Server Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 500
+ message: Internal Server Error
+ details: Internal Server Error occurred
patch:
tags:
- - cps-data
+ - cps-data
summary: Update node leaves
description: Update a data node leaves for a given dataspace and anchor and
a parent node xpath
operationId: updateNodeLeaves
parameters:
- - name: dataspace-name
- in: path
- description: dataspace-name
- required: true
- schema:
- type: string
- - name: anchor-name
- in: path
- description: anchor-name
- required: true
- schema:
- type: string
- - name: xpath
- in: query
- description: xpath
- required: false
- schema:
- type: string
- default: /
- - name: observed-timestamp
- in: query
- description: observed-timestamp
- required: false
- schema:
- type: string
- example: 2021-03-21T00:10:34.030-0100
+ - name: dataspace-name
+ in: path
+ description: dataspace-name
+ required: true
+ schema:
+ type: string
+ example: my-dataspace
+ - name: anchor-name
+ in: path
+ description: anchor-name
+ required: true
+ schema:
+ type: string
+ example: my-anchor
+ - name: xpath
+ in: query
+ description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
+ required: false
+ schema:
+ type: string
+ default: /
+ examples:
+ container xpath:
+ value: /shops/bookstore
+ list attributes xpath:
+ value: "/shops/bookstore/categories[@code=1]"
+ - name: observed-timestamp
+ in: query
+ description: observed-timestamp
+ required: false
+ schema:
+ type: string
+ example: 2021-03-21T00:10:34.030-0100
requestBody:
content:
application/json:
schema:
- type: string
+ type: object
+ examples:
+ dataSample:
+ $ref: '#/components/examples/dataSample'
required: true
responses:
"200":
@@ -649,129 +1111,195 @@ paths:
application/json:
schema:
type: object
- example:
- key: value
+ examples:
+ dataSample:
+ value: ""
"400":
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 400
+ message: Bad Request
+ details: The provided request is not valid
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 401
+ message: Unauthorized request
+ details: This request is unauthorized
"403":
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 403
+ message: Request Forbidden
+ details: This request is forbidden
+ "500":
+ description: Internal Server Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 500
+ message: Internal Server Error
+ details: Internal Server Error occurred
/v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/list-nodes:
put:
tags:
- - cps-data
- summary: Replace list-node child element(s) under existing parent node
- description: Replace list-node child elements under existing node for a given
- anchor and dataspace
- operationId: replaceListNodeElements
+ - cps-data
+ summary: Replace list content
+ description: "Replace list content under a given parent, anchor and dataspace"
+ operationId: replaceListContent
parameters:
- - name: dataspace-name
- in: path
- description: dataspace-name
- required: true
- schema:
- type: string
- - name: anchor-name
- in: path
- description: anchor-name
- required: true
- schema:
- type: string
- - name: xpath
- in: query
- description: xpath
- required: true
- schema:
- type: string
- - name: observed-timestamp
- in: query
- description: observed-timestamp
- required: false
- schema:
- type: string
- example: 2021-03-21T00:10:34.030-0100
+ - name: dataspace-name
+ in: path
+ description: dataspace-name
+ required: true
+ schema:
+ type: string
+ example: my-dataspace
+ - name: anchor-name
+ in: path
+ description: anchor-name
+ required: true
+ schema:
+ type: string
+ example: my-anchor
+ - name: xpath
+ in: query
+ description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
+ required: true
+ schema:
+ type: string
+ examples:
+ container xpath:
+ value: /shops/bookstore
+ list attributes xpath:
+ value: "/shops/bookstore/categories[@code=1]"
+ - name: observed-timestamp
+ in: query
+ description: observed-timestamp
+ required: false
+ schema:
+ type: string
+ example: 2021-03-21T00:10:34.030-0100
requestBody:
content:
application/json:
schema:
- type: string
+ type: object
+ examples:
+ dataSample:
+ $ref: '#/components/examples/dataSample'
required: true
responses:
"200":
- description: Created
+ description: OK
content:
- text/plain:
+ application/json:
schema:
- type: string
+ type: object
+ examples:
+ dataSample:
+ value: ""
"400":
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 400
+ message: Bad Request
+ details: The provided request is not valid
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 401
+ message: Unauthorized request
+ details: This request is unauthorized
"403":
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 403
+ message: Request Forbidden
+ details: This request is forbidden
+ "500":
+ description: Internal Server Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 500
+ message: Internal Server Error
+ details: Internal Server Error occurred
post:
tags:
- - cps-data
- summary: Add list-node child element(s) under existing parent node
- description: Add list-node child elements to existing node for a given anchor
- and dataspace
- operationId: addListNodeElements
+ - cps-data
+ summary: Add list element(s)
+ description: Add list element(s) to a list for a given anchor and dataspace
+ operationId: addListElements
parameters:
- - name: dataspace-name
- in: path
- description: dataspace-name
- required: true
- schema:
- type: string
- - name: anchor-name
- in: path
- description: anchor-name
- required: true
- schema:
- type: string
- - name: xpath
- in: query
- description: xpath
- required: true
- schema:
- type: string
- - name: observed-timestamp
- in: query
- description: observed-timestamp
- required: false
- schema:
- type: string
- example: 2021-03-21T00:10:34.030-0100
+ - name: dataspace-name
+ in: path
+ description: dataspace-name
+ required: true
+ schema:
+ type: string
+ example: my-dataspace
+ - name: anchor-name
+ in: path
+ description: anchor-name
+ required: true
+ schema:
+ type: string
+ example: my-anchor
+ - name: xpath
+ in: query
+ description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
+ required: true
+ schema:
+ type: string
+ examples:
+ container xpath:
+ value: /shops/bookstore
+ list attributes xpath:
+ value: "/shops/bookstore/categories[@code=1]"
+ - name: observed-timestamp
+ in: query
+ description: observed-timestamp
+ required: false
+ schema:
+ type: string
+ example: 2021-03-21T00:10:34.030-0100
requestBody:
content:
application/json:
schema:
- type: string
+ type: object
+ examples:
+ dataSample:
+ $ref: '#/components/examples/dataSample'
required: true
responses:
"201":
@@ -780,57 +1308,86 @@ paths:
text/plain:
schema:
type: string
+ example: my-resource
"400":
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 400
+ message: Bad Request
+ details: The provided request is not valid
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 401
+ message: Unauthorized request
+ details: This request is unauthorized
"403":
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 403
+ message: Request Forbidden
+ details: This request is forbidden
+ "500":
+ description: Internal Server Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 500
+ message: Internal Server Error
+ details: Internal Server Error occurred
delete:
tags:
- - cps-data
- summary: Delete list-node child element(s) under existing parent node
- description: Delete list-node child elements under existing node for a given
- anchor and dataspace
- operationId: deleteListNodeElements
+ - cps-data
+ summary: Delete one or all list element(s)
+ description: Delete one or all list element(s) for a given anchor and dataspace
+ operationId: deleteListOrListElement
parameters:
- - name: dataspace-name
- in: path
- description: dataspace-name
- required: true
- schema:
- type: string
- - name: anchor-name
- in: path
- description: anchor-name
- required: true
- schema:
- type: string
- - name: xpath
- in: query
- description: xpath
- required: true
- schema:
- type: string
- - name: observed-timestamp
- in: query
- description: observed-timestamp
- required: false
- schema:
- type: string
- example: 2021-03-21T00:10:34.030-0100
+ - name: dataspace-name
+ in: path
+ description: dataspace-name
+ required: true
+ schema:
+ type: string
+ example: my-dataspace
+ - name: anchor-name
+ in: path
+ description: anchor-name
+ required: true
+ schema:
+ type: string
+ example: my-anchor
+ - name: xpath
+ in: query
+ description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
+ required: true
+ schema:
+ type: string
+ examples:
+ container xpath:
+ value: /shops/bookstore
+ list attributes xpath:
+ value: "/shops/bookstore/categories[@code=1]"
+ - name: observed-timestamp
+ in: query
+ description: observed-timestamp
+ required: false
+ schema:
+ type: string
+ example: 2021-03-21T00:10:34.030-0100
responses:
"204":
description: No Content
@@ -841,52 +1398,83 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 400
+ message: Bad Request
+ details: The provided request is not valid
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 401
+ message: Unauthorized request
+ details: This request is unauthorized
"403":
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 403
+ message: Request Forbidden
+ details: This request is forbidden
+ "500":
+ description: Internal Server Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 500
+ message: Internal Server Error
+ details: Internal Server Error occurred
+ deprecated: true
/v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes/query:
get:
tags:
- - cps-query
+ - cps-query
summary: Query data nodes
description: Query data nodes for the given dataspace and anchor using CPS path
operationId: getNodesByDataspaceAndAnchorAndCpsPath
parameters:
- - name: dataspace-name
- in: path
- description: dataspace-name
- required: true
- schema:
- type: string
- - name: anchor-name
- in: path
- description: anchor-name
- required: true
- schema:
- type: string
- - name: cps-path
- in: query
- description: cps-path
- required: false
- schema:
- type: string
- default: /
- - name: include-descendants
- in: query
- description: include-descendants
- required: false
- schema:
- type: boolean
- default: false
+ - name: dataspace-name
+ in: path
+ description: dataspace-name
+ required: true
+ schema:
+ type: string
+ example: my-dataspace
+ - name: anchor-name
+ in: path
+ description: anchor-name
+ required: true
+ schema:
+ type: string
+ example: my-anchor
+ - name: cps-path
+ in: query
+ description: "For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
+ required: false
+ schema:
+ type: string
+ default: /
+ examples:
+ container cps path:
+ value: //bookstore
+ list attributes cps path:
+ value: "//categories[@code=1]"
+ - name: include-descendants
+ in: query
+ description: include-descendants
+ required: false
+ schema:
+ type: boolean
+ example: false
+ default: false
responses:
"200":
description: OK
@@ -894,32 +1482,49 @@ paths:
application/json:
schema:
type: object
- example:
- key: value
+ examples:
+ dataSample:
+ $ref: '#/components/examples/dataSample'
"400":
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 400
+ message: Bad Request
+ details: The provided request is not valid
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 401
+ message: Unauthorized request
+ details: This request is unauthorized
"403":
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
- "404":
- description: The specified resource was not found
+ example:
+ status: 403
+ message: Request Forbidden
+ details: This request is forbidden
+ "500":
+ description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 500
+ message: Internal Server Error
+ details: Internal Server Error occurred
x-codegen-request-body-name: xpath
components:
schemas:
@@ -929,29 +1534,26 @@ components:
properties:
status:
type: string
- example: "400"
message:
type: string
- example: Dataspace not found
details:
type: string
- example: Dataspace with name D1 does not exist.
AnchorDetails:
title: Anchor details by anchor Name
type: object
properties:
name:
type: string
- example: my_anchor
+ example: my-anchor
dataspaceName:
type: string
- example: my_dataspace
+ example: my-dataspace
schemaSetName:
type: string
- example: my_schema_set
+ example: my-schema-set
MultipartFile:
required:
- - file
+ - file
type: object
properties:
file:
@@ -960,28 +1562,40 @@ components:
format: binary
SchemaSetDetails:
title: Schema set details by dataspace and schemasetName
+ required:
+ - moduleReferences
type: object
properties:
dataspaceName:
type: string
- example: my_dataspace
+ example: my-dataspace
moduleReferences:
type: array
items:
$ref: '#/components/schemas/ModuleReferences'
name:
type: string
- example: my_schema_set
+ example: my-schema-set
ModuleReferences:
title: Module reference object
type: object
properties:
name:
type: string
- example: module_reference_name
+ example: my-module-reference-name
namespace:
type: string
- example: module_reference_namespace
+ example: my-module-reference-namespace
revision:
type: string
- example: module_reference_revision
+ example: my-module-reference-revision
+ examples:
+ dataSample:
+ value:
+ test:bookstore:
+ bookstore-name: Chapters
+ categories:
+ - code: 1
+ name: SciFi
+ - code: 2
+ name: kids
diff --git a/docs/api/swagger/ncmp/openapi-inventory.yaml b/docs/api/swagger/ncmp/openapi-inventory.yaml
index 154a4411da..30896f6068 100644
--- a/docs/api/swagger/ncmp/openapi-inventory.yaml
+++ b/docs/api/swagger/ncmp/openapi-inventory.yaml
@@ -86,23 +86,16 @@ components:
$ref: '#/components/schemas/RestInputCmHandle'
updatedCmHandles:
type: array
- example:
- cmHandle: my-cm-handle
- cmHandleProperties:
- add-my-property: add-property
- update-my-property: updated-property
- delete-my-property: ~
- publicCmHandleProperties:
- add-my-property: add-property
- update-my-property: updated-property
- delete-my-property: ~
items:
$ref: '#/components/schemas/RestInputCmHandle'
removedCmHandles:
type: array
+ example:
+ - my-cm-handle1
+ - my-cm-handle2
+ - my-cm-handle3
items:
type: string
- example: "[\"my-cm-handle1\",\"my-cm-handle2\",\"my-cm-handle3\"]"
RestInputCmHandle:
required:
- cmHandle
diff --git a/docs/api/swagger/ncmp/openapi.yaml b/docs/api/swagger/ncmp/openapi.yaml
index b7a65632e7..a43190bccd 100644
--- a/docs/api/swagger/ncmp/openapi.yaml
+++ b/docs/api/swagger/ncmp/openapi.yaml
@@ -41,16 +41,6 @@ paths:
sample 3:
value:
resourceIdentifier: "parent=shops,child=bookstore"
- - name: Accept
- in: header
- description: "Accept parameter for response, if accept parameter is null,\
- \ that means client can accept any format."
- required: false
- schema:
- type: string
- enum:
- - application/json
- - application/yang-data+json
- name: options
in: query
description: "options parameter in query, it is mandatory to wrap key(s)=value(s)\
@@ -70,6 +60,17 @@ paths:
sample 3:
value:
options: "(depth=2,fields=book/authors)"
+ - name: topic
+ in: query
+ description: topic parameter in query.
+ required: false
+ allowReserved: true
+ schema:
+ type: string
+ examples:
+ sample 1:
+ value:
+ topic: my-topic-name
responses:
"200":
description: OK
@@ -120,6 +121,18 @@ paths:
status: 500
message: Internal Server Error
details: Internal Server Error occurred
+ "502":
+ description: Bad Gateway
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DmiErrorMessage'
+ example:
+ message: "Bad Gateway Error Message NCMP"
+ dmi-response:
+ http-code: 400
+ body: Bad Request
+
/v1/ch/{cm-handle}/data/ds/ncmp-datastore:passthrough-running:
get:
tags:
@@ -155,16 +168,6 @@ paths:
sample 3:
value:
resourceIdentifier: "parent=shops,child=bookstore"
- - name: Accept
- in: header
- description: "Accept parameter for response, if accept parameter is null,\
- \ that means client can accept any format."
- required: false
- schema:
- type: string
- enum:
- - application/json
- - application/yang-data+json
- name: options
in: query
description: "options parameter in query, it is mandatory to wrap key(s)=value(s)\
@@ -184,6 +187,17 @@ paths:
sample 3:
value:
options: "(depth=2,fields=book/authors)"
+ - name: topic
+ in: query
+ description: topic parameter in query.
+ required: false
+ allowReserved: true
+ schema:
+ type: string
+ examples:
+ sample 1:
+ value:
+ topic: my-topic-name
responses:
"200":
description: OK
@@ -234,6 +248,17 @@ paths:
status: 500
message: Internal Server Error
details: Internal Server Error occurred
+ "502":
+ description: Bad Gateway
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DmiErrorMessage'
+ example:
+ message: "Bad Gateway Error Message NCMP"
+ dmi-response:
+ http-code: 400
+ body: Bad Request
put:
tags:
- network-cm-proxy
@@ -340,6 +365,17 @@ paths:
status: 500
message: Internal Server Error
details: Internal Server Error occurred
+ "502":
+ description: Bad Gateway
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DmiErrorMessage'
+ example:
+ message: "Bad Gateway Error Message NCMP"
+ dmi-response:
+ http-code: 400
+ body: Bad Request
post:
tags:
- network-cm-proxy
@@ -442,6 +478,17 @@ paths:
status: 500
message: Internal Server Error
details: Internal Server Error occurred
+ "502":
+ description: Bad Gateway
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DmiErrorMessage'
+ example:
+ message: "Bad Gateway Error Message NCMP"
+ dmi-response:
+ http-code: 400
+ body: Bad Request
delete:
tags:
- network-cm-proxy
@@ -539,6 +586,17 @@ paths:
status: 500
message: Internal Server Error
details: Internal Server Error occurred
+ "502":
+ description: Bad Gateway
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DmiErrorMessage'
+ example:
+ message: "Bad Gateway Error Message NCMP"
+ dmi-response:
+ http-code: 400
+ body: Bad Request
patch:
tags:
- network-cm-proxy
@@ -639,6 +697,17 @@ paths:
status: 500
message: Internal Server Error
details: Internal Server Error occurred
+ "502":
+ description: Bad Gateway
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DmiErrorMessage'
+ example:
+ message: "Bad Gateway Error Message NCMP"
+ dmi-response:
+ http-code: 400
+ body: Bad Request
/v1/ch/{cm-handle}/modules:
get:
tags:
@@ -664,7 +733,7 @@ paths:
schema:
type: array
items:
- $ref: '#/components/schemas/ModuleReference'
+ $ref: '#/components/schemas/RestModuleReference'
"400":
description: Bad Request
content:
@@ -851,7 +920,24 @@ components:
type: string
details:
type: string
- ModuleReference:
+ # DMI Server Exception Schema
+ DmiErrorMessage:
+ title: DMI Error Message
+ type: object
+ properties:
+ message:
+ type: string
+ example: "Bad Gateway Error Message NCMP"
+ dmi-response:
+ type: object
+ properties:
+ http-code:
+ type: integer
+ example: 400
+ body:
+ type: string
+ example: Bad Request
+ RestModuleReference:
title: Module reference details
type: object
properties:
diff --git a/docs/cps-path.rst b/docs/cps-path.rst
index bc46681d1c..e8a75d9cf0 100644
--- a/docs/cps-path.rst
+++ b/docs/cps-path.rst
@@ -1,6 +1,6 @@
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0
-.. Copyright (C) 2021 Nordix Foundation
+.. Copyright (C) 2021-2022 Nordix Foundation
.. DO NOT CHANGE THIS LABEL FOR RELEASE NOTES - EVEN THOUGH IT GIVES A WARNING
.. _design:
@@ -20,17 +20,137 @@ The CPS path parameter is used for querying xpaths. CPS path is inspired by the
This section describes the functionality currently supported by CPS Path.
-Sample Data
-===========
+Sample Yang Model
+=================
-The xml below describes some basic data to be used to illustrate the CPS Path functionality.
+.. code-block::
+
+ module stores {
+ yang-version 1.1;
+ namespace "org:onap:ccsdk:sample";
+
+ prefix book-store;
+
+ revision "2020-09-15" {
+ description
+ "Sample Model";
+ }
+ container shops {
+
+ container bookstore {
+
+ leaf bookstore-name {
+ type string;
+ }
+
+ leaf name {
+ type string;
+ }
+
+ list categories {
+
+ key "code";
+
+ leaf code {
+ type uint16;
+ }
+
+ leaf name {
+ type string;
+ }
+
+ leaf numberOfBooks {
+ type uint16;
+ }
+
+ container books {
+
+ list book {
+ key title;
+
+ leaf title {
+ type string;
+ }
+ leaf price {
+ type uint16;
+ }
+ leaf-list label {
+ type string;
+ }
+ leaf-list edition {
+ type string;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+**Note.** 'categories' is a Yang List and 'code' is its key leaf. All other data nodes are Yang Containers. 'label' and 'edition' are both leaf-lists.
+
+**Note.** CPS accepts only json data. The xml data presented here is for illustration purposes only.
+
+The json and xml below describes some basic data to be used to illustrate the CPS Path functionality.
+
+Sample Data in Json
+===================
+
+.. code-block:: json
+
+ {
+ "shops": {
+ "bookstore": {
+ "bookstore-name": "Chapters",
+ "name": "Chapters",
+ "categories": [
+ {
+ "code": 1,
+ "name": "SciFi",
+ "numberOfBooks": 2,
+ "books": {
+ "book": [
+ {
+ "title": "2001: A Space Odyssey",
+ "price": 5,
+ "label": ["sale", "classic"],
+ "edition": ["1968", "2018"]
+ },
+ {
+ "title": "Dune",
+ "price": 5,
+ "label": ["classic"],
+ "edition": ["1965"]
+ }
+ ]
+ }
+ },
+ {
+ "code": 2,
+ "name": "Kids",
+ "numberOfBooks": 1,
+ "books": {
+ "book": [
+ {
+ "title": "Matilda"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ }
+
+Sample Data in XML
+==================
.. code-block:: xml
<shops>
<bookstore name="Chapters">
<bookstore-name>Chapters</bookstore-name>
- <categories code="1" name="SciFi" numberOfBooks="2">
+ <categories code=1 name="SciFi" numberOfBooks="2">
<books>
<book title="2001: A Space Odyssey" price="5">
<label>sale</label>
@@ -44,7 +164,7 @@ The xml below describes some basic data to be used to illustrate the CPS Path fu
</book>
</books>
</categories>
- <categories code="2" name="Kids" numberOfBooks="1">
+ <categories code=2 name="Kids" numberOfBooks="1">
<books>
<book title="Matilda" />
</books>
@@ -52,8 +172,6 @@ The xml below describes some basic data to be used to illustrate the CPS Path fu
</bookstore>
</shops>
-**Note.** 'categories' is a Yang List and 'code' is its key leaf. All other data nodes are Yang Containers. 'label' and 'edition' are both leaf-lists.
-
General Notes
=============
@@ -79,12 +197,14 @@ absolute-path
**Examples**
- ``/shops/bookstore``
- - ``/shops/bookstore/categories[@code=1]``
- - ``/shops/bookstore/categories[@code=1]/book``
+ - ``/shops/bookstore/categories[@code='1']/books``
+ - ``/shops/bookstore/categories[@code='1']/books/book[@title='2001: A Space Odyssey']``
**Limitations**
- Absolute paths must start with the top element (data node) as per the model tree.
- Each list reference must include a valid instance reference to the key for that list. Except when it is the last element.
+ - The Absolute path to list with integer key will not work. It needs to be surrounded with a single quote ([@code='1'])
+ as if it is a string. This will be fixed in `CPS-961 <https://jira.onap.org/browse/CPS-961>`_
descendant-path
---------------
@@ -95,7 +215,7 @@ descendant-path
**Examples**
- ``//bookstore``
- - ``//categories[@code=1]/book``
+ - ``//categories[@code='1']/books``
- ``//bookstore/categories``
**Limitations**
@@ -113,7 +233,7 @@ leaf-conditions
- ``/shops/bookstore/categories[@numberOfBooks=1]``
- ``//categories[@name="Kids"]``
- ``//categories[@name='Kids']``
- - ``//categories[@code=1]/books/book[@title='Dune' and @price=5]``
+ - ``//categories[@code='1']/books/book[@title='Dune' and @price=5]``
**Limitations**
- Only the last list or container can be queried leaf values. Any ancestor list will have to be referenced by its key name-value pair(s).
@@ -156,9 +276,9 @@ The ancestor axis can be added to any CPS path query but has to be the last part
**Examples**
- ``//book/ancestor::categories``
- - ``//categories[@genre="SciFi"]/book/ancestor::bookstore``
- - ``book/ancestor::categories[@code=1]/books``
- - ``//book/label[text()="classic"]/ancestor::shop``
+ - ``//categories[@code='2']/books/ancestor::bookstore``
+ - ``//book/ancestor::categories[@code='1']/books``
+ - ``//book/label[text()="classic"]/ancestor::shops``
**Limitations**
- Ancestor list elements can only be addressed using the list key leaf.
diff --git a/docs/deployment.rst b/docs/deployment.rst
index 6f450c1230..06e1ddcc08 100644
--- a/docs/deployment.rst
+++ b/docs/deployment.rst
@@ -7,13 +7,13 @@
.. _deployment:
CPS Deployment
-==============
+##############
.. contents::
:depth: 2
CPS OOM Charts
---------------
+==============
The CPS kubernetes chart is located in the `OOM repository <https://github.com/onap/oom/tree/master/kubernetes/cps>`_.
This chart includes different cps components referred as <cps-component-name> further in the document are listed below:
@@ -26,7 +26,8 @@ This chart includes different cps components referred as <cps-component-name> fu
Please refer to the `OOM documentation <https://docs.onap.org/projects/onap-oom/en/latest/oom_user_guide.html>`_ on how to install and deploy ONAP.
Installing or Upgrading CPS Components
---------------------------------------
+======================================
+
The assumption is you have cloned the charts from the OOM repository into a local directory.
**Step 1** Go to the cps charts and edit properties in values.yaml files to make any changes to particular cps component if required.
@@ -91,7 +92,7 @@ After deploying cps, keep monitoring the cps pods until they come up.
kubectl get pods -n <namespace> | grep <cps-component-name>
Restarting a faulty component
------------------------------
+=============================
Each cps component can be restarted independently by issuing the following command:
.. code-block:: bash
@@ -102,7 +103,7 @@ Each cps component can be restarted independently by issuing the following comma
.. _cps_common_credentials_retrieval:
Credentials Retrieval
----------------------
+=====================
Application and database credentials are kept in Kubernetes secrets. They are defined as external secrets in the
values.yaml file to be used across different components as :
@@ -161,8 +162,9 @@ Additional Cps-Core Customizations
==================================
The following table lists some properties that can be specified as Helm chart
-values to configure the application to be deployed. This list is not
-exhaustive.
+values to configure the application to be deployed. This list is not exhaustive.
+
+Any spring supported property can be configured by providing in ``config.additional.<spring-supported-property-name>: value`` Example: config.additional.spring.datasource.hikari.maximumPoolSize: 30
+---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
| Property | Description | Default Value |
@@ -280,6 +282,10 @@ exhaustive.
| notification.async.executor. | | |
| thread-name-prefix | | |
+---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
+| config.additional. | Specifies number of database connections between database and application. | ``10`` |
+| spring.datasource.hikari. | This property controls the maximum size that the pool is allowed to reach, | |
+| maximumPoolSize | including both idle and in-use connections. | |
++---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
CPS-Core Docker Installation
============================
diff --git a/docs/index.rst b/docs/index.rst
index 62ba5e8b17..eaf36466f4 100755
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -9,7 +9,10 @@
.. _cps-framework-doc:
CPS Documentation
------------------
+#################
+
+CPS Core
+========
.. toctree::
:maxdepth: 1
@@ -22,12 +25,12 @@ CPS Documentation
deployment.rst
release-notes.rst
-DMI-Plugin Documentation
-------------------------
+DMI-Plugin
+==========
* :ref:`DMI-Plugin<onap-cps-ncmp-dmi-plugin:master_index>`
-CPS-Temporal Documentation
---------------------------
+CPS Temporal
+============
* :ref:`CPS-Temporal<onap-cps-cps-temporal:master_index>`
diff --git a/docs/overview.rst b/docs/overview.rst
index 4b69dd8109..cde6f6db62 100644
--- a/docs/overview.rst
+++ b/docs/overview.rst
@@ -4,7 +4,7 @@
.. _overview:
CPS Overview
-============
+############
The Configuration Persistence Service (CPS) is a platform component that is designed to serve as a
data repository for runtime data that needs persistence.
@@ -28,10 +28,10 @@ Types of data that is stored:
configuration and operational parameters depending on how they are used.
CPS Components
---------------
+==============
CPS-Core
-########
+--------
This is the component of CPS which encompasses the generic storage of Yang module data.
**NCMP**
@@ -43,13 +43,13 @@ NCMP accesses all network Data-Model-Inventory (DMI) information via NCMP-DMI-Pl
even though CPS-Core could be deployed without the NCMP extension.
NCMP-DMI-Plugin
-####################
+---------------
The Data-Model-Inventory (DMI) Plugin is a rest interface used to synchronize CM-Handles data between CPS and DMI through the DMI-Plugin.
This is built previously from the CPS-NF-Proxy component.
CPS-Temporal
-############
+------------
This service is responsible to provide a time oriented perspective for
operational network data. It provides features to store and retrieve sequences
@@ -57,14 +57,8 @@ of configurations or states along with the associated times when they occurred
or have been observed.
CPS Project
------------
-
-Wiki: `Configuration Persistence Service Project <https://wiki.onap.org/display/DW/Configuration+Persistence+Service+Project>`_
-
-Contact Information
--------------------
-
-onap-discuss@lists.onap.org
+===========
-Meeting details `Join <https://zoom.us/j/836561560?pwd=TTZNcFhXTWYxMmZ4SlgzcVZZQXluUT09>`_
-`Agenda <https://wiki.onap.org/pages/viewpage.action?pageId=111117075>`_
+* Wiki: `Configuration Persistence Service Project <https://wiki.onap.org/display/DW/Configuration+Persistence+Service+Project>`_
+* Contact Information: onap-discuss@lists.onap.org
+* Meeting details: `Join <https://zoom.us/j/836561560?pwd=TTZNcFhXTWYxMmZ4SlgzcVZZQXluUT09>`_ & `Agenda <https://wiki.onap.org/pages/viewpage.action?pageId=111117075>`_
diff --git a/docs/release-notes.rst b/docs/release-notes.rst
index 0ca0547fad..a584b580a1 100755
--- a/docs/release-notes.rst
+++ b/docs/release-notes.rst
@@ -5,11 +5,8 @@
.. DO NOT CHANGE THIS LABEL FOR RELEASE NOTES - EVEN THOUGH IT GIVES A WARNING
.. _release_notes:
-
-
-=================
CPS Release Notes
-=================
+#################
.. contents::
:depth: 2
@@ -19,10 +16,45 @@ CPS Release Notes
.. * * * JAKARTA * * *
.. ========================
-Version: 3.0.0-SNAPSHOT
-=======================
+Version: 3.1.0
+==============
++--------------------------------------+--------------------------------------------------------+
+| **CPS Project** | |
+| | |
++--------------------------------------+--------------------------------------------------------+
+| **Docker images** | onap/cps-and-ncmp:3.1.0 |
+| | |
++--------------------------------------+--------------------------------------------------------+
+| **Release designation** | 3.1.0 Jakarta |
+| | |
++--------------------------------------+--------------------------------------------------------+
+| **Release date** | |
+| | |
++--------------------------------------+--------------------------------------------------------+
+
+Features
+--------
+ - `CPS-322 <https://jira.onap.org/browse/CPS-322>`_ Implement additional validation for names and identifiers
+
+Version: 3.0.0
+==============
+
+Release Data
+------------
-This section lists the main changes & fixes merged into master (snapshot) version of CPS-NCMP. This information is here to assist developers that want experiment/test using our latest code bases directly. Stability of this is not guaranteed.
++--------------------------------------+--------------------------------------------------------+
+| **CPS Project** | |
+| | |
++--------------------------------------+--------------------------------------------------------+
+| **Docker images** | onap/cps-and-ncmp:3.0.0 |
+| | |
++--------------------------------------+--------------------------------------------------------+
+| **Release designation** | 3.0.0 Jakarta |
+| | |
++--------------------------------------+--------------------------------------------------------+
+| **Release date** | 2022 March 15 |
+| | |
++--------------------------------------+--------------------------------------------------------+
Features
--------
@@ -33,6 +65,8 @@ Features
- `CPS-741 <https://jira.onap.org/browse/CPS-741>`_ Re sync after removing cm handles
- `CPS-777 <https://jira.onap.org/browse/CPS-777>`_ Ensure all DMI operations use POST method
- `CPS-780 <https://jira.onap.org/browse/CPS-780>`_ Add examples for parameters, request and response in openapi yaml for cps-core
+ - `CPS-789 <https://jira.onap.org/browse/CPS-789>`_ CPS Data Updated Event Schema V2 to support delete operation
+ - `CPS-791 <https://jira.onap.org/browse/CPS-791>`_ CPS-Core sends delete notification event
- `CPS-817 <https://jira.onap.org/browse/CPS-817>`_ Create Endpoint For Get Cm Handles (incl. public properties) By Name
- `CPS-837 <https://jira.onap.org/browse/CPS-837>`_ Add Remove and Update properties (DMI and Public) as part of CM Handle Registration update
@@ -59,6 +93,9 @@ Null can no longer be passed within the dmi plugin service names when registerin
`CPS-837 <https://jira.onap.org/browse/CPS-837>`_ null is now used to indicate if a property should be removed as part
of cm handle registration.
+The Absolute path to list with integer key will not work. Please refer `CPS-961 <https://jira.onap.org/browse/CPS-961>`_
+for more information.
+
*Known Vulnerabilities*
None
diff --git a/docs/requirements-docs.txt b/docs/requirements-docs.txt
index 5a3d2f17f4..3b3441a807 100644
--- a/docs/requirements-docs.txt
+++ b/docs/requirements-docs.txt
@@ -1 +1,3 @@
-lfdocs-conf \ No newline at end of file
+lfdocs-conf
+sphinx>=4.2.0 # BSD
+sphinx-rtd-theme>=1.0.0 # MIT