Feature 10996: Adds cancel resource to ns_lcm_op_occs 20/14020/2
authorGabriel Cuba <gcuba@whitestack.com>
Tue, 14 Nov 2023 21:52:01 +0000 (16:52 -0500)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Wed, 29 Nov 2023 17:09:53 +0000 (18:09 +0100)
Change-Id: I5489033e5c6f7a41e4783c281482a3f9b30e1a1b
Signed-off-by: Gabriel Cuba <gcuba@whitestack.com>
osm-openapi.yaml

index 3e2b528..15b712f 100644 (file)
@@ -2223,6 +2223,49 @@ paths:
           $ref: '#/components/responses/UnexpectedError'
         default:
           $ref: '#/components/responses/UnexpectedError'
+  '/nslcm/v1/ns_lcm_op_occs/{nsLcmOpOccId}/cancel':
+    parameters:
+      - name: nsLcmOpOccId
+        in: path
+        required: true
+        description: NS LCM Operation Occurrence ID
+        schema:
+          type: string
+    post:
+      tags:
+        - "NS instances"
+      summary: Cancel an ongoing NS lifecycle management operation
+      description: Cancel an ongoing NS lifecycle management operation while it is being executed or rolled back
+      operationId: cancelNSLCMOpOcc
+      requestBody:
+        $ref: '#/components/requestBodies/CancelNSLCMOpOccRequest'
+      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'
   '/nslcm/v1/vnf_instances':
     get:
       tags:
@@ -9178,6 +9221,14 @@ components:
           $ref: '#/components/schemas/Authenticationschema'
       required:
         - CallbackUri
+    CancelNSLCMOpOccRequest:
+      type: object
+      properties:
+        cancelMode:
+          type: string
+          enum:
+            - GRACEFUL
+            - FORCEFUL
   # END SCHEMAS
 
   requestBodies:
@@ -9523,6 +9574,14 @@ components:
         application/yaml:
           schema:
             $ref: '#/components/schemas/NslcmSubscriptionRequest'
+    CancelNSLCMOpOccRequest:
+      content:
+        application/json:
+          schema:
+            $ref: '#/components/schemas/CancelNSLCMOpOccRequest'
+        application/yaml:
+          schema:
+            $ref: '#/components/schemas/CancelNSLCMOpOccRequest'
   # END REQUEST BODIES
 
   securitySchemes: