MEC010-2_AppGrant.json 30.9 KB
Newer Older
  "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.1.1",
    "license": {
      "name": "BSD-3-Clause",
      "url": "https://forge.etsi.org/legal-matters"
Elian Kraja's avatar
Elian Kraja committed
    },
    "contact": {
      "name": "ETSI Forge",
      "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.1.1",
    "url": "https://www.etsi.org/deliver/etsi_gs/MEC/001_099/01002/02.01.01_60/gs_MEC01002v020101p.pdf"
  },
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
      "url": "https://localhost/granting/v1",
      "variables": {}
    }
  ],
  "tags": [
    {
      "name": "granting",
      "description": "Grant operations"
    }
  ],
  "paths": {
    "/grants": {
      "post": {
        "tags": [
          "granting"
        ],
        "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"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "grant was created successfully (synchronous mode)",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Grant"
            "description": "the request was accepted for processing",
            "headers": {},
            "content": {}
            "description": "Bad Request : used to indicate that incorrect parameters were passed to the request.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
            "description": "Unauthorized :  used when the client did not submit credentials.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
            "description": "Forbidden :  operation is not allowed given the current status of the resource.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
            "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"
                }
              }
            }
            "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"
                }
              }
            }
            "description": "Too Many Requests : used when a rate limiter has triggered.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
        },
        "deprecated": false
      },
      "parameters": []
    },
    "/grants/{grantId}": {
      "get": {
        "tags": [
          "granting"
        "summary": "read the grant",
        "description": "read the grant",
        "operationId": "GrantGET",
        "parameters": [
          {
            "name": "grantId",
            "in": "path",
            "description": "Identifier of the individual grant.",
            "required": true,
            "style": "simple",
            "schema": {
              "type": "string"
            }
          }
        ],
            "description": "A representation of the \"individual grant\" resource",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Grant"
            "description": "returned when the process of creating the grant is ongoing, no grant is available yet",
            "headers": {},
            "content": {}
            "description": "Bad Request : used to indicate that incorrect parameters were passed to the request.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
            "description": "Unauthorized :  used when the client did not submit credentials.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
            "description": "Forbidden :  operation is not allowed given the current status of the resource.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
            "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"
                }
              }
            }
            "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"
                }
              }
            }
            "description": "Too Many Requests : used when a rate limiter has triggered.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
        },
        "deprecated": false
      },
      "parameters": []
    }
  },
  "components": {
    "schemas": {
      "AppExtCpConfig": {
        "title": "AppExtCpConfig",
        "type": "object",
        "properties": {
          "cpInstanceId": {
            "type": "string",
            "description": "Identifier of the external CP instance to which this set of configuration parameters is requested to be applied. \n\nShall be present if this instance has already been created."
            "minItems": 0,
            "type": "array",
            "items": {
              "$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",
            "description": "Identifier of a pre-configured link port to which the external CP will be associated. See note."
        "title": "AppExtCpData",
        "required": [
          "cpConfig",
          "cpdId"
        ],
        "type": "object",
        "properties": {
          "cpConfig": {
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AppExtCpConfig"
            },
            "description": "List of instance data that need to be configured on the CP instances created from the respective CPD."
            "description": "The identifier of the CPD in the AppD."
      },
      "ResourceDefinition.Type": {
        "title": "ResourceDefinition.Type",
        "enum": [
          "COMPUTE",
          "VL",
          "STORAGE",
          "LINKPORT"
        ],
        "type": "string",
        "description": "Type of the resource definition referenced.",
        "examples": [
          "COMPUTE"
        "title": "CpProtocolData",
        "required": [
          "layerProtocol"
        ],
        "type": "object",
        "properties": {
          "ipOverEthernet": {
            "$ref": "#/components/schemas/IpOverEthernetAddressData"
          },
          "layerProtocol": {
            "$ref": "#/components/schemas/IpOverEthernetAddressData"
          }
        }
      },
      "ExtLinkPortData": {
        "title": "ExtLinkPortData",
          "id",
          "resourceHandle"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "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",
          "extCps",
          "resourceId"
        ],
        "type": "object",
        "properties": {
          "extCps": {
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AppExtCpData"
            },
            "description": "External CPs of the application instance to be connected to this external VL."
            "minItems": 0,
            "type": "array",
            "items": {
              "$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."
            "description": "The identifier of the external VL instance. The identifier is assigned by the MEC entity that manages this VL instance."
          },
          "resourceId": {
            "type": "string",
            "description": "The identifier of the resource in the scope of the VIM."
          },
          "vimConnectionId": {
            "type": "string",
            "description": "Identifier of the VIM connection to manage this resource."
        "title": "Grant",
        "required": [
          "id",
          "appInstanceId",
          "appLcmOpOccId",
          "_links"
        ],
        "type": "object",
            "type": "string"
            "type": "string",
            "description": "Identifier of application instance."
            "type": "string",
            "description": "Identifier of application lifecycle management operation occurrence."
          },
          "vimConnections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VimConnectionInfo"
            },
            "description": ""
          "zones": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ZoneInfo"
            },
            "description": ""
          "zoneGroups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ZoneGroupInfo"
            },
            "description": ""
          },
          "addResources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GrantInfo"
            },
            "description": ""
          },
          "tempResources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GrantInfo"
            },
            "description": ""
          },
          "removeResources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GrantInfo"
            },
            "description": ""
          "updateResources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GrantInfo"
            },
            "description": ""
          },
          "vimAssets": {
            "$ref": "#/components/schemas/VimAssets"
          },
          "extVirtualLinks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExtVirtualLinkData"
            },
            "description": ""
            "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"
        },
        "description": "'This type represents a grant. Refer to clause 9.5.2.3 of ETSI GS NFV-SOL 003 '"
        "title": "VimAssets",
        "type": "object",
        "properties": {
          "softwareImages": {
            "type": "array",
            "items": {
              "$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."
        "title": "Grant.links",
        "required": [
          "appLcmOpOcc",
          "appInstance"
        ],
        "type": "object",
        "properties": {
          "appLcmOpOcc": {
            "$ref": "#/components/schemas/LinkType"
          },
          "appInstance": {
            "$ref": "#/components/schemas/LinkType"
        },
        "description": "Links to resources related to this resource."
        "title": "GrantInfo",
        "required": [
          "resourceDefinitionId"
        ],
        "type": "object",
        "properties": {
          "resourceDefinitionId": {
            "type": "string",
            "description": "Identifier of the related \"ResourceDefinition\" structure from the related \"GrantRequest\" structure."
          },
          "resourceGroupId": {
            "type": "string",
            "description": "Identifier of the \"infrastructure resource group\", logical grouping of virtual resources assigned to a tenant within an Infrastructure Domain, to be provided when allocating the resource.If the VIM connection referenced by \"vimConnectionId\" applies to multiple infrastructure resource groups, this attribute shall be present for new resources.If the VIM connection referenced by \"vimConnectionId\" applies to a single infrastructure resource group, this attribute may be present for new resources. This attribute shall be absent for resources that have already been allocated."
          },
          "vimConnectionId": {
            "type": "string",
            "description": "Identifier of the VIM connection to be used to manage this resource. Shall be present for new resources, and shall be absent for resources that have already been allocated."
            "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."
        "title": "GrantRequest",
        "required": [
          "appInstanceId",
          "appLcmOpOccId",
          "appDId",
          "operation",
          "_links"
        ],
        "type": "object",
        "properties": {
          "appInstanceId": {
            "type": "string",
            "description": "Identifier of application instance."
            "type": "string",
            "description": "Identifier of application lifecycle management operation occurrence."
            "type": "string",
            "description": "Identifier of this MEC application descriptor. This attribute shall be globally unique."
          },
          "operation": {
            "$ref": "#/components/schemas/GrantRequest.Operation"
          },
          "addResources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceDefinition"
            },
            "description": ""
          },
          "tempResources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceDefinition"
            },
            "description": ""
          "removeResources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceDefinition"
            },
            "description": ""
          "updateResources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceDefinition"
            },
            "description": ""
            "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"
        },
        "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": [
          "INSTANTIATE",
          "OPERATE",
          "TERMINATE"
        ],
        "type": "string",
        "description": "'The lifecycle management operation for which granting is requested'",
        "examples": [
          "INSTANTIATE"
        "title": "GrantRequest.links",
        "required": [
          "appLcmOpOcc",
          "appInstance"
        ],
        "type": "object",
        "properties": {
          "appLcmOpOcc": {
            "$ref": "#/components/schemas/LinkType"
          },
          "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'"
            "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'"
        "title": "IpAddress",
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/IpAddress.Type"
          },
          "fixedAddresses": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Fixed addresses to assign (from the subnet defined by subnetId if provided)."
            "type": "integer",
            "description": "Number of dynamic addresses to assign (from the subnet defined by subnetId if provided)",
            "contentEncoding": "int32"
          },
          "addressRange": {
            "$ref": "#/components/schemas/AddressRange"
            "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.'"
        "title": "IpAddress.Type",
        ],
        "type": "string",
        "description": "The type of the IP addresses.",
        "examples": [
          "IPV4"
        "title": "AddressRange",
        "required": [
          "minAddress",
          "maxAddress"
        ],
        "type": "object",
        "properties": {
          "minAddress": {
            "type": "string",
            "description": "Lowest IP address belonging to the range."
          },
          "maxAddress": {
            "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": [
          "href"
        ],
        "type": "object",
        "properties": {
          "href": {
            "type": "string",
            "description": "URI referring to a resource"
          }
        }
        "title": "ProblemDetails",
        "type": "object",
        "properties": {
          "detail": {
            "type": "string",
            "description": "A human-readable explanation specific to this occurrence of the problem"
          },
          "instance": {
            "type": "string",
            "description": "A URI reference that identifies the specific occurrence of the problem"
Elian Kraja's avatar
Elian Kraja committed
          },
          "status": {
            "type": "integer",
            "description": "The HTTP status code for this occurrence of the problem",
            "contentEncoding": "int32"
            "description": "A short, human-readable summary of the problem type"
            "description": "A URI reference according to IETF RFC 3986 that identifies the problem type"
        "title": "ResourceDefinition",
        "required": [
          "id",
          "type",
          "resourceTemplateId",
          "resource"
        ],
        "type": "object",
            "type": "string",
            "description": "Identifier of the related ResourceDefinition structure from the related GrantRequest structure."
          },
          "type": {
            "$ref": "#/components/schemas/ResourceDefinition.Type"
          },
          "vduId": {
            "type": "string",
            "description": "Reference to the related VDU in the AppD applicable to this resource."
            "type": "string",
            "description": "Reference to a resource template, i.e. VirtualLinkDesc, VirtualComputeDesc, AppExtCpd, VirtualStorageDesc in the AppD."
          },
          "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 '"
        "title": "Resource",
        "required": [
          "vimConnectionInfo",
          "resourceId"
        ],
        "type": "object",
        "properties": {
          "vimConnectionInfo": {
            "$ref": "#/components/schemas/VimConnectionInfo"
            "type": "string",
            "description": "Identifier of the resource in the scope of the VIM."
        },
        "description": "Resource information for an existing resource"
        "title": "ResourceHandle",
        "required": [
          "resourceId"
        ],
        "type": "object",
        "properties": {
          "resourceId": {
            "type": "string",
            "description": "Identifier of the resource in the scope of the VIM."
          },
          "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."
        }
      },
      "VimConnectionInfo": {
        "title": "VimConnectionInfo",
          "id",
          "vimType"
        ],
        "type": "object",
        "properties": {
          "accessInfo": {
            "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'"
            "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'"
            "description": "The identifier of the VIM Connection. This identifier is managed by the MEO."
            "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'"
            "description": "The identifier of the VIM instance. This identifier is managed by the MEO.Shall be present to address additional information about the VIM if such information has been configured into the MEPM by means outside the scope of the present document, and should be absent otherwise."
          "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",
          "appDSoftwareImageId",
          "vimSoftwareImageId"
        ],
        "type": "object",
        "properties": {
          "appDSoftwareImageId": {
            "type": "string",
            "description": "Identifier which references the software image descriptor in the AppD."
Elian Kraja's avatar
Elian Kraja committed
          },
          "vimConnectionId": {
            "type": "string",
            "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)."
        }
      },
      "ZoneGroupInfo": {
        "title": "ZoneGroupInfo",
          "zoneId"
        ],
        "type": "object",
        "properties": {
          "zoneId": {
            "minItems": 1,
            "type": "array",
            "description": "References of identifiers of \"ZoneInfo\" structures, each of which provides information about a resource zone that belongs to this group."
        }
      },
      "ZoneInfo": {
        "title": "ZoneInfo",
          "id",
          "zoneId"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The identifier of this ZoneInfo instance, for the purpose of referencing it from other structures in the \"Grant\" structure."
            "type": "string"
            "description": "The identifier of the resource zone, as managed by the resource management layer (typically, the VIM)."
  },
  "security": [
    {}
  ]