Commit 91f2385c authored by Sana Zulfiqar's avatar Sana Zulfiqar
Browse files

new interface added VNF LCM Coordination

parent 5be61c97
Loading
Loading
Loading
Loading
Loading
+330 −0
Original line number Original line Diff line number Diff line
openapi: 3.0.2

info:
  title: SOL002 - VNF LCM Coordination interface
  description: |
    SOL002 - VNF Lifecycle 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/SOL002-SOL003/issues
  contact:
    name: NFV-SOL WG
  license:
    name: ETSI Forge copyright notice
    url: https://forge.etsi.org/etsi-forge-copyright-notice.txt
  version: 1.2.0-impl:etsi.org:ETSI_NFV_OpenAPI:1

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

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

paths:
  /api_versions:
    $ref: '../../endpoints/SOL002SOL003_endpoints.yaml#/endpoints/api-versions'

  /coordinations:
    parameters:
      - $ref: ../../components/SOL002SOL003_params.yaml#/components/parameters/Version
      - $ref: ../../components/SOL002SOL003_params.yaml#/components/parameters/Authorization
    post:
      description: |
        This POST method requests the coordination of an LCM operation occurrence with
        a management operation executed in the API producer.
      parameters:
        - $ref: ../../components/SOL002SOL003_params.yaml#/components/parameters/Accept
        - $ref: ../../components/SOL002SOL003_params.yaml#/components/parameters/ContentType
      requestBody:
        $ref: '#/components/requestBodies/LcmCoordRequest'
      responses:
        "201":
          $ref: '#/components/responses/Coordination.Post'
        "202":
          $ref: '#/components/responses/Coordination_async.Post'
        "400":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/400
        "401":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/401
        "403":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/403
        "404":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/404
        "405":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/405
        "406":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/406
        "422":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/422
        "429":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/429
        "500":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/500
        "503":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/503
        "504":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/504

  /coordinations/{coordinationId}:
    parameters:
      - $ref: '#/components/parameters/coordinationId'
      - $ref: ../../components/SOL002SOL003_params.yaml#/components/parameters/Version
      - $ref: ../../components/SOL002SOL003_params.yaml#/components/parameters/Authorization
    get:
      description: |
        The GET method reads a coordination result.
      responses:
        "200":
          $ref: '#/components/responses/IndividualLcmCoord.Get'
        "400":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/400
        "401":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/401
        "403":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/403
        "404":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/404
        "405":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/405
        "406":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/406
        "416":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/416
        "422":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/422
        "429":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/429
        "500":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/500
        "503":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/503
        "504":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/504

  /coordinations/{coordinationId}/cancel:
    parameters:
      - $ref: '#/components/parameters/coordinationId'
      - $ref: ../../components/SOL002SOL003_params.yaml#/components/parameters/Version
      - $ref: ../../components/SOL002SOL003_params.yaml#/components/parameters/Authorization
    post:
      description: |
        The POST method initiates the cancellation of an ongoing coordination action.
      responses:
        "202":
          $ref: '#/components/responses/coordinationCancel.Post'
        "400":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/400
        "401":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/401
        "403":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/403
        "404":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/404
        "405":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/405
        "406":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/406
        "409":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/409
        "416":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/416
        "422":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/422
        "429":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/429
        "500":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/500
        "503":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/503
        "504":
          $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/504

components:
  parameters:
    coordinationId:
      name: coordinationId
      in: path
      description: |
        Identifier of the LCM coordination. 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 10.5.2.2.
      content:
        application/json:
          schema:
            $ref: ./definitions/SOL002VNFLifecycleCoordination_def.yaml#/definitions/LcmCoordRequest
      required: true

  responses:
    Coordination.Post:
      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
        Content-Type:
          description: |
            The MIME type of the body of the response.
          style: simple
          explode: false
          schema:
            type: string
        Location:
          description: |
            URI of the "Individual coordination action" resource
          style: simple
          explode: false
          schema:
            type: string
            format: url
      content:
        application/json:
          schema:
            $ref: ./definitions/SOL002VNFLifecycleCoordination_def.yaml#/definitions/LcmCoord

    Coordination_async.Post:
      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
        Content-Type:
          description: |
            The MIME type of the body of the response.
          style: simple
          explode: false
          schema:
            type: string
        Location:
          description: |
            Used in redirection, or when a new resource has been created. This header field shall be present if the
            response status code is 201 or 3xx. In the present document this header field is also used if the response
            status code is 202 and a new resource was created.
          style: simple
          explode: false
          schema:
            type: string
            format: url
      content: {}

    IndividualLcmCoord.Get:
      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/SOL002VNFLifecycleCoordination_def.yaml#/definitions/LcmCoord

    coordinationCancel.Post:
      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
        Location:
          description: |
            Used in redirection, or when a new resource has been created. This header field shall be present if the
            response status code is 201 or 3xx. In the present document this header field is also used if the response
            status code is 202 and a new resource was created.
          style: simple
          explode: false
          schema:
            type: string
            format: url
      content: {}
+134 −0
Original line number Original line Diff line number Diff line
# Copyright (c) ETSI 2017.
# https://forge.etsi.org/etsi-forge-copyright-notice.txt

definitions:
  LcmCoord:
    description: >
      This type represents an LCM coordination result.
    type: object
    required:
      - id
      - coordinationResult
      - vnfInstanceId
      - vnfLcmOpOccId
      - lcmOperationType
      - coordinationActionName
      - _links
    properties:
      id:
        description: >
          Identifier of this coordination result.
        $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Identifier"
      coordinationResult:
        description: >
          The result of executing the coordination action which also implies
          the action to be performed by the VNFM as the result of this coordination.
        $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/LcmCoordResultType"
      vnfInstanceId:
        description: >
          Identifier of the VNF instance which this coordination request is related to.
        $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Identifier"
      vnfLcmOpOccId:
        description: >
          The identifier of the VNF lifecycle management operation occurrence related to the coordination.
        $ref: "../../../definitions/SOL002SOL003_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 "operation" attribute in the LcmOpOcc
          structure that is referenced by the "vnfLcmOpOccId".
        $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/LcmOperationForCoordType"
      coordinationActionName:
        description: >
          Indicates the actual LCM coordination action.
          The coordination actions that a VNF supports are declared in the VNFD.
        type: string
      outputParams:
        description: >
          Additional parameters returned by the coordination action,
          e.g. on the reason for the indicated coordinationResult.
        $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/KeyValuePairs"
      warnings:
        description: >
          Warning messages that were generated while the operation was executing.
        type: 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 VnfLcmOpOcc data structure.
        $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/ProblemDetails"
      _links:
        description: >
          Links to resources related to this resource.
        type: object
        required:
          - self
          - vnfLcmOpOcc
          - vnfInstance
        properties:
          self:
            description: >
              URI of this resource
            $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Link"
          vnfLcmOpOcc:
            description: >
              Related lifecycle management operation occurrence.
            $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Link"
          vnfInstance:
            description: >
              Related VNF instance.
            $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Link"

  LcmCoordRequest:
    type: object
    required:
      - vnfInstanceId
      - vnfLcmOpOccId
      - lcmOperationType
      - coordinationActionName
      - _links
    properties:
      vnfInstanceId:
        description: >
          Identifier of the VNF instance which this coordination request is related to.
        $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Identifier"
      vnfLcmOpOccId:
        description: >
          The identifier of the VNF lifecycle management operation occurrence related to the coordination.
        $ref: "../../../definitions/SOL002SOL003_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 "operation" attribute in the LcmOpOcc
          structure that is referenced by the "vnfLcmOpOccId".
        $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/LcmOperationForCoordType"
      coordinationActionName:
        description: >
          Indicates the LCM coordination action.
          The coordination actions that a VNF supports are declared in the VNFD.
        $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/IdentifierInVnfd"
      inputParams:
        description: >
          Additional parameters passed as input to the coordination action.
        $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/KeyValuePairs"
      _links:
        description: >
          Links to resources related to this request.
        type: object
        required:
          - vnfLcmOpOcc
          - vnfInstance
        properties:
          vnfLcmOpOcc:
            description: >
              Related lifecycle management operation occurrence.
            $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Link"
          vnfInstance:
            description: >
              Related VNF instance.
            $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Link"
+31 −0
Original line number Original line Diff line number Diff line
@@ -969,3 +969,34 @@ definitions:
      - CONTINUE
      - CONTINUE
      - ABORT
      - ABORT
      - CANCELLED
      - CANCELLED

  LcmOperationForCoordType:
    description: >
      The enumeration LcmOperationForCoordType defines the permitted values to
      represent VNF lifecycle operation types in VNF LCM operation coordination actions.
      * INSTANTIATE: Represents the "Instantiate VNF" LCM operation.
      * SCALE: Represents the "Scale VNF" LCM operation.
      * SCALE_TO_LEVEL: Represents the "Scale VNF to Level" LCM operation.
      * CHANGE_FLAVOUR: Represents the "Change VNF Flavour" LCM operation.
      * TERMINATE: Represents the "Terminate VNF" LCM operation.
      * HEAL: Represents the "Heal VNF" LCM operation.
      * OPERATE: Represents the "Operate VNF" LCM operation.
      * CHANGE_EXT_CONN: Represents the "Change external VNF connectivity" LCM operation.
      * MODIFY_INFO: Represents the "Modify VNF Information" LCM operation.
      * CREATE_SNAPSHOT: Represents the "Create VNF Snapshot" LCM operation.
      * REVERT_TO_SNAPSHOT: Represents the "Revert To VNF Snapshot" LCM operation.
      * CHANGE_VNFPKG: Represents the "Change current VNF package" LCM operation.
    type: string
    enum:
      - INSTANTIATE
      - SCALE
      - SCALE_TO_LEVEL
      - CHANGE_FLAVOUR
      - TERMINATE
      - HEAL
      - OPERATE
      - CHANGE_EXT_CONN
      - MODIFY_INFO
      - CREATE_SNAPSHOT
      - REVERT_TO_SNAPSHOT
      - CHANGE_VNFPKG
 No newline at end of file