Commit 4d2eb0b6 authored by Muhammad Umair Zafar's avatar Muhammad Umair Zafar
Browse files

mention all responses under components tag

parent 28504f3e
Loading
Loading
Loading
Loading
Loading
+163 −101
Original line number Diff line number Diff line
openapi: 3.1.0
info:
  title: "ETSI GS MEC 010-2 - Part 2: Application lifecycle, rules and requirements management"
  description: "ETSI GS MEC 010-2 - Part 2: Application lifecycle, rules and requirements management described using OpenAPI."
  version: "2.2.1"
  title: 'ETSI GS MEC 010-2 - Part 2: Application lifecycle, rules and requirements management'
  description: 'ETSI GS MEC 010-2 - Part 2: Application lifecycle, rules and requirements management described using OpenAPI.'
  version: '3.0.1'
  license:
    name: BSD-3-Clause
    url: https://forge.etsi.org/legal-matters
@@ -11,8 +11,8 @@ info:
    url: https://forge.etsi.org/rep/mec/gs010-2-app-pkg-lcm-api
    email: cti_support@etsi.org
externalDocs:
  description: "ETSI GS MEC 010-2 - Part 2: Application lifecycle, rules and requirements management, v2.2.1"
  url: "https://www.etsi.org/deliver/etsi_gs/MEC/001_099/01002/02.02.01_60/gs_MEC01002v020201p.pdf"
  description: "ETSI GS MEC 010-2 - Part 2: Application lifecycle, rules and requirements management, v3.0.1"
  url: 'https://www.etsi.org/deliver/etsi_gs/MEC/001_099/01002/03.00.01_60/gs_MEC01002v030001p.pdf'
jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
servers:
  - url: https://localhost/granting/v1
@@ -47,48 +47,18 @@ paths:
          description: the request was accepted for processing
          headers: {}
          content: {}
        "400":
          description: "Bad Request : used to indicate that incorrect parameters were passed to the request."
          headers: {}
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
        "401":
          description: "Unauthorized :  used when the client did not submit credentials."
          headers: {}
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
        "403":
          description: "Forbidden :  operation is not allowed given the current status of the resource."
          headers: {}
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
        "404":
          description: "Not Found :  used when a client provided a URI that cannot be mapped to a valid resource URI."
          headers: {}
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
        "406":
          description: "Not Acceptable : used to indicate that the server cannot provide the any of the content formats supported by the client."
          headers: {}
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
        "429":
          description: "Too Many Requests : used when a rate limiter has triggered."
          headers: {}
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '406':
          $ref: '#/components/responses/406'
        '429':
          $ref: '#/components/responses/429'
      deprecated: false
    parameters: []
  /grants/{grantId}:
@@ -118,48 +88,18 @@ paths:
          description: returned when the process of creating the grant is ongoing, no grant is available yet
          headers: {}
          content: {}
        "400":
          description: "Bad Request : used to indicate that incorrect parameters were passed to the request."
          headers: {}
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
        "401":
          description: "Unauthorized :  used when the client did not submit credentials."
          headers: {}
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
        "403":
          description: "Forbidden :  operation is not allowed given the current status of the resource."
          headers: {}
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
        "404":
          description: "Not Found :  used when a client provided a URI that cannot be mapped to a valid resource URI."
          headers: {}
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
        "406":
          description: "Not Acceptable : used to indicate that the server cannot provide the any of the content formats supported by the client."
          headers: {}
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
        "429":
          description: "Too Many Requests : used when a rate limiter has triggered."
          headers: {}
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '406':
          $ref: '#/components/responses/406'
        '429':
          $ref: '#/components/responses/429'
      deprecated: false
    parameters: []
components:
@@ -179,6 +119,7 @@ components:
        linkPortId:
          type: string
          description: Identifier of a pre-configured link port to which the external CP will be associated. See note.

    AppExtCpData:
      title: AppExtCpData
      required:
@@ -194,6 +135,7 @@ components:
        cpdId:
          type: string
          description: The identifier of the CPD in the AppD.

    ResourceDefinition.Type:
      title: ResourceDefinition.Type
      enum:
@@ -207,6 +149,7 @@ components:
        NOTE: This permitted value reflects the ETSI NFV interpretation of the cloud native workloads.
      examples:
        - COMPUTE

    CpProtocolData:
      title: CpProtocolData
      required:
@@ -214,9 +157,18 @@ components:
      type: object
      properties:
        ipOverEthernet:
        items:
          $ref: "#/components/schemas/IpOverEthernetAddressData"
        description: Network address data for IP over Ethernet to assign to the extCP instance. Shall be present if layerProtocol is equal to "IP_OVER_ETHERNET", and shall be absent otherwise.
        layerProtocol:
          items:
            $ref: "#/components/schemas/IpOverEthernetAddressData"
          description: |
            "Identifier of layer(s) and protocol(s). Permitted values: IP_OVER_ETHERNET. See note."
            NOTE: This attribute allows to signal the addition of further types of layer and protocol in future versions of the present 
            document in a backwards-compatible way. In the current version of the present document, only IP over 
            Ethernet is supported.

    ExtLinkPortData:
      title: ExtLinkPortData
      required:
@@ -229,6 +181,7 @@ components:
          description: Identifier of this link port as provided by the entity that has created the link port.
        resourceHandle:
          $ref: "#/components/schemas/ResourceHandle"

    ExtVirtualLinkData:
      title: ExtVirtualLinkData
      required:
@@ -322,6 +275,7 @@ components:
        _links:
          $ref: "#/components/schemas/Grant.links"
      description: "'This type represents a grant. Refer to clause 9.5.2.3 of ETSI GS NFV-SOL 003 '"

    VimAssets:
      title: VimAssets
      type: object
@@ -332,6 +286,7 @@ components:
            $ref: "#/components/schemas/VimSoftwareImage"
          description: ""
      description: Information about assets for the application that are managed by the MEO in the VIM, such as software images.

    Grant.links:
      title: Grant.links
      required:
@@ -344,6 +299,7 @@ components:
        appInstance:
          $ref: "#/components/schemas/LinkType"
      description: Links to resources related to this resource.

    GrantInfo:
      title: GrantInfo
      required:
@@ -369,6 +325,8 @@ components:
            NOTE: This attribute reflects the ETSI NFV interpretation of the cloud native workloads.
        mcioConstraints:
          type: object
          items:
            $ref: '#/components/schemas/KeyValuePair'
          description: >
            "'This data type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key-value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 8259'"
            NOTE: This attribute reflects the ETSI NFV interpretation of the cloud native workloads.
@@ -416,10 +374,13 @@ components:
          description: ""
        additionalParams:
          type: object
          items:
            $ref: '#/components/schemas/KeyValuePair'
          description: "'This data type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key-value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 8259'"
        _links:
          $ref: "#/components/schemas/GrantRequest.links"
      description: "'This type represents a grant request. Refer to clause 9.5.2.2 of ETSI GS NFV-SOL 003'"

    GrantRequest.Operation:
      title: GrantRequest.Operation
      enum:
@@ -430,6 +391,7 @@ components:
      description: "'The lifecycle management operation for which granting is requested'"
      examples:
        - INSTANTIATE

    GrantRequest.links:
      title: GrantRequest.links
      required:
@@ -442,19 +404,32 @@ components:
        appInstance:
          $ref: "#/components/schemas/LinkType"
      description: Links to resources related to this resource.

    IpOverEthernetAddressData:
      title: IpOverEthernetAddressData
      type: object
      properties:
        macAddress:
          type: string
          description: "'MAC address. If this attribute is not present, it shall be chosen by the VIM'"
          description: |
            "'MAC address. If this attribute is not present, it shall be chosen by the VIM. See note 1.'"
            NOTE 1: At least one of "macAddress" or "ipAddresses" shall be present.
        ipAddresses:
          type: array
          items:
            $ref: "#/components/schemas/IpAddress"
          description: List of IP addresses to assign to the CP instance. Each entry represents IP address data for fixed or dynamic IP address assignment per subnet.
      description: "'This type represents network address data for IP over Ethernet. Refer to clause 4.4.1.10c of ETSI GS NFV SOL 003'"
          description: |
            List of IP addresses to assign to the CP instance. Each entry represents IP address data for fixed or dynamic IP address assignment per subnet. If this attribute is not present, no IP address shall be assigned. See note 1.
            NOTE 1:  At least one of "macAddress" or "ipAddresses" shall be present

    KeyValuePair:
      type: object
      properties:
        key:
          type: string
        value:
          type: string

    IpAddress:
      title: IpAddress
      required:
@@ -478,6 +453,7 @@ components:
          type: string
          description: Subnet defined by the identifier of the subnet resource in the VIM.
      description: "'IP addresses to assign to the CP instance. Each entry represents IP address data for fixed or dynamic IP address assignment per subnet.'"

    IpAddress.Type:
      title: IpAddress.Type
      enum:
@@ -487,6 +463,7 @@ components:
      description: The type of the IP addresses.
      examples:
        - IPV4

    AddressRange:
      title: AddressRange
      required:
@@ -501,6 +478,7 @@ components:
          type: string
          description: Highest IP address belonging to the range.
      description: An IP address range to be used, e.g. in case of egress connections.

    LinkType:
      title: LinkType
      required:
@@ -510,6 +488,7 @@ components:
        href:
          type: string
          description: URI referring to a resource

    ProblemDetails:
      title: ProblemDetails
      type: object
@@ -530,6 +509,7 @@ components:
        type:
          type: string
          description: A URI reference according to IETF RFC 3986 that identifies the problem type

    ResourceDefinition:
      title: ResourceDefinition
      required:
@@ -562,6 +542,7 @@ components:
        resource:
          $ref: "#/components/schemas/Resource"
      description: "'This type provides information of an existing or proposed resource used by the application. Refer to clause 9.5.3.2 of ETSI GS NFV-SOL 003 '"

    Resource:
      title: Resource
      required:
@@ -575,6 +556,7 @@ components:
          type: string
          description: Identifier of the resource in the scope of the VIM.
      description: Resource information for an existing resource

    ResourceHandle:
      title: ResourceHandle
      required:
@@ -583,7 +565,14 @@ components:
      properties:
        resourceId:
          type: string
          description: Identifier of the resource in the scope of the VIM or the CISM or the resource provider. See note 2.
          description: |
            Identifier of the resource in the scope of the VIM or the CISM or the resource provider. See note 2.
            NOTE 2: When the container infrastructure service is a Kubernetes® instance the resourceId shall be populated in the following way
              - For a compute MCIO, it is the instance identifier that Kubernetes® assigns, which is unique cluster wide per resource type.
              - For a storage MCIO modelled as a persistent volume claim, it is the name of the persistent volume claim, 
              i.e. the value of the 'claimName' field in the Kubernetes® manifest, or a compound name built by 
              Kubernetes® if the persistent volume claim is defined inline in another template instead of in its own manifest.
              - For a network MCIO representing a NetworkAttachmentDefinition, a Service or an Ingress, it is the value of the 'metadata.name' field in Kubernetes® manifest
        vimConnectionId:
          type: string
          description: Identifier of the VIM connection to manage the resource.The applicable "VimConnectionInfo" structure, which is referenced by vimConnectionId, can be obtained from the "vimConnectionInfo" attribute of the "AppInstance" structure.
@@ -592,12 +581,7 @@ components:
          description: >
            Type of the resource in the scope of the VIM. See note 1.
            NOTE 1: The value set of the "vimLevelResourceType" attribute is within the scope of the VIM and can be used as information that complements the ResourceHandle. This value set is different from the value set of the "type" attribute in the ResourceDefinition.
            NOTE 2: When the container infrastructure service is a Kubernetes® instance the resourceId shall be populated in the following way
              - For a compute MCIO, it is the instance identifier that Kubernetes® assigns, which is unique cluster wide per resource type.
              - For a storage MCIO modelled as a persistent volume claim, it is the name of the persistent volume claim, 
              i.e. the value of the 'claimName' field in the Kubernetes® manifest, or a compound name built by 
              Kubernetes® if the persistent volume claim is defined inline in another template instead of in its own manifest.
              - For a network MCIO representing a NetworkAttachmentDefinition, a Service or an Ingress, it is the value of the 'metadata.name' field in Kubernetes® manifest

    VimConnectionInfo:
      title: VimConnectionInfo
      required:
@@ -607,15 +591,21 @@ components:
      properties:
        accessInfo:
          type: object
          items:
            $ref: "#/components/schemas/KeyValuePair"
          description: "'This data type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key-value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 8259'"
        extra:
          type: object
          items:
            $ref: "#/components/schemas/KeyValuePair"
          description: "'This data type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key-value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 8259'"
        id:
          type: string
          description: The identifier of the VIM Connection. This identifier is managed by the MEO.
        interfaceInfo:
          type: object
          items:
            $ref: "#/components/schemas/KeyValuePair"
          description: "'This data type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key-value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 8259'"
        vimId:
          type: string
@@ -623,6 +613,7 @@ components:
        vimType:
          type: string
          description: Discriminator for the different types of the VIM information. The value of this attribute determines the structure of the "interfaceInfo" and "accessInfo" attributes, based on the type of the VIM.The set of permitted values is expected to change over time as new types or versions of VIMs become available.

    VimSoftwareImage:
      title: VimSoftwareImage
      required:
@@ -641,6 +632,7 @@ components:
          description: >
            Identifier of the software image in the resource management layer (i.e. VIM) See note.
            NOTE: For an OS container image, the value of this attribute is a string concatenating the name and tag of the image in the CIR separated by a colon ':' with no spaces, e.g. "dbImage:001".

    ZoneGroupInfo:
      title: ZoneGroupInfo
      required:
@@ -652,6 +644,7 @@ components:
          items:
            type: string
          description: References of identifiers of "ZoneInfo" structures, each of which provides information about a resource zone that belongs to this group.

    ZoneInfo:
      title: ZoneInfo
      required:
@@ -664,9 +657,78 @@ components:
          description: Identifier of the connection to the VIM that manages the resource zone. The applicable "VimConnectionInfo" structure, which is referenced by vimConnectionId, can be obtained from the " vimConnectionInfo" attribute of the "AppInstanceInfo" structure.
        vimConnectionId:
          type: string
          description: ""
          description: |
            "Identifier of the connection to the VIM that manages the resource zone.The applicable "VimConnectionInfo" structure, which is referenced byvimConnectionId, can be obtained from the " vimConnectionInfo"
            attribute of the "AppInstanceInfo" structure."
        zoneId:
          type: string
          description: The identifier of the resource zone, as managed by the resource management layer (typically, the VIM).

  responses:
    '200':
      description: OK
    '204':
      description: No Content
    '400':
      description: 'Bad Request : used to indicate that incorrect parameters were passed to the request.'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
    '401':
      description: 'Unauthorized :  used when the client did not submit credentials.'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
    '403':
      description: 'Forbidden :  operation is not allowed given the current status of the resource.'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
    '404':
      description: 'Not Found :  used when a client provided a URI that cannot be mapped to a valid resource URI.'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
    '406':
      description: 'Not Acceptable : used to indicate that the server cannot provide the any of the content formats supported by the client.'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
    '412':
      description: 'Precondition failed :  used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts when using PUT'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
    '414':
      description: 'URI Too Long : used to indicate that the server is refusing to process the request because the request URI is longer than the server is willing or able to process.'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
    '415':
      description: 'Unsupported Media Type :  used to indicate that the server or the client does not support the content type of the entity body.'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
    '422':
      description: 'Unprocessable Entity : used to indicate that the server understands the content type of the request entity and that the syntax of the request entity is correct but that the server is unable to process the contained instructions. This error condition can occur if an JSON request body is syntactically correct but semantically incorrect, for example if the target area for the request is considered too large. This error condition can also occur if the capabilities required by the request are not supported.'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
    '429':
      description: 'Too Many Requests: used when a rate limiter has triggered.'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'

security:
  - {}