summaryrefslogtreecommitdiffstats
path: root/openapi
diff options
context:
space:
mode:
authorDylanB95EST <dylan.byrne@est.tech>2021-11-09 13:54:35 +0000
committerDylanB95EST <dylan.byrne@est.tech>2021-11-12 15:24:27 +0000
commit5fe0daebb1360bd5d4c525125cdb0d6250583ff4 (patch)
tree3c0e08b48627b9c7c4c20c0291c6290673f061fb /openapi
parent306cadd63b69274afbb3073d35a15381a12d6389 (diff)
Support Update and Delete operations for DS Passtrough-Running in DMI Plugin
-Add Update operation for Passthrough Running -Use POST operatiosn for all methods as agrred -refactor to simplify and beter reuse of common methods -add delete operation for passthrough running Issue-ID: CPS-637 Issue-ID: CPS-638 Change-Id: I441181f977dee2bc0be944662465d868595ea452 Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
Diffstat (limited to 'openapi')
-rw-r--r--openapi/components.yml13
-rw-r--r--openapi/openapi.yml77
2 files changed, 27 insertions, 63 deletions
diff --git a/openapi/components.yml b/openapi/components.yml
index 30e5987f..cdf4c1c0 100644
--- a/openapi/components.yml
+++ b/openapi/components.yml
@@ -73,21 +73,12 @@ components:
revision:
$ref: '#/components/schemas/revision'
- DataAccessReadRequest:
+ DataAccessRequest:
type: object
properties:
operation:
type: string
- enum: [ read ]
- cmHandleProperties:
- $ref: '#/components/schemas/cmHandleProperties'
-
- DataAccessWriteRequest:
- type: object
- properties:
- operation:
- type: string
- enum: [ create ]
+ enum: [ read, create, update, delete ]
dataType:
type: string
data:
diff --git a/openapi/openapi.yml b/openapi/openapi.yml
index 0f43f9a5..5c095a7a 100644
--- a/openapi/openapi.yml
+++ b/openapi/openapi.yml
@@ -74,31 +74,6 @@ paths:
'403':
$ref: 'components.yml#/components/responses/Forbidden'
- /v1/inventory/cmHandles:
- post:
- tags:
- - dmi-plugin-internal
- summary: register given list of cm handles (internal use only)
- description: register given list of cm handles (internal use only)
- x-api-audience: component-internal
- operationId: registerCmHandles
- requestBody:
- description: list of cm handles
- content:
- application/json:
- schema:
- $ref: 'components.yml#/components/schemas/CmHandles'
- required: true
- responses:
- '201':
- $ref: 'components.yml#/components/responses/Created'
- '400':
- $ref: 'components.yml#/components/responses/BadRequest'
- '401':
- $ref: 'components.yml#/components/responses/Unauthorized'
- '403':
- $ref: 'components.yml#/components/responses/Forbidden'
-
/v1/ch/{cmHandle}/moduleResources:
post:
description: Retrieve module resources for one or more modules
@@ -128,27 +103,24 @@ paths:
'403':
$ref: 'components.yml#/components/responses/Forbidden'
- /v1/ch/{cmHandle}/data/ds/ncmp-datastore:passthrough-operational:
- put:
+ /v1/inventory/cmHandles:
+ post:
tags:
- - dmi-plugin
- summary: Get resource data from passthrough-operational for cm handle
- description: Get resource data from passthrough-operational for cm handle
- operationId: getResourceDataOperationalForCmHandle
- parameters:
- - $ref: 'components.yml#/components/parameters/cmHandleInPath'
- - $ref: 'components.yml#/components/parameters/resourceIdentifierInQuery'
- - $ref: 'components.yml#/components/parameters/acceptParamInHeader'
- - $ref: 'components.yml#/components/parameters/optionsParamInQuery'
+ - dmi-plugin-internal
+ summary: register given list of cm handles (internal use only)
+ description: register given list of cm handles (internal use only)
+ x-api-audience: component-internal
+ operationId: registerCmHandles
requestBody:
- description: Operational body
+ description: list of cm handles
content:
application/json:
schema:
- $ref: 'components.yml#/components/schemas/DataAccessReadRequest'
+ $ref: 'components.yml#/components/schemas/CmHandles'
+ required: true
responses:
- '200':
- $ref: 'components.yml#/components/responses/Ok'
+ '201':
+ $ref: 'components.yml#/components/responses/Created'
'400':
$ref: 'components.yml#/components/responses/BadRequest'
'401':
@@ -156,13 +128,13 @@ paths:
'403':
$ref: 'components.yml#/components/responses/Forbidden'
- /v1/ch/{cmHandle}/data/ds/ncmp-datastore:passthrough-running:
- put:
+ /v1/ch/{cmHandle}/data/ds/ncmp-datastore:passthrough-operational:
+ post:
tags:
- dmi-plugin
- summary: Get resource data from passthrough-running for cm handle
- description: Get resource data from passthrough-running for cm handle
- operationId: getResourceDataPassthroughRunningForCmHandle
+ summary: Get resource data from passthrough-operational for cm handle
+ description: Get resource data from passthrough-operational for cm handle. Will support read operations only.
+ operationId: dataAccessPassthroughOperational
parameters:
- $ref: 'components.yml#/components/parameters/cmHandleInPath'
- $ref: 'components.yml#/components/parameters/resourceIdentifierInQuery'
@@ -173,7 +145,7 @@ paths:
content:
application/json:
schema:
- $ref: 'components.yml#/components/schemas/DataAccessReadRequest'
+ $ref: 'components.yml#/components/schemas/DataAccessRequest'
responses:
'200':
$ref: 'components.yml#/components/responses/Ok'
@@ -184,21 +156,23 @@ paths:
'403':
$ref: 'components.yml#/components/responses/Forbidden'
+ /v1/ch/{cmHandle}/data/ds/ncmp-datastore:passthrough-running:
post:
- description: Write data for a cmHandle using passthrough-running
tags:
- dmi-plugin
- summary: Write data for a cmHandle
- operationId: writeDataByPassthroughRunningForCmHandle
+ summary: Get, Create or Update request for data passthrough-running for a cm-handle
+ description: Post request to Get, Create or to Update resource data for a cm-handle. Since all requests need to include additional information in a request body HTTP Post is used for all use cases and the actual operation is defined in the request body instead.
+ operationId: dataAccessPassthroughRunning
parameters:
- $ref: 'components.yml#/components/parameters/cmHandleInPath'
- $ref: 'components.yml#/components/parameters/resourceIdentifierInQuery'
+ - $ref: 'components.yml#/components/parameters/acceptParamInHeader'
+ - $ref: 'components.yml#/components/parameters/optionsParamInQuery'
requestBody:
- required: true
content:
application/json:
schema:
- $ref: 'components.yml#/components/schemas/DataAccessWriteRequest'
+ $ref: 'components.yml#/components/schemas/DataAccessRequest'
responses:
'201':
$ref: 'components.yml#/components/responses/Created'
@@ -208,4 +182,3 @@ paths:
$ref: 'components.yml#/components/responses/Unauthorized'
'403':
$ref: 'components.yml#/components/responses/Forbidden'
-