Commit e4fd4aa0 authored by Muhammad Umair Zafar's avatar Muhammad Umair Zafar
Browse files

change AppGrant API according to MEC010-2 3.0.1v

parent 07015c2e
Loading
Loading
Loading
Loading
Loading
+192 −167
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: "2.2.1"
  license:
    name: BSD-3-Clause
    url: https://forge.etsi.org/legal-matters
@@ -12,7 +12,7 @@ info:
    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'
  url: "https://www.etsi.org/deliver/etsi_gs/MEC/001_099/01002/02.02.01_60/gs_MEC01002v020201p.pdf"
jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
servers:
  - url: https://localhost/granting/v1
@@ -25,78 +25,77 @@ paths:
    post:
      tags:
        - granting
      summary: 'requests a grant for a particular application lifecycle operation'
      summary: "requests a grant for a particular application lifecycle operation"
      description: requests a grant for a particular application lifecycle operation
      operationId: grantPOST
      parameters: []
      requestBody:

        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GrantRequest'
              $ref: "#/components/schemas/GrantRequest"
        required: true
      responses:
        '201':
        "201":
          description: grant was created successfully (synchronous mode)
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Grant'
        '202':
                $ref: "#/components/schemas/Grant"
        "202":
          description: the request was accepted for processing
          headers: {}
          content: {}
        '400':
          description: 'Bad Request : used to indicate that incorrect parameters were passed to the request.'
        "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.'
                $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.'
                $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.'
                $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.'
                $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.'
                $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'
                $ref: "#/components/schemas/ProblemDetails"
      deprecated: false
    parameters: []
  /grants/{grantId}:
    get:
      tags:
        - granting
      summary: 'read the grant'
      summary: "read the grant"
      description: read the grant
      operationId: GrantGET
      parameters:
@@ -108,59 +107,59 @@ paths:
          schema:
            type: string
      responses:
        '200':
        "200":
          description: A representation of the "individual grant" resource
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Grant'
        '202':
                $ref: "#/components/schemas/Grant"
        "202":
          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.'
        "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.'
                $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.'
                $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.'
                $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.'
                $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.'
                $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'
                $ref: "#/components/schemas/ProblemDetails"
      deprecated: false
    parameters: []
components:
@@ -175,7 +174,7 @@ components:
        cpProtocolData:
          type: array
          items:
            $ref: '#/components/schemas/CpProtocolData'
            $ref: "#/components/schemas/CpProtocolData"
          description: Parameters for configuring the network protocols on the link port that connects the CP to a VL. See note.
        linkPortId:
          type: string
@@ -190,7 +189,7 @@ components:
        cpConfig:
          type: array
          items:
            $ref: '#/components/schemas/AppExtCpConfig'
            $ref: "#/components/schemas/AppExtCpConfig"
          description: List of instance data that need to be configured on the CP instances created from the respective CPD.
        cpdId:
          type: string
@@ -199,13 +198,14 @@ components:
      title: ResourceDefinition.Type
      enum:
        - COMPUTE
      - VL
        - STORAGE
        - LINKPORT
        - OSCONTAINER, see note.
      type: string
      description: Type of the resource definition referenced.
      examples:
        - COMPUTE
      NOTE: This permitted value reflects the ETSI NFV interpretation of the cloud native workloads.
    CpProtocolData:
      title: CpProtocolData
      required:
@@ -213,9 +213,9 @@ components:
      type: object
      properties:
        ipOverEthernet:
          $ref: '#/components/schemas/IpOverEthernetAddressData'
          $ref: "#/components/schemas/IpOverEthernetAddressData"
        layerProtocol:
          $ref: '#/components/schemas/IpOverEthernetAddressData'
          $ref: "#/components/schemas/IpOverEthernetAddressData"
    ExtLinkPortData:
      title: ExtLinkPortData
      required:
@@ -227,7 +227,7 @@ components:
          type: string
          description: Identifier of this link port as provided by the entity that has created the link port.
        resourceHandle:
          $ref: '#/components/schemas/ResourceHandle'
          $ref: "#/components/schemas/ResourceHandle"
    ExtVirtualLinkData:
      title: ExtVirtualLinkData
      required:
@@ -239,12 +239,12 @@ components:
        extCps:
          type: array
          items:
            $ref: '#/components/schemas/AppExtCpData'
            $ref: "#/components/schemas/AppExtCpData"
          description: External CPs of the application instance to be connected to this external VL.
        extLinkPorts:
          type: array
          items:
            $ref: '#/components/schemas/ExtLinkPortData'
            $ref: "#/components/schemas/ExtLinkPortData"
          description: Externally provided link ports to be used to connect external connection points to this external VL. If this attribute is not present, the MEPM shall create the link ports on the external VL.
        id:
          type: string
@@ -277,49 +277,49 @@ components:
          type: array
          description: Provides information regarding VIM connections that are approved to be used by the MEPM to allocate resources, and provides parameters of these VIM connections.
          items:
            $ref: '#/components/schemas/VimConnectionInfo' 
            $ref: "#/components/schemas/VimConnectionInfo"
        zones:
          type: array
          items:
            $ref: '#/components/schemas/ZoneInfo'
          description: ''
            $ref: "#/components/schemas/ZoneInfo"
          description: ""
        zoneGroups:
          type: array
          items:
            $ref: '#/components/schemas/ZoneGroupInfo'
          description: ''
            $ref: "#/components/schemas/ZoneGroupInfo"
          description: ""
        addResources:
          type: array
          items:
            $ref: '#/components/schemas/GrantInfo'
          description: ''
            $ref: "#/components/schemas/GrantInfo"
          description: ""
        tempResources:
          type: array
          items:
            $ref: '#/components/schemas/GrantInfo'
          description: ''
            $ref: "#/components/schemas/GrantInfo"
          description: ""
        removeResources:
          type: array
          items:
            $ref: '#/components/schemas/GrantInfo'
          description: ''
            $ref: "#/components/schemas/GrantInfo"
          description: ""
        updateResources:
          type: array
          items:
            $ref: '#/components/schemas/GrantInfo'
          description: ''
            $ref: "#/components/schemas/GrantInfo"
          description: ""
        vimAssets:
          $ref: '#/components/schemas/VimAssets'
          $ref: "#/components/schemas/VimAssets"
        extVirtualLinks:
          type: array
          items:
            $ref: '#/components/schemas/ExtVirtualLinkData'
          description: ''
            $ref: "#/components/schemas/ExtVirtualLinkData"
          description: ""
        additionalParams:
          type: object
          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/Grant.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
@@ -328,8 +328,8 @@ components:
        softwareImages:
          type: array
          items:
            $ref: '#/components/schemas/VimSoftwareImage'
          description: ''
            $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
@@ -339,9 +339,9 @@ components:
      type: object
      properties:
        appLcmOpOcc:
          $ref: '#/components/schemas/LinkType'
          $ref: "#/components/schemas/LinkType"
        appInstance:
          $ref: '#/components/schemas/LinkType'
          $ref: "#/components/schemas/LinkType"
      description: Links to resources related to this resource.
    GrantInfo:
      title: GrantInfo
@@ -361,6 +361,14 @@ components:
        zoneId:
          type: string
          description: Reference to the identifier of the "ZoneInfo" structure in the "Grant" structure defining the resource zone into which this resource is to be placed. Shall be present for new resources if the zones concept is applicable to them (typically, Compute resources), and shall be absent for resources that have already been allocated.
        containerNamespace:
          type: string
          description: The value of the namespace in which the MCIOs of an application with containerized components shall be deployed. This attribute shall be present if the granted resources are managed by a CISM. The attribute shall be absent if the granted resources are not managed by a CISM. See note.
        mcioConstraints:
          type: object
          description: The constraint values to be assigned to MCIOs of an application with containerized components. The key in the key-value pair indicates the parameter name of the MCIO constraint in the MCIO declarative descriptor and shall be one of the possible enumeration values of the "mcioConstraintsParams" attribute as specified in clause 7.1.6.2.2 of ETSI GS NFV-IFA 011 [1]. The value in the key-value pair indicates the value to be assigned to the MCIO constraint. This attribute shall be present if the granted resources are managed by a CISM. The attribute shall be absent if the granted resources are not managed by a CISM. See note.
        NOTE: This attribute reflects the ETSI NFV interpretation of the cloud native workloads.

    GrantRequest:
      title: GrantRequest
      required:
@@ -381,32 +389,32 @@ components:
          type: string
          description: Identifier of this MEC application descriptor. This attribute shall be globally unique.
        operation:
          $ref: '#/components/schemas/GrantRequest.Operation'
          $ref: "#/components/schemas/GrantRequest.Operation"
        addResources:
          type: array
          items:
            $ref: '#/components/schemas/ResourceDefinition'
          description: ''
            $ref: "#/components/schemas/ResourceDefinition"
          description: ""
        tempResources:
          type: array
          items:
            $ref: '#/components/schemas/ResourceDefinition'
          description: ''
            $ref: "#/components/schemas/ResourceDefinition"
          description: ""
        removeResources:
          type: array
          items:
            $ref: '#/components/schemas/ResourceDefinition'
          description: ''
            $ref: "#/components/schemas/ResourceDefinition"
          description: ""
        updateResources:
          type: array
          items:
            $ref: '#/components/schemas/ResourceDefinition'
          description: ''
            $ref: "#/components/schemas/ResourceDefinition"
          description: ""
        additionalParams:
          type: object
          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'
          $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
@@ -426,9 +434,9 @@ components:
      type: object
      properties:
        appLcmOpOcc:
          $ref: '#/components/schemas/LinkType'
          $ref: "#/components/schemas/LinkType"
        appInstance:
          $ref: '#/components/schemas/LinkType'
          $ref: "#/components/schemas/LinkType"
      description: Links to resources related to this resource.
    IpOverEthernetAddressData:
      title: IpOverEthernetAddressData
@@ -440,7 +448,7 @@ components:
        ipAddresses:
          type: array
          items:
            $ref: '#/components/schemas/IpAddress'
            $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'"
    IpAddress:
@@ -450,7 +458,7 @@ components:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/IpAddress.Type'
          $ref: "#/components/schemas/IpAddress.Type"
        fixedAddresses:
          type: array
          items:
@@ -461,7 +469,7 @@ components:
          description: Number of dynamic addresses to assign (from the subnet defined by subnetId if provided)
          contentEncoding: int32
        addressRange:
          $ref: '#/components/schemas/AddressRange'
          $ref: "#/components/schemas/AddressRange"
        subnetId:
          type: string
          description: Subnet defined by the identifier of the subnet resource in the VIM.
@@ -531,15 +539,24 @@ components:
          type: string
          description: Identifier of the related ResourceDefinition structure from the related GrantRequest structure.
        type:
          $ref: '#/components/schemas/ResourceDefinition.Type'
          $ref: "#/components/schemas/ResourceDefinition.Type"
        vduId:
          type: string
          description: Reference to the related VDU in the AppD applicable to this resource.
        resourceTemplateId:
          type: string
          description: Reference to a resource template, i.e. VirtualComputeDescriptor, AppExtCpd, VirtualStorageDescriptor in the AppD.
          type: array
          description: |
            Reference to a resource template, in the AppD as follows:
            - If type="COMPUTE": VirtualComputeDescriptor,
            - If type="LINKPORT": AppExtCpd,
            - If type="STORAGE": VirtualStorageDescriptor
            - If type="OSCONTAINER": osContainerDescriptor
            Cardinality may be greater than "1" when
            Type ="OSCONTAINER" and multiple references to
            OsContainerDescriptor are present in the AppD. Cardinality 
            shall be "1" otherwise.
        resource:
          $ref: '#/components/schemas/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
@@ -549,7 +566,7 @@ components:
      type: object
      properties:
        vimConnectionInfo:
          $ref: '#/components/schemas/VimConnectionInfo'
          $ref: "#/components/schemas/VimConnectionInfo"
        resourceId:
          type: string
          description: Identifier of the resource in the scope of the VIM.
@@ -562,13 +579,20 @@ components:
      properties:
        resourceId:
          type: string
          description: Identifier of the resource in the scope of the VIM.
          description: Identifier of the resource in the scope of the VIM or the CISM or the resource provider. See note 2.
        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.
        vimLevelResourceType:
          type: string
          description: Type of the resource in the scope of the VIM. See note.
          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:
@@ -609,7 +633,8 @@ components:
          description: Identifier of the VIM connection to access the software image referenced in this structure.
        vimSoftwareImageId:
          type: string
          description: Identifier of the software image in the resource management layer (i.e. VIM).
          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:
@@ -633,7 +658,7 @@ 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: ""
        zoneId:
          type: string
          description: The identifier of the resource zone, as managed by the resource management layer (typically, the VIM).