Commit 5d93cbbb authored by Francesca Moscatelli's avatar Francesca Moscatelli
Browse files

SOL005_42: NS LCM Coordination interface added

parent 4b0c0a9a
Loading
Loading
Loading
Loading
Loading
+352 −0
Original line number Diff line number Diff line
openapi: 3.0.2

info:
  title: SOL005 - NS LCM Coordination interface
  description: |
    SOL005 - NS LCM Coordination interface
    
    IMPORTANT: Please note that this file might be not aligned to the current
    version of the ETSI Group Specification it refers to and has not been approved by the ETSI NFV ISG.
    In case of discrepancies the published ETSI Group Specification takes precedence.
    Please report bugs to https://forge.etsi.org/rep/nfv/SOL005/issues
  contact:
    name: NFV-SOL WG
  license:
    name: ETSI Forge copyright notice
    url: https://forge.etsi.org/etsi-forge-copyright-notice.txt
  version: 1.0.0-impl:etsi.org:ETSI_NFV_OpenAPI:1

externalDocs:
  description: ETSI GS NFV-SOL 005 V3.5.1
  url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/005/03.03.01_60/gs_nfv-sol005v030301p.pdf

servers:
  - url: http://127.0.0.1/lcmcoord/v1
  - url: https://127.0.0.1/lcmcoord/v1

paths:
  ###############################################################################
  # API Versions                                                                #
  ###############################################################################
  /api_versions:
    $ref: '../endpoints/SOL005_endpoints.yaml#/endpoints/api-versions'

  /coordinations:
    parameters:
      - $ref: ../components/SOL005_params.yaml#/components/parameters/Version
      - $ref: ../components/SOL005_params.yaml#/components/parameters/Authorization
      - $ref: ../components/SOL005_params.yaml#/components/parameters/Accept
    post:
      description: |
        The POST method requests the coordination of an LCM operation occurrence 
        with a management operation executed in the API producer.
        See clause 12.4.2.3.1.
      requestBody:
         $ref: '#/components/requestBodies/LcmCoordRequest'
      responses:
        201:
          $ref: '#/components/responses/CoordinationActions.Post.201'
        202:
          $ref: '#/components/responses/CoordinationActions.Post.202'
        400:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/400
        401:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/401
        403:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/403
        404:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/404
        405:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/405
        406:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/406
        409:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/409
        416:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/416
        500:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/500
        503:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/503
        504:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/504

  /coordinations/{coordinationId}:
    parameters:
      - $ref: ../components/SOL005_params.yaml#/components/parameters/Version
      - $ref: ../components/SOL005_params.yaml#/components/parameters/Authorization
      - $ref: ../components/SOL005_params.yaml#/components/parameters/Accept
      - $ref: '#/components/parameters/CoordinationId'
    get:
      description: |
        The GET method reads a coordination result.
        See clause 12.4.3.3.2.
      responses:
        200:
          $ref: '#/components/responses/IndividualCoordinationAction.Get.200'
        400:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/400
        401:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/401
        403:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/403
        404:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/404
        405:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/405
        406:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/406
        416:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/416
        500:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/500
        503:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/503
        504:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/504

  /coordinations/cancel:
    parameters:
      - $ref: ../components/SOL005_params.yaml#/components/parameters/Version
      - $ref: ../components/SOL005_params.yaml#/components/parameters/Authorization
      - $ref: ../components/SOL005_params.yaml#/components/parameters/Accept
    post:
      description: |
        The POST method initiates the cancellation of an ongoing coordination action.
        See clause 12.4.4.3.1.
      responses:
        202:
          $ref: '#/components/responses/CoordinationActionCancel.Post.202'
        400:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/400
        401:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/401
        403:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/403
        404:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/404
        405:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/405
        406:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/406
        409:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/409
        416:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/416
        500:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/500
        503:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/503
        504:
          $ref: ../responses/SOL005_resp.yaml#/components/responses/504

components:
  parameters:
    CoordinationId:
      name: coordinationId
      in: path
      description: |
        Identifier of the LCM coordination.

        NOTE: This identifier can be retrieved from the resource referenced by the 
              "Location" HTTP header in the response to a POST request to the 
              "Coordinations" resource.
      required: true
      style: simple
      explode: false
      schema:
        type: string

  requestBodies:
    LcmCoordRequest:
      description: |
        Parameters for the coordination action as defined in clause 12.5.2.2.
      content:
        application/json:
          schema:
            $ref: ./definitions/SOL005NSLCMCoordination_def.yaml#/definitions/LcmCoordRequest
      required: true

  responses:
    CoordinationActions.Post.201:
      description: |
        201 CREATED

        Shall be returned when the API producer has chosen the synchronous mode, which may be 
        chosen for coordination actions that finish within the time frame in which an HTTP 
        response is expected.
        
        The response body shall contain an LcmCoord data structure that represents the result 
        of the coordination action.
        The HTTP response shall include a "Location" HTTP header that indicates the URI of the 
        "Individual coordination action" resource that has been created as the result of the 
        finished coordination procedure.
      headers:
        Version:
          description: The used API version.
          style: simple
          explode: false
          schema:
            type: string
        WWW-Authenticate:
          description: |
            Challenge if the corresponding HTTP request has not provided authorization, or error details if the
            corresponding HTTP request has provided an invalid authorization token.
          style: simple
          explode: false
          schema:
            type: string
        Location:
          description: The resource URI of the created VNF Snapshot Package.
          style: simple
          explode: false
          schema:
            type: string
            format: url
        Content-Type:
          description: The MIME type of the body of the response.
          style: simple
          explode: false
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: definitions/SOL005NSLCMCoordination_def.yaml#/definitions/LcmCoord

    CoordinationActions.Post.202:
      description: |
        202 ACCEPTED

        Shall be returned when the API producer has chosen the asynchronous mode and 
        the request has been accepted for processing.

        The response body shall be empty.
        
        The HTTP response shall include a "Location" HTTP header that indicates the 
        URI of the "Individual coordination action" resource that will be created 
        once the coordination operation has finished successfully.
      headers:
        Version:
          description: The used API version.
          style: simple
          explode: false
          schema:
            type: string
        WWW-Authenticate:
          description: |
            Challenge if the corresponding HTTP request has not provided authorization, or error details if the
            corresponding HTTP request has provided an invalid authorization token.
          style: simple
          explode: false
          schema:
            type: string
        Location:
          description: The resource URI of the created VNF Snapshot Package.
          style: simple
          explode: false
          schema:
            type: string
            format: url
        Content-Type:
          description: The MIME type of the body of the response.
          style: simple
          explode: false
          schema:
            type: string

    IndividualCoordinationAction.Get.200:
      description: |
        200 OK

        Shall be returned when the coordination is finished and the coordination result 
        has been read successfully.
        A representation of the "Individual coordination action" resource shall be returned 
        in the response body.
      headers:
        Version:
          description: The used API version.
          style: simple
          explode: false
          schema:
            type: string
        WWW-Authenticate:
          description: |
            Challenge if the corresponding HTTP request has not provided authorization, or error details if the
            corresponding HTTP request has provided an invalid authorization token.
          style: simple
          explode: false
          schema:
            type: string
        Content-Type:
          description: The MIME type of the body of the response.
          style: simple
          explode: false
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: definitions/SOL005NSLCMCoordination_def.yaml#/definitions/LcmCoord

    IndividualCoordinationAction.Post.202:
      description: |
        202 ACCEPTED

        Shall be returned when the management operation with which coordination is requested 
        is still ongoing or in the process of being cancelled, i.e. no coordination result is
        available yet.
        
        The response body shall be empty.
      headers:
        Version:
          description: The used API version.
          style: simple
          explode: false
          schema:
            type: string
        WWW-Authenticate:
          description: |
            Challenge if the corresponding HTTP request has not provided authorization, or error details if the
            corresponding HTTP request has provided an invalid authorization token.
          style: simple
          explode: false
          schema:
            type: string
        Content-Type:
          description: The MIME type of the body of the response.
          style: simple
          explode: false
          schema:
            type: string

    CoordinationActionCancel.Post.202:
      description: |
        202 ACCEPTED

        Shall be returned when the cancellation request has been accepted for processing.
        
        The response shall have an empty payload body.
      headers:
        Version:
          description: The used API version.
          style: simple
          explode: false
          schema:
            type: string
        WWW-Authenticate:
          description: |
            Challenge if the corresponding HTTP request has not provided authorization, or error details if the
            corresponding HTTP request has provided an invalid authorization token.
          style: simple
          explode: false
          schema:
            type: string
        Content-Type:
          description: The MIME type of the body of the response.
          style: simple
          explode: false
          schema:
            type: string

      
 No newline at end of file
+183 −0
Original line number Diff line number Diff line
definitions:
  LcmCoordRequest:
    description: |
      This type represents an LCM coordination request. 
      It shall comply with the provisions defined in table 12.5.2.2-1.

      NOTE: How to determine the supported coordination actions is outside 
            the scope of the present version of this document.
    type: object
    required:
      - nsInstanceId
      - nsLcmOpOccId
      - lcmOperationType
      - coordinationActionName
      - _links
    properties:
      nsInstanceId:
        description: |
          Identifier of the NS instance which this coordination request is related to.
        $ref: "../../definitions/SOL005_def.yaml#/definitions/Identifier"
      nsLcmOpOccId:
        description: |
          The identifier of the NS lifecycle management operation occurrence related 
          to the coordination.
        $ref: "../../definitions/SOL005_def.yaml#/definitions/Identifier"
      lcmOperationType:
        description: |
          Indicates the type of the LCM operation with which coordination is requested. 
          Shall be the same as the value of the "lcmOperationType" attribute in the 
          NsLcmOpOcc structure that is referenced by the "nsLcmOpOccId".
        $ref: "#/definitions/LcmOperationForCoordType"
      coordinationActionName:
        description: |
          Indicates the LCM coordination action. 
          
          See note.
        $ref: "../../definitions/SOL005_def.yaml#/definitions/IdentifierInNsd"
      inputParams:
        description: |
          Additional input parameters passed as input to the coordination action.
        $ref: "../../definitions/SOL005_def.yaml#/definitions/KeyValuePairs"
      _links:
        description: |
          Links to resources related to this request.
        type: object
        required:
          - nsLcmOpOcc
          - nsInstance
        properties:
          nsLcmOpOcc:
            description: |
              Related lifecycle management operation occurrence.
            $ref: "../../definitions/SOL005_def.yaml#/definitions/Link"
          nsInstance:
            description: |
              Related NS instance.
            $ref: "../../definitions/SOL005_def.yaml#/definitions/Link"       

  LcmCoord:
    description: |
      This type represents an LCM coordination result. It shall comply with the provisions 
      defined in table 12.5.2.3-1.

      NOTE: How to determine the supported coordination actions is outside the scope of the 
            present version of this document.
    required:
      - id
      - coordinationResult
      - nsInstanceId
      - nsLcmOpOccId
      - lcmOperationType
      - coordinationActionName
      - _links
    properties:
      id:
        description: |
          Identifier of this coordination result.
        $ref: "../../definitions/SOL005_def.yaml#/definitions/Identifier"
      coordinationResult:
        description: |
          The result of executing the coordination action which also implies the action to 
          be performed by the NFVO as the result of this coordination.
        $ref: "#/definitions/LcmCoordResultType"
      nsInstanceId:
        description: |
          Identifier of the NS instance which this coordination request is related to.
        $ref: "../../definitions/SOL005_def.yaml#/definitions/Identifier"
      nsLcmOpOccId:
        description: |
          The identifier of the NS lifecycle management operation occurrence related 
          to the coordination.
        $ref: "../../definitions/SOL005_def.yaml#/definitions/Identifier"
      lcmOperationType:
        description: |
          Indicates the type of the LCM operation with which coordination is requested. 
          Shall be the same as the value of the "lcmOperationType" attribute in the 
          NsLcmOpOcc structure that is referenced by the "nsLcmOpOccId".
        $ref: "#/definitions/LcmOperationForCoordType"
      coordinationActionName:
        description: |
          Indicates the actual LCM coordination action.
          
          See note.
        $ref: "../../definitions/SOL005_def.yaml#/definitions/String"
      outputParams:
        description: |
          Additional parameters returned by the coordination action, e.g. on the reason 
          for the indicated coordinationResult.
        $ref: "../../definitions/SOL005_def.yaml#/definitions/KeyValuePairs"
      warnings:
        description: |
          Warning messages that were generated while the operation was executing.
        $ref: "../../definitions/SOL005_def.yaml#/definitions/String"
      error:
        description: |
          Error information related to the coordination.

          This attribute shall be present if "coordinationResult" is "ABORT" and may be 
          present if "coordinationResult" is "CANCELLED".
          
          If provided, the error information should be represented in the "error" attribute 
          of the related NsLcmOpOcc data structure.
        $ref: "../../definitions/SOL005_def.yaml#/definitions/ProblemDetails"
      _links:
        description: |
          Links to resources related to this resource.
        type: object
        required:
          - self
          - nsLcmOpOcc
          - nsInstance
        properties:
          self:
            description: |
              URI of this resource.
            $ref: "../../definitions/SOL005_def.yaml#/definitions/Link"
          nsLcmOpOcc:
            description: |
              Related lifecycle management operation occurrence.
            $ref: "../../definitions/SOL005_def.yaml#/definitions/Link"
          nsInstance:
            description: |
              Related NS instance.
            $ref: "../../definitions/SOL005_def.yaml#/definitions/Link"

  LcmOperationForCoordType:
    description: |
      The enumeration LcmOperationForCoordType defines the permitted values to represent 
      NS lifecycle operation types in NS LCM operation coordination actions. 
      It shall comply with the provisions defined in table 12.5.4.3-1.

      - INSTANTIATE: Represents the "Instantiate NS" LCM operation.
      - SCALE: Represents the "Scale NS" LCM operation.
      - UPDATE: Represents the "Update NS" LCM operation.
      - TERMINATE: Represents the "Terminate NS" LCM operation. 
      - HEAL: Represents the "Heal NS" LCM operation.
    type: string
    enum:
      - INSTANTIATE
      - SCALE
      - UPDATE
      - TERMINATE
      - HEAL

  LcmCoordResultType:
    description: |
      The enumeration LcmCoordResultType defines the permitted values to represent the result 
      of executing an LCM coordination action. The coordination result also implies the action 
      to be performed by the NFVO as the follow-up to this coordination. The LcmCoordResultType 
      shall comply with the provisions defined in table 12.5.4.3.-1.

      - CONTINUE: The related LCM operation shall be continued, staying in the state "PROCESSING".
      - ABORT: The related LCM operation shall be aborted by transitioning into the state "FAILED_TEMP".
      - CANCELLED: The coordination action has been cancelled upon request of the API consumer, 
                   i.e. the NFVO. The related LCM operation shall be aborted by transitioning into 
                   the state "FAILED_TEMP".
    type: string
    enum:
      - CONTINUE
      - ABORT
      - CACELLED