summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-rest/docs
diff options
context:
space:
mode:
authoremaclee <lee.anjella.macabuhay@est.tech>2022-06-17 17:42:56 +0100
committeremaclee <lee.anjella.macabuhay@est.tech>2022-06-30 12:08:14 +0100
commite1f73e264e2dca1f10c273620653f541c2f25d69 (patch)
treef9adc065420549de0368842ae1f4e7df30c4effe /cps-ncmp-rest/docs
parentf7c7848d4cd7654ab94d9c31b62a71ed2bc4b9e8 (diff)
Add method to get YANG module sources for CM handle
- part of this commit includes renaming the enum SyncState to DataStoreSyncState Issue-ID: CPS-1064 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: I6bf419141a1b33f09871946445cdfff422c8c354
Diffstat (limited to 'cps-ncmp-rest/docs')
-rw-r--r--cps-ncmp-rest/docs/openapi/components.yaml24
-rwxr-xr-xcps-ncmp-rest/docs/openapi/ncmp.yml25
-rwxr-xr-xcps-ncmp-rest/docs/openapi/openapi.yml3
3 files changed, 52 insertions, 0 deletions
diff --git a/cps-ncmp-rest/docs/openapi/components.yaml b/cps-ncmp-rest/docs/openapi/components.yaml
index cf254e511e..8249a7a3d7 100644
--- a/cps-ncmp-rest/docs/openapi/components.yaml
+++ b/cps-ncmp-rest/docs/openapi/components.yaml
@@ -145,6 +145,30 @@ components:
type: string
example: my-module-revision
+ RestModuleDefinition:
+ type: object
+ title: Module definitions
+ properties:
+ moduleName:
+ type: string
+ example: my-module-name
+ revision:
+ type: string
+ example: 2020-09-15
+ content:
+ type: string
+ example: |
+ module stores {
+ yang-version 1.1;
+ namespace "org:onap:ccsdk:sample";
+ prefix book-store;
+ revision "2020-09-15" {
+ description
+ "Sample Model";
+ }
+ }
+
+
CmHandleQueryParameters:
type: object
title: Cm Handle query parameters for executing cm handle search
diff --git a/cps-ncmp-rest/docs/openapi/ncmp.yml b/cps-ncmp-rest/docs/openapi/ncmp.yml
index 8bdaa82d8c..aaf0d6a1ab 100755
--- a/cps-ncmp-rest/docs/openapi/ncmp.yml
+++ b/cps-ncmp-rest/docs/openapi/ncmp.yml
@@ -246,6 +246,31 @@ fetchModuleReferencesByCmHandle:
500:
$ref: 'components.yaml#/components/responses/InternalServerError'
+fetchModuleDefinitionsByCmHandle:
+ get:
+ description: Fetch all module definitions (name, revision, yang resource) for a given cm handle
+ tags:
+ - network-cm-proxy
+ summary: Fetch all module definitions (name, revision, yang resource) for a given cm handle
+ operationId: getModuleDefinitionsByCmHandleId
+ parameters:
+ - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
+ responses:
+ 200:
+ description: OK
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: 'components.yaml#/components/schemas/RestModuleDefinition'
+ 401:
+ $ref: 'components.yaml#/components/responses/Unauthorized'
+ 403:
+ $ref: 'components.yaml#/components/responses/Forbidden'
+ 500:
+ $ref: 'components.yaml#/components/responses/InternalServerError'
+
searchCmHandles:
post:
description: Execute cm handle query search, to be included in the result a cm-handle must fulfill ALL the conditions listed here, if one of the given module names does not exists, return with an empty collection.
diff --git a/cps-ncmp-rest/docs/openapi/openapi.yml b/cps-ncmp-rest/docs/openapi/openapi.yml
index ad7dd1d4f7..35be59a38c 100755
--- a/cps-ncmp-rest/docs/openapi/openapi.yml
+++ b/cps-ncmp-rest/docs/openapi/openapi.yml
@@ -35,6 +35,9 @@ paths:
/v1/ch/{cm-handle}/modules:
$ref: 'ncmp.yml#/fetchModuleReferencesByCmHandle'
+ /v1/ch/{cm-handle}/modules/definitions:
+ $ref: 'ncmp.yml#/fetchModuleDefinitionsByCmHandle'
+
/v1/ch/searches:
$ref: 'ncmp.yml#/searchCmHandles'