aboutsummaryrefslogtreecommitdiffstats
path: root/cps-ncmp-rest/docs
diff options
context:
space:
mode:
Diffstat (limited to 'cps-ncmp-rest/docs')
-rw-r--r--cps-ncmp-rest/docs/openapi/components.yaml34
-rwxr-xr-xcps-ncmp-rest/docs/openapi/ncmp.yml58
-rwxr-xr-xcps-ncmp-rest/docs/openapi/openapi.yml6
3 files changed, 96 insertions, 2 deletions
diff --git a/cps-ncmp-rest/docs/openapi/components.yaml b/cps-ncmp-rest/docs/openapi/components.yaml
index 248b1daa6..8249a7a3d 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
@@ -209,7 +233,7 @@ components:
publicCmHandleProperties:
$ref: '#/components/schemas/CmHandlePublicProperties'
state:
- $ref: '#/components/schemas/RestOutputCmHandleState'
+ $ref: '#/components/schemas/CmHandleCompositeState'
CmHandlePublicProperties:
type: array
items:
@@ -217,7 +241,7 @@ components:
additionalProperties:
type: string
example: Book Type
- RestOutputCmHandleState:
+ CmHandleCompositeState:
type: object
properties:
cmHandleState:
@@ -268,6 +292,12 @@ components:
publicCmHandleProperties:
$ref: '#/components/schemas/CmHandlePublicProperties'
+ RestOutputCmHandleCompositeState:
+ type: object
+ properties:
+ state:
+ $ref: '#/components/schemas/CmHandleCompositeState'
+
examples:
dataSampleRequest:
summary: Sample request
diff --git a/cps-ncmp-rest/docs/openapi/ncmp.yml b/cps-ncmp-rest/docs/openapi/ncmp.yml
index 3259032f2..aaf0d6a1a 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.
@@ -293,6 +318,10 @@ retrieveCmHandleDetailsById:
application/json:
schema:
$ref: 'components.yaml#/components/schemas/RestOutputCmHandle'
+ 400:
+ $ref: 'components.yaml#/components/responses/BadRequest'
+ 401:
+ $ref: 'components.yaml#/components/responses/Unauthorized'
404:
$ref: 'components.yaml#/components/responses/NotFound'
500:
@@ -314,6 +343,35 @@ getCmHandlePropertiesById:
application/json:
schema:
$ref: 'components.yaml#/components/schemas/RestOutputCmHandlePublicProperties'
+ 400:
+ $ref: 'components.yaml#/components/responses/BadRequest'
+ 401:
+ $ref: 'components.yaml#/components/responses/Unauthorized'
+ 404:
+ $ref: 'components.yaml#/components/responses/NotFound'
+ 500:
+ $ref: 'components.yaml#/components/responses/InternalServerError'
+
+getCmHandleStateById:
+ get:
+ description: Get CM handle state by cm handle id
+ tags:
+ - network-cm-proxy
+ summary: Get CM handle state
+ operationId: getCmHandleStateByCmHandleId
+ parameters:
+ - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
+ responses:
+ 200:
+ description: OK
+ content:
+ application/json:
+ schema:
+ $ref: 'components.yaml#/components/schemas/RestOutputCmHandleCompositeState'
+ 400:
+ $ref: 'components.yaml#/components/responses/BadRequest'
+ 401:
+ $ref: 'components.yaml#/components/responses/Unauthorized'
404:
$ref: 'components.yaml#/components/responses/NotFound'
500:
diff --git a/cps-ncmp-rest/docs/openapi/openapi.yml b/cps-ncmp-rest/docs/openapi/openapi.yml
index 81ebf05ed..35be59a38 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'
@@ -46,3 +49,6 @@ paths:
/v1/ch/id-searches:
$ref: 'ncmp.yml#/searchCmHandleIds'
+
+ /v1/ch/{cm-handle}/state:
+ $ref: 'ncmp.yml#/getCmHandleStateById'