Openapi spec added 16/12116/1
authoraravind.est <aravindhan.a@est.tech>
Fri, 24 Nov 2023 12:27:58 +0000 (12:27 +0000)
committeraravind.est <aravindhan.a@est.tech>
Fri, 24 Nov 2023 13:27:01 +0000 (13:27 +0000)
Opeanapi spec added for rApp Manager.
This spec is generated from swagger-ui maven plugin.
This build process doesn't generated or consume this openapi file.

Issue-ID: NONRTRIC-957
Signed-off-by: aravind.est <aravindhan.a@est.tech>
Change-Id: Ib2ad5952a512449b02de9d19294b50ffd931aca6

openapi/rappmanager/rappmanager-spec.yaml [new file with mode: 0755]

diff --git a/openapi/rappmanager/rappmanager-spec.yaml b/openapi/rappmanager/rappmanager-spec.yaml
new file mode 100755 (executable)
index 0000000..18f5ace
--- /dev/null
@@ -0,0 +1,447 @@
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2023 OpenInfra Foundation Europe. All rights reserved.
+#  ========================================================================
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#  ============LICENSE_END=================================================
+#
+
+openapi: 3.0.1
+info:
+  title: rApp Manager
+  description: The rApp Manager is a lifecycle management service for rApps. It gets the rApp as ASD formatted package and lifecycle manages it based on it instance configuration.
+  license:
+    name: Copyright (C) 2023 OpenInfra Foundation Europe. Licensed under the Apache License.
+    url: http://www.apache.org/licenses/LICENSE-2.0
+  version: "1.0"
+servers:
+  - url: /
+tags:
+- name: rApp
+  description: API for rApps
+- name: rApp Instance
+  description: API for rApp Instances
+
+paths:
+  /rapps/{rapp_id}:
+    get:
+      tags:
+        - rApp
+      summary: Get specific rApp details
+      operationId: getRapp
+      parameters:
+        - name: rapp_id
+          in: path
+          required: true
+          schema:
+            type: string
+      responses:
+        '200':
+          description: OK
+          content:
+            '*/*':
+              schema:
+                $ref: '#/components/schemas/Rapp'
+        '404':
+          description: Not found
+    put:
+      tags:
+        - rApp
+      summary: Prime/Deprime rApp
+      operationId: primeRapp
+      parameters:
+        - name: rapp_id
+          in: path
+          required: true
+          schema:
+            type: string
+      requestBody:
+        content:
+          application/json:
+            schema:
+              $ref: '#/components/schemas/RappPrimeOrder'
+        required: true
+      responses:
+        '200':
+          description: OK
+        '400':
+          description: Bad Request
+        '404':
+          description: Not found
+        '502':
+          description: Bad Gateway
+
+    post:
+      tags:
+        - rApp
+      summary: Create rApp
+      operationId: createRapp
+      parameters:
+        - name: rapp_id
+          in: path
+          required: true
+          schema:
+            type: string
+      requestBody:
+        content:
+          multipart/form-data:
+            schema:
+              type: object
+              properties:
+                file:
+                  type: string
+                  format: binary
+        required: true
+      responses:
+        '202':
+          description: Accepted
+        '400':
+          description: Bad Request
+    delete:
+      tags:
+        - rApp
+      summary: Delete rApp
+      operationId: deleteRapp
+      parameters:
+        - name: rapp_id
+          in: path
+          required: true
+          schema:
+            type: string
+      responses:
+        '200':
+          description: OK
+        '400':
+          description: Bad Request
+        '404':
+          description: Not found
+  /rapps/{rapp_id}/instance/{rapp_instance_id}:
+    get:
+      tags:
+        - rApp Instance
+      summary: Get specific rApp instance details
+      operationId: getRappInstance
+      parameters:
+        - name: rapp_id
+          in: path
+          required: true
+          schema:
+            type: string
+        - name: rapp_instance_id
+          in: path
+          required: true
+          schema:
+            type: string
+            format: uuid
+      responses:
+        '200':
+          description: OK
+          content:
+            '*/*':
+              schema:
+                $ref: '#/components/schemas/RappInstance'
+        '404':
+          description: Not found
+    put:
+      tags:
+        - rApp Instance
+      summary: Deploy/Undeploy rApp instance
+      operationId: deployRappInstance
+      parameters:
+        - name: rapp_id
+          in: path
+          required: true
+          schema:
+            type: string
+        - name: rapp_instance_id
+          in: path
+          required: true
+          schema:
+            type: string
+            format: uuid
+      requestBody:
+        content:
+          application/json:
+            schema:
+              $ref: '#/components/schemas/RappInstanceDeployOrder'
+        required: true
+      responses:
+        '200':
+          description: OK
+        '400':
+          description: Bad Request
+        '404':
+          description: Not found
+        '502':
+          description: Bad Gateway
+    delete:
+      tags:
+        - rApp Instance
+      summary: Delete rApp instance
+      operationId: deleteRappInstance
+      parameters:
+        - name: rapp_id
+          in: path
+          required: true
+          schema:
+            type: string
+        - name: rapp_instance_id
+          in: path
+          required: true
+          schema:
+            type: string
+            format: uuid
+      responses:
+        '200':
+          description: OK
+        '404':
+          description: Not found
+  /rapps/{rapp_id}/instance:
+    get:
+      tags:
+        - rApp Instance
+      summary: Get all instances of rApp
+      operationId: getAllRappInstances
+      parameters:
+        - name: rapp_id
+          in: path
+          required: true
+          schema:
+            type: string
+      responses:
+        '200':
+          description: OK
+          content:
+            '*/*':
+              schema:
+                type: object
+                additionalProperties:
+                  $ref: '#/components/schemas/RappInstance'
+        '404':
+          description: Not found
+    post:
+      tags:
+        - rApp Instance
+      summary: Create rApp instance
+      operationId: createRappInstance
+      parameters:
+        - name: rapp_id
+          in: path
+          required: true
+          schema:
+            type: string
+      requestBody:
+        content:
+          application/json:
+            schema:
+              $ref: '#/components/schemas/RappInstance'
+        required: true
+      responses:
+        '200':
+          description: OK
+          content:
+            '*/*':
+              schema:
+                $ref: '#/components/schemas/RappInstance'
+        '404':
+          description: Not found
+  /rapps:
+    get:
+      tags:
+        - rApp
+      summary: Get All rApps
+      operationId: getRapps
+      responses:
+        '200':
+          description: OK
+          content:
+            '*/*':
+              schema:
+                type: array
+                items:
+                  $ref: '#/components/schemas/Rapp'
+components:
+  schemas:
+    RappPrimeOrder:
+      type: object
+      properties:
+        primeOrder:
+          type: string
+          enum:
+            - PRIME
+            - DEPRIME
+    RappInstanceDeployOrder:
+      type: object
+      properties:
+        deployOrder:
+          type: string
+          enum:
+            - DEPLOY
+            - UNDEPLOY
+    ACMResources:
+      type: object
+      properties:
+        compositionDefinitions:
+          type: string
+        compositionInstances:
+          uniqueItems: true
+          type: array
+          items:
+            type: string
+    DMEResources:
+      type: object
+      properties:
+        producerInfoTypes:
+          uniqueItems: true
+          type: array
+          items:
+            type: string
+        consumerInfoTypes:
+          uniqueItems: true
+          type: array
+          items:
+            type: string
+        infoProducers:
+          uniqueItems: true
+          type: array
+          items:
+            type: string
+        infoConsumers:
+          uniqueItems: true
+          type: array
+          items:
+            type: string
+    Rapp:
+      type: object
+      properties:
+        rappId:
+          type: string
+          format: uuid
+        name:
+          type: string
+        state:
+          type: string
+          enum:
+            - COMMISSIONED
+            - PRIMING
+            - PRIMED
+            - DEPRIMING
+        reason:
+          type: string
+        packageLocation:
+          type: string
+        packageName:
+          type: string
+        rappResources:
+          $ref: '#/components/schemas/RappResources'
+        rappInstances:
+          type: object
+          additionalProperties:
+            $ref: '#/components/schemas/RappInstance'
+        compositionId:
+          type: string
+          format: uuid
+    RappACMInstance:
+      type: object
+      properties:
+        instance:
+          type: string
+        acmInstanceId:
+          type: string
+          format: uuid
+    RappDMEInstance:
+      type: object
+      properties:
+        infoTypesProducer:
+          uniqueItems: true
+          type: array
+          items:
+            type: string
+        infoProducer:
+          type: string
+        infoTypeConsumer:
+          type: string
+        infoConsumer:
+          type: string
+    RappInstance:
+      type: object
+      properties:
+        rappInstanceId:
+          type: string
+          format: uuid
+        state:
+          type: string
+          enum:
+            - DEPLOYED
+            - DEPLOYING
+            - UNDEPLOYED
+            - UNDEPLOYING
+        reason:
+          type: string
+        acm:
+          $ref: '#/components/schemas/RappACMInstance'
+        sme:
+          $ref: '#/components/schemas/RappSMEInstance'
+        dme:
+          $ref: '#/components/schemas/RappDMEInstance'
+    RappResources:
+      type: object
+      properties:
+        acm:
+          $ref: '#/components/schemas/ACMResources'
+        sme:
+          $ref: '#/components/schemas/SMEResources'
+        dme:
+          $ref: '#/components/schemas/DMEResources'
+    RappSMEInstance:
+      type: object
+      properties:
+        providerFunction:
+          type: string
+        providerFunctionIds:
+          type: array
+          items:
+            type: string
+        serviceApis:
+          type: string
+        serviceApiIds:
+          type: array
+          items:
+            type: string
+        invokers:
+          type: string
+        invokerIds:
+          type: array
+          items:
+            type: string
+        aefId:
+          type: string
+        apfId:
+          type: string
+    SMEResources:
+      type: object
+      properties:
+        providerFunctions:
+          uniqueItems: true
+          type: array
+          items:
+            type: string
+        serviceApis:
+          uniqueItems: true
+          type: array
+          items:
+            type: string
+        invokers:
+          uniqueItems: true
+          type: array
+          items:
+            type: string