Feature 10239: Distributed VCA 27/10727/4
authorDavid Garcia <david.garcia@canonical.com>
Tue, 4 May 2021 10:48:04 +0000 (12:48 +0200)
committerDavid Garcia <david.garcia@canonical.com>
Wed, 5 May 2021 12:47:54 +0000 (14:47 +0200)
Update the osm-openapi to include the new NBI endpoints included in the
folowing commit:
 - https://osm.etsi.org/gerrit/#/c/osm/NBI/+/10574/

Change-Id: Ieed63b897956a5a7d496a54b3b5754c3b206c1a5
Signed-off-by: David Garcia <david.garcia@canonical.com>
osm-openapi.yaml

index 4478965..2b0235e 100644 (file)
@@ -5654,6 +5654,218 @@ paths:
           $ref: '#/components/responses/UnexpectedError'
         default:
           $ref: '#/components/responses/UnexpectedError'
+  '/admin/v1/vca':
+    get:
+      tags:
+        - "Infrastructure"
+        - "Admin"
+      summary: Query information about multiple VCAs
+      description: Query information about multiple VCAs
+      operationId: getVcas
+      responses:
+        '200':
+          description: OK
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ArrayOfVcaInfo'
+            application/yaml:
+              schema:
+                $ref: '#/components/schemas/ArrayOfVcaInfo'
+        '400':
+          $ref: '#/components/responses/BadRequest'
+        '401':
+          $ref: '#/components/responses/Unauthorized'
+        '403':
+          $ref: '#/components/responses/Forbidden'
+        '404':
+          $ref: '#/components/responses/NotFound'
+        '405':
+          $ref: '#/components/responses/MethodNotAllowed'
+        '406':
+          $ref: '#/components/responses/NotAcceptable'
+        '409':
+          $ref: '#/components/responses/Conflict'
+        '422':
+          $ref: '#/components/responses/UnprocessableEntity'
+        '500':
+          $ref: '#/components/responses/InternalServerError'
+        '503':
+          $ref: '#/components/responses/ServiceUnavailable'
+        '5XX':
+          $ref: '#/components/responses/UnexpectedError'
+        default:
+          $ref: '#/components/responses/UnexpectedError'
+    post:
+      tags:
+        - "Infrastructure"
+        - "Admin"
+      summary: Create a new VCA
+      description: Create a new VCA
+      operationId: createVca
+      requestBody:
+        $ref: '#/components/requestBodies/CreateVcaRequest'
+      responses:
+        '202':
+          description: Accepted
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ObjectId_plus_OpId'
+            application/yaml:
+              schema:
+                $ref: '#/components/schemas/ObjectId_plus_OpId'
+        '400':
+          $ref: '#/components/responses/BadRequest'
+        '401':
+          $ref: '#/components/responses/Unauthorized'
+        '403':
+          $ref: '#/components/responses/Forbidden'
+        '404':
+          $ref: '#/components/responses/NotFound'
+        '405':
+          $ref: '#/components/responses/MethodNotAllowed'
+        '406':
+          $ref: '#/components/responses/NotAcceptable'
+        '409':
+          $ref: '#/components/responses/Conflict'
+        '422':
+          $ref: '#/components/responses/UnprocessableEntity'
+        '500':
+          $ref: '#/components/responses/InternalServerError'
+        '503':
+          $ref: '#/components/responses/ServiceUnavailable'
+        '5XX':
+          $ref: '#/components/responses/UnexpectedError'
+        default:
+          $ref: '#/components/responses/UnexpectedError'
+  '/admin/v1/vca/{vcaId}':
+    parameters:
+      - name: vcaId
+        in: path
+        required: true
+        description: VCA ID
+        schema:
+          type: string
+          format: uuid
+    get:
+      tags:
+        - "Infrastructure"
+        - "Admin"
+      summary: Query information about an individual VCA
+      description: Query information about an individual VCA
+      operationId: getVca
+      responses:
+        '200':
+          description: OK
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/VcaInfo'
+            application/yaml:
+              schema:
+                $ref: '#/components/schemas/VcaInfo'
+        '400':
+          $ref: '#/components/responses/BadRequest'
+        '401':
+          $ref: '#/components/responses/Unauthorized'
+        '403':
+          $ref: '#/components/responses/Forbidden'
+        '404':
+          $ref: '#/components/responses/NotFound'
+        '405':
+          $ref: '#/components/responses/MethodNotAllowed'
+        '406':
+          $ref: '#/components/responses/NotAcceptable'
+        '409':
+          $ref: '#/components/responses/Conflict'
+        '422':
+          $ref: '#/components/responses/UnprocessableEntity'
+        '500':
+          $ref: '#/components/responses/InternalServerError'
+        '503':
+          $ref: '#/components/responses/ServiceUnavailable'
+        '5XX':
+          $ref: '#/components/responses/UnexpectedError'
+        default:
+          $ref: '#/components/responses/UnexpectedError'
+    patch:
+      tags:
+        - "Infrastructure"
+        - "Admin"
+      summary: Modify a VCA
+      description: Modify a VCA
+      operationId: editVca
+      requestBody:
+        $ref: '#/components/requestBodies/EditVcaRequest'
+      responses:
+        '202':
+          description: Accepted
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/OpId'
+            application/yaml:
+              schema:
+                $ref: '#/components/schemas/OpId'
+        '400':
+          $ref: '#/components/responses/BadRequest'
+        '401':
+          $ref: '#/components/responses/Unauthorized'
+        '403':
+          $ref: '#/components/responses/Forbidden'
+        '404':
+          $ref: '#/components/responses/NotFound'
+        '405':
+          $ref: '#/components/responses/MethodNotAllowed'
+        '406':
+          $ref: '#/components/responses/NotAcceptable'
+        '409':
+          $ref: '#/components/responses/Conflict'
+        '422':
+          $ref: '#/components/responses/UnprocessableEntity'
+        '500':
+          $ref: '#/components/responses/InternalServerError'
+        '503':
+          $ref: '#/components/responses/ServiceUnavailable'
+        '5XX':
+          $ref: '#/components/responses/UnexpectedError'
+        default:
+          $ref: '#/components/responses/UnexpectedError'
+    delete:
+      tags:
+        - "Infrastructure"
+        - "Admin"
+      summary: Delete a VCA
+      description: Delete a VCA
+      operationId: deleteVca
+      responses:
+        '202':
+          description: Accepted
+        '400':
+          $ref: '#/components/responses/BadRequest'
+        '401':
+          $ref: '#/components/responses/Unauthorized'
+        '403':
+          $ref: '#/components/responses/Forbidden'
+        '404':
+          $ref: '#/components/responses/NotFound'
+        '405':
+          $ref: '#/components/responses/MethodNotAllowed'
+        '406':
+          $ref: '#/components/responses/NotAcceptable'
+        '409':
+          $ref: '#/components/responses/Conflict'
+        '422':
+          $ref: '#/components/responses/UnprocessableEntity'
+        '500':
+          $ref: '#/components/responses/InternalServerError'
+        '503':
+          $ref: '#/components/responses/ServiceUnavailable'
+        '5XX':
+          $ref: '#/components/responses/UnexpectedError'
+        default:
+          $ref: '#/components/responses/UnexpectedError'
   '/admin/v1/k8srepos':
     get:
       tags:
@@ -7311,6 +7523,10 @@ components:
           type: integer
           minimum: 0
           nullable: false
+        vca:
+          type: integer
+          minimum: 0
+          nullable: false
         k8srepos:
           type: integer
           minimum: 0
@@ -7363,6 +7579,10 @@ components:
           type: integer
           minimum: 0
           nullable: true
+        vca:
+          type: integer
+          minimum: 0
+          nullable: true
         k8srepos:
           type: integer
           minimum: 0
@@ -7496,6 +7716,9 @@ components:
           type: string
         vim_password:
           type: string
+        vca:
+          type: string
+          format: uuid
         config:
           type: object
           additionalProperties: true
@@ -7530,6 +7753,9 @@ components:
           type: string
         vim_password:
           type: string
+        vca:
+          type: string
+          format: uuid
         config:
           type: object
           additionalProperties: true
@@ -7563,6 +7789,9 @@ components:
           type: string
         vim_password:
           type: string
+        vca:
+          type: string
+          format: uuid
         config:
           type: object
           additionalProperties: true
@@ -7965,6 +8194,113 @@ components:
           items:
             type: string
       additionalProperties: false
+    VcaInfo:
+      type: object
+      properties:
+        _id:
+          type: string
+          format: uuid
+        schema_version:
+          type: string
+          format: X.Y[.Z]
+        schema_type:
+          type: string
+        name:
+          type: string
+        description:
+          type: string
+        endpoints:
+          type: string
+        user:
+          type: string
+        secret:
+          type: string
+        cacert:
+          type: string
+        lxd-cloud:
+          type: string
+        lxd-credentials:
+          type: string
+        k8s-cloud:
+          type: string
+        k8s-credentials:
+          type: string
+        model-config:
+          type: object
+          additionalProperties: true
+    ArrayOfVcaInfo:
+      type: array
+      items:
+        $ref: '#/components/schemas/VcaInfo'
+    CreateVcaRequest:
+      type: object
+      properties:
+        schema_version:
+          type: string
+          format: X.Y[.Z]
+        schema_type:
+          type: string
+        name:
+          type: string
+        description:
+          type: string
+        endpoints:
+          type: string
+        user:
+          type: string
+        secret:
+          type: string
+        cacert:
+          type: string
+        lxd-cloud:
+          type: string
+        lxd-credentials:
+          type: string
+        k8s-cloud:
+          type: string
+        k8s-credentials:
+          type: string
+        model-config:
+          type: object
+          additionalProperties: true
+      required:
+        - name
+        - endpoints
+        - user
+        - secret
+        - cacert
+        - lxd-cloud
+        - lxd-credentials
+        - k8s-cloud
+        - k8s-credentials
+      additionalProperties: false
+    EditVcaRequest:
+      type: object
+      properties:
+        name:
+          type: string
+        description:
+          type: string
+        endpoints:
+          type: string
+        user:
+          type: string
+        secret:
+          type: string
+        cacert:
+          type: string
+        lxd-cloud:
+          type: string
+        lxd-credentials:
+          type: string
+        k8s-cloud:
+          type: string
+        k8s-credentials:
+          type: string
+        model-config:
+          type: object
+          additionalProperties: true
+      additionalProperties: false
     K8sRepoType:
       type: string
       enum:
@@ -8445,6 +8781,22 @@ components:
         application/yaml:
           schema:
             $ref: '#/components/schemas/EditK8sClusterRequest'
+    CreateVcaRequest:
+      content:
+        application/json:
+          schema:
+            $ref: '#/components/schemas/CreateVcaRequest'
+        application/yaml:
+          schema:
+            $ref: '#/components/schemas/CreateVcaRequest'
+    EditVcaRequest:
+      content:
+        application/json:
+          schema:
+            $ref: '#/components/schemas/EditVcaRequest'
+        application/yaml:
+          schema:
+            $ref: '#/components/schemas/EditVcaRequest'
     CreateK8sRepoRequest:
       content:
         application/json: