Feature 10909: Heal operation for VDU 62/11662/6
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Thu, 10 Feb 2022 23:27:47 +0000 (00:27 +0100)
committerbeierlm <mark.beierl@canonical.com>
Tue, 26 Apr 2022 14:23:19 +0000 (16:23 +0200)
Change-Id: I3a2d315e162070d542bd6f7840ae256716da6be2
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
osm-openapi.yaml

index aaee616..a7f57be 100644 (file)
@@ -1605,6 +1605,62 @@ paths:
           $ref: '#/components/responses/UnexpectedError'
         default:
           $ref: '#/components/responses/UnexpectedError'
+  '/nslcm/v1/ns_instances/{nsInstanceId}/heal':
+    parameters:
+      - name: nsInstanceId
+        in: path
+        required: true
+        description: NS Instance ID
+        schema:
+          type: string
+    post:
+      tags:
+        - "NS instances"
+      summary: Heal a NS instance
+      description: |
+        Heal a NS instance. The precondition is that the NS instance must have
+        been created and must be in INSTANTIATED state. As a result of the
+        success of this operation, the NFVO creates a "NS Lifecycle Operation
+        Occurrence" resource for the request, and the NS instance state remains
+        INSTANTIATED.
+      operationId: healNSinstance
+      requestBody:
+        $ref: '#/components/requestBodies/HealNsRequest'
+      responses:
+        '202':
+          description: Accepted
+          headers:
+            Location:
+              description: |
+                It must point to the new "NS Lifecycle Operation Occurrence"
+                resource, i.e. an URI like ".../ns_lcm_op_occs/{nsLcmOpOccId}"
+              schema:
+                type: string
+                format: uri
+        '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'
   '/nslcm/v1/ns_instances/{nsInstanceId}/terminate':
     parameters:
       - name: nsInstanceId
@@ -2091,7 +2147,7 @@ paths:
           $ref: '#/components/responses/UnexpectedError'
         default:
           $ref: '#/components/responses/UnexpectedError'
-  /nslcm/v1/subscriptions:
+  '/nslcm/v1/subscriptions':
     get:
       tags:
         - NS instances
@@ -6857,6 +6913,79 @@ components:
         - scaleType
         - scaleVnfData
       additionalProperties: false
+    HealNsRequest:
+      description: >
+        This type represents request parameters for the "Heal NS" operation. This operation supports the healing of an NS
+        instance by healing one or more of the VNF that are part of this NS.
+      type: object
+      properties:
+        timeout_ns_heal:
+          description: timeout for the heal operation in seconds
+          type: integer
+        healVnfData:
+          description: >
+            List of VNF to be healed, together with the information needed to heal each.
+          type: array
+          items:
+            $ref: "#/components/schemas/HealVnfData"
+      required:
+        - healVnfData
+    HealVnfData:
+      description: >
+        This type represents the information to heal a VNF that is part of an NS.
+      type: object
+      required:
+        - vnfInstanceId
+      properties:
+        vnfInstanceId:
+          description: >
+            Identifies the VNF instance, part of the NS, requiring a
+            healing action.
+          type: string
+          format: uuid
+        cause:
+          description: >
+            Indicates the reason why a healing procedure is required.
+          type: string
+        additionalParams:
+          description: >
+            Additional parameters passed by the NFVO as input to
+            the healing process, specific to the VNF being healed.
+          type: object
+          properties:
+            run-day1:
+              description: >
+                Flag to indicate whether or not to run day1 primitives for the VNF (default: false).
+              type: boolean
+              default: false
+            vdu:
+              description: >
+                List of VDU to be healed, together with the information needed to heal each.
+              type: array
+              items:
+                $ref: "#/components/schemas/HealVduData"
+    HealVduData:
+      description: >
+        This type represents the information to heal a VDU that is part of a VNF.
+      type: object
+      required:
+        - vdu-id
+      properties:
+        vdu-id:
+          description: >
+            Identifies the VDU id, part of the VNF, requiring a healing action.
+          type: string
+          format: uuid
+        count-index:
+          description: >
+            Indicates the VDU number when the VDU is part of a scale-group.
+          type: integer
+          minimum: 0
+        run-day1:
+          description: >
+            Flag to indicate whether or not to run day1 primitives for the VDU (default: false).
+          type: boolean
+          default: false
     TerminateNsRequest:
       type: object
       properties:
@@ -8789,6 +8918,14 @@ components:
         application/yaml:
           schema:
             $ref: '#/components/schemas/InstantiateNsRequest'
+    HealNsRequest:
+      content:
+        application/json:
+          schema:
+            $ref: '#/components/schemas/HealNsRequest'
+        application/yaml:
+          schema:
+            $ref: '#/components/schemas/HealNsRequest'
     ScaleNsRequest:
       content:
         application/json: