From 3139ece993c68ce7e40d166acdd5d9572a3a8a1e Mon Sep 17 00:00:00 2001 From: niamhcore Date: Fri, 30 Jul 2021 16:25:16 +0100 Subject: Retrieve yang-resources for one or more modules Updating openapi to add a new rest endpoint Updating restconf client to support post with json Adding a ModuleResourceNotFound exception Adding a test util class Fixing merge conflict Refactoring SDNC operations Issue-ID: CPS-484 Signed-off-by: niamhcore Change-Id: Id76dfe4cb12053771883e0271153d7bf7cd98548 --- docs/openapi/components.yml | 33 +++++++++++++++++++++++++++++++++ docs/openapi/openapi.yml | 27 ++++++++++++++++++++++++++- 2 files changed, 59 insertions(+), 1 deletion(-) (limited to 'docs/openapi') diff --git a/docs/openapi/components.yml b/docs/openapi/components.yml index f38ed64b..c67dad69 100644 --- a/docs/openapi/components.yml +++ b/docs/openapi/components.yml @@ -19,6 +19,30 @@ components: items: type: string + ModuleRequestParent: + type: object + properties: + operation: + type: string + enum: [read] + data: + type: object + properties: + modules: + type: array + items: + type: object + properties: + name: + type: string + revision: + type: string + cmHandleProperties: + type: object + additionalProperties: + type: string + example: system-001 + responses: NotFound: description: The specified resource was not found @@ -65,3 +89,12 @@ components: NoContent: description: No Content content: {} + + parameters: + cmHandleInPath: + name: cmHandle + in: path + description: The identifier for a network function, network element, subnetwork, or any other cm object by managed Network CM Proxy + required: true + schema: + type: string \ No newline at end of file diff --git a/docs/openapi/openapi.yml b/docs/openapi/openapi.yml index 44747a9e..f261c0da 100644 --- a/docs/openapi/openapi.yml +++ b/docs/openapi/openapi.yml @@ -97,4 +97,29 @@ paths: '401': $ref: 'components.yml#/components/responses/Unauthorized' '403': - $ref: 'components.yml#/components/responses/Forbidden' \ No newline at end of file + $ref: 'components.yml#/components/responses/Forbidden' + + /v1/ch/{cmHandle}/moduleResources: + post: + description: Retrieve module resources for one or more modules + tags: + - dmi-plugin + summary: Retrieve module resources + operationId: retrieveModuleResources + parameters: + - $ref: 'components.yml#/components/parameters/cmHandleInPath' + requestBody: + required: true + content: + application/json: + schema: + $ref: 'components.yml#/components/schemas/ModuleRequestParent' + responses: + '200': + $ref: 'components.yml#/components/responses/Ok' + '400': + $ref: 'components.yml#/components/responses/BadRequest' + '401': + $ref: 'components.yml#/components/responses/Unauthorized' + '403': + $ref: 'components.yml#/components/responses/Forbidden' -- cgit 1.2.3-korg