DylanB95EST | b5a2383 | 2021-06-02 19:45:46 +0100 | [diff] [blame] | 1 | # ============LICENSE_START======================================================= |
lukegleeson | b208aeb | 2021-07-08 16:48:15 +0100 | [diff] [blame] | 2 | # Copyright (C) 2021 Nordix Foundation |
DylanB95EST | b5a2383 | 2021-06-02 19:45:46 +0100 | [diff] [blame] | 3 | # ================================================================================ |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
lukegleeson | b208aeb | 2021-07-08 16:48:15 +0100 | [diff] [blame] | 9 | # |
DylanB95EST | b5a2383 | 2021-06-02 19:45:46 +0100 | [diff] [blame] | 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
| 16 | # SPDX-License-Identifier: Apache-2.0 |
| 17 | # ============LICENSE_END========================================================= |
| 18 | |
| 19 | openapi: 3.0.1 |
| 20 | info: |
| 21 | title: NCMP DMI Plugin |
| 22 | description: Adds Data Model Inventory Registry capability for ONAP |
| 23 | version: "1.0.0" |
| 24 | servers: |
| 25 | - url: //localhost:8088/ |
| 26 | tags: |
tragait | 7c4a9aa | 2021-07-19 13:46:37 +0100 | [diff] [blame] | 27 | - name: dmi-plugin-internal |
| 28 | description: DMI plugin internal rest apis |
| 29 | - name: dmi-plugin |
| 30 | description: DMI plugin rest apis |
| 31 | |
| 32 | |
DylanB95EST | b5a2383 | 2021-06-02 19:45:46 +0100 | [diff] [blame] | 33 | paths: |
tragait | 11e9f72 | 2021-08-27 15:01:27 +0100 | [diff] [blame] | 34 | /v1/ch/{cmHandle}/modules: |
tragait | 7c4a9aa | 2021-07-19 13:46:37 +0100 | [diff] [blame] | 35 | post: |
DylanB95EST | b5a2383 | 2021-06-02 19:45:46 +0100 | [diff] [blame] | 36 | tags: |
| 37 | - dmi-plugin |
tragait | 7c4a9aa | 2021-07-19 13:46:37 +0100 | [diff] [blame] | 38 | summary: Get all modules for cm handle |
| 39 | description: Get all modules for given cm handle |
| 40 | operationId: getModulesForCmHandle |
| 41 | parameters: |
| 42 | - name: cmHandle |
| 43 | in: path |
| 44 | description: The cm handle to fetch all the modules |
| 45 | required: true |
| 46 | schema: |
| 47 | type: string |
tragait | 400b6c7 | 2021-09-22 10:50:15 +0100 | [diff] [blame] | 48 | requestBody: |
| 49 | description: Operational body |
| 50 | content: |
| 51 | application/json: |
| 52 | schema: |
| 53 | $ref: 'components.yml#/components/schemas/DataAccessReadRequest' |
DylanB95EST | b5a2383 | 2021-06-02 19:45:46 +0100 | [diff] [blame] | 54 | responses: |
| 55 | '200': |
tragait | 7c4a9aa | 2021-07-19 13:46:37 +0100 | [diff] [blame] | 56 | description: OK |
| 57 | content: |
| 58 | application/json: |
| 59 | schema: |
niamhcore | 577efb0 | 2021-08-11 16:13:53 +0100 | [diff] [blame] | 60 | $ref: 'components.yml#/components/schemas/ModuleSet' |
tragait | 7c4a9aa | 2021-07-19 13:46:37 +0100 | [diff] [blame] | 61 | example: { |
niamhcore | 577efb0 | 2021-08-11 16:13:53 +0100 | [diff] [blame] | 62 | "schemas": [ |
| 63 | { |
| 64 | "moduleName": "example-identifier", |
| 65 | "revision": "example-version", |
| 66 | "namespace": "example-namespace" |
| 67 | } |
| 68 | ] |
| 69 | } |
DylanB95EST | b5a2383 | 2021-06-02 19:45:46 +0100 | [diff] [blame] | 70 | '400': |
| 71 | $ref: 'components.yml#/components/responses/BadRequest' |
| 72 | '401': |
| 73 | $ref: 'components.yml#/components/responses/Unauthorized' |
| 74 | '403': |
tragait | 2270d76 | 2021-07-08 15:42:19 +0100 | [diff] [blame] | 75 | $ref: 'components.yml#/components/responses/Forbidden' |
| 76 | |
| 77 | /v1/inventory/cmHandles: |
| 78 | post: |
| 79 | tags: |
| 80 | - dmi-plugin-internal |
| 81 | summary: register given list of cm handles (internal use only) |
| 82 | description: register given list of cm handles (internal use only) |
| 83 | x-api-audience: component-internal |
| 84 | operationId: registerCmHandles |
| 85 | requestBody: |
| 86 | description: list of cm handles |
| 87 | content: |
| 88 | application/json: |
| 89 | schema: |
| 90 | $ref: 'components.yml#/components/schemas/CmHandles' |
| 91 | required: true |
| 92 | responses: |
| 93 | '201': |
| 94 | $ref: 'components.yml#/components/responses/Created' |
| 95 | '400': |
| 96 | $ref: 'components.yml#/components/responses/BadRequest' |
| 97 | '401': |
| 98 | $ref: 'components.yml#/components/responses/Unauthorized' |
| 99 | '403': |
niamhcore | 3139ece | 2021-07-30 16:25:16 +0100 | [diff] [blame] | 100 | $ref: 'components.yml#/components/responses/Forbidden' |
| 101 | |
| 102 | /v1/ch/{cmHandle}/moduleResources: |
| 103 | post: |
| 104 | description: Retrieve module resources for one or more modules |
| 105 | tags: |
| 106 | - dmi-plugin |
| 107 | summary: Retrieve module resources |
| 108 | operationId: retrieveModuleResources |
| 109 | parameters: |
| 110 | - $ref: 'components.yml#/components/parameters/cmHandleInPath' |
| 111 | requestBody: |
| 112 | required: true |
| 113 | content: |
| 114 | application/json: |
| 115 | schema: |
tragait | 400b6c7 | 2021-09-22 10:50:15 +0100 | [diff] [blame] | 116 | $ref: 'components.yml#/components/schemas/DmiModuleReadRequestBody' |
niamhcore | 3139ece | 2021-07-30 16:25:16 +0100 | [diff] [blame] | 117 | responses: |
| 118 | '200': |
niamhcore | 4f43188 | 2021-09-21 16:08:29 +0100 | [diff] [blame] | 119 | description: OK |
| 120 | content: |
| 121 | application/json: |
| 122 | schema: |
| 123 | $ref: 'components.yml#/components/schemas/YangResources' |
niamhcore | 3139ece | 2021-07-30 16:25:16 +0100 | [diff] [blame] | 124 | '400': |
| 125 | $ref: 'components.yml#/components/responses/BadRequest' |
| 126 | '401': |
| 127 | $ref: 'components.yml#/components/responses/Unauthorized' |
| 128 | '403': |
| 129 | $ref: 'components.yml#/components/responses/Forbidden' |
tragait | e398be5 | 2021-08-06 17:01:31 +0100 | [diff] [blame] | 130 | |
niamhcore | 2fb3f66 | 2021-09-29 15:32:32 +0100 | [diff] [blame^] | 131 | /v1/ch/{cmHandle}/data/ds/ncmp-datastore:passthrough-operational: |
tragait | e398be5 | 2021-08-06 17:01:31 +0100 | [diff] [blame] | 132 | put: |
| 133 | tags: |
| 134 | - dmi-plugin |
tragait | f01d567 | 2021-08-19 11:19:54 +0100 | [diff] [blame] | 135 | summary: Get resource data from passthrough-operational for cm handle |
| 136 | description: Get resource data from passthrough-operational for cm handle |
tragait | e398be5 | 2021-08-06 17:01:31 +0100 | [diff] [blame] | 137 | operationId: getResourceDataOperationalForCmHandle |
| 138 | parameters: |
| 139 | - $ref: 'components.yml#/components/parameters/cmHandleInPath' |
niamhcore | 2fb3f66 | 2021-09-29 15:32:32 +0100 | [diff] [blame^] | 140 | - $ref: 'components.yml#/components/parameters/resourceIdentifierInQuery' |
tragait | f01d567 | 2021-08-19 11:19:54 +0100 | [diff] [blame] | 141 | - $ref: 'components.yml#/components/parameters/acceptParamInHeader' |
| 142 | - $ref: 'components.yml#/components/parameters/fieldsParamInQuery' |
| 143 | - $ref: 'components.yml#/components/parameters/depthParamInQuery' |
| 144 | requestBody: |
| 145 | description: Operational body |
| 146 | content: |
| 147 | application/json: |
| 148 | schema: |
niamhcore | 79e41e0 | 2021-08-20 11:24:06 +0100 | [diff] [blame] | 149 | $ref: 'components.yml#/components/schemas/DataAccessReadRequest' |
tragait | f01d567 | 2021-08-19 11:19:54 +0100 | [diff] [blame] | 150 | responses: |
| 151 | '200': |
| 152 | $ref: 'components.yml#/components/responses/Ok' |
| 153 | '400': |
| 154 | $ref: 'components.yml#/components/responses/BadRequest' |
| 155 | '401': |
| 156 | $ref: 'components.yml#/components/responses/Unauthorized' |
| 157 | '403': |
| 158 | $ref: 'components.yml#/components/responses/Forbidden' |
| 159 | |
niamhcore | 2fb3f66 | 2021-09-29 15:32:32 +0100 | [diff] [blame^] | 160 | /v1/ch/{cmHandle}/data/ds/ncmp-datastore:passthrough-running: |
tragait | f01d567 | 2021-08-19 11:19:54 +0100 | [diff] [blame] | 161 | put: |
| 162 | tags: |
| 163 | - dmi-plugin |
| 164 | summary: Get resource data from passthrough-running for cm handle |
| 165 | description: Get resource data from passthrough-running for cm handle |
| 166 | operationId: getResourceDataPassthroughRunningForCmHandle |
| 167 | parameters: |
| 168 | - $ref: 'components.yml#/components/parameters/cmHandleInPath' |
niamhcore | 2fb3f66 | 2021-09-29 15:32:32 +0100 | [diff] [blame^] | 169 | - $ref: 'components.yml#/components/parameters/resourceIdentifierInQuery' |
tragait | f01d567 | 2021-08-19 11:19:54 +0100 | [diff] [blame] | 170 | - $ref: 'components.yml#/components/parameters/acceptParamInHeader' |
| 171 | - $ref: 'components.yml#/components/parameters/fieldsParamInQuery' |
| 172 | - $ref: 'components.yml#/components/parameters/depthParamInQuery' |
tragait | e398be5 | 2021-08-06 17:01:31 +0100 | [diff] [blame] | 173 | requestBody: |
| 174 | description: Operational body |
| 175 | content: |
| 176 | application/json: |
| 177 | schema: |
niamhcore | 79e41e0 | 2021-08-20 11:24:06 +0100 | [diff] [blame] | 178 | $ref: 'components.yml#/components/schemas/DataAccessReadRequest' |
tragait | e398be5 | 2021-08-06 17:01:31 +0100 | [diff] [blame] | 179 | responses: |
| 180 | '200': |
| 181 | $ref: 'components.yml#/components/responses/Ok' |
| 182 | '400': |
| 183 | $ref: 'components.yml#/components/responses/BadRequest' |
| 184 | '401': |
| 185 | $ref: 'components.yml#/components/responses/Unauthorized' |
| 186 | '403': |
| 187 | $ref: 'components.yml#/components/responses/Forbidden' |
niamhcore | 79e41e0 | 2021-08-20 11:24:06 +0100 | [diff] [blame] | 188 | |
| 189 | post: |
| 190 | description: Write data for a cmHandle using passthrough-running |
| 191 | tags: |
| 192 | - dmi-plugin |
| 193 | summary: Write data for a cmHandle |
| 194 | operationId: writeDataByPassthroughRunningForCmHandle |
| 195 | parameters: |
| 196 | - $ref: 'components.yml#/components/parameters/cmHandleInPath' |
niamhcore | 2fb3f66 | 2021-09-29 15:32:32 +0100 | [diff] [blame^] | 197 | - $ref: 'components.yml#/components/parameters/resourceIdentifierInQuery' |
niamhcore | 79e41e0 | 2021-08-20 11:24:06 +0100 | [diff] [blame] | 198 | requestBody: |
| 199 | required: true |
| 200 | content: |
| 201 | application/json: |
| 202 | schema: |
| 203 | $ref: 'components.yml#/components/schemas/DataAccessWriteRequest' |
| 204 | responses: |
niamhcore | accefb1 | 2021-09-15 13:01:25 +0100 | [diff] [blame] | 205 | '201': |
| 206 | $ref: 'components.yml#/components/responses/Created' |
niamhcore | 79e41e0 | 2021-08-20 11:24:06 +0100 | [diff] [blame] | 207 | '400': |
| 208 | $ref: 'components.yml#/components/responses/BadRequest' |
| 209 | '401': |
| 210 | $ref: 'components.yml#/components/responses/Unauthorized' |
| 211 | '403': |
| 212 | $ref: 'components.yml#/components/responses/Forbidden' |
| 213 | |