From 6fda9d389ff661b43f46c5271bce25dc03e49650 Mon Sep 17 00:00:00 2001 From: Ricardo Serrano Gutierrez <145554214+TEF-RicardoSerr@users.noreply.github.com> Date: Fri, 24 Nov 2023 11:51:15 +0100 Subject: [PATCH 1/9] EdgeCloud LifecycleManagement API proposal --- code/API_definitions/EdgeCloud_LcM.yaml | 703 ++++++++++++++++++++++++ 1 file changed, 703 insertions(+) create mode 100644 code/API_definitions/EdgeCloud_LcM.yaml diff --git a/code/API_definitions/EdgeCloud_LcM.yaml b/code/API_definitions/EdgeCloud_LcM.yaml new file mode 100644 index 00000000..9d651149 --- /dev/null +++ b/code/API_definitions/EdgeCloud_LcM.yaml @@ -0,0 +1,703 @@ +openapi: 3.0.3 +info: + title: Edge Cloud API + description: | + + Edge Cloud API for artifact managment, application management and resource management. + Edge Cloud API for artifact managment, application management and resource management. + # Introduction + APIs defined in this version of the specification can be categorized into the following areas: + * __Application Management__ - Deploy and remove applications within artifacts + * __Application Artifacts Management__ - Management of application descriptors, binaries, charts and packages + * __MEC Platfform information__ - Retrieves all the Edge nodes available according to some defined parameters + + # Relevant terms and definitions + This section provides definitions of terminologies commonly referred to throughout the API descriptions. + + * __Application Provider__ - An application developer, onboarding his/her edge application on operator platform (MEC). + * __Artifact__ - Descriptor, binary image, charts or any other package assosiated with the application. + * __Region__ - Human readable name of the geografical zone of the MEC. Defined by the OP. + + # API Functionality + __Application Management__ + * __onboardApplication__ - Submits an application details to an OP. Based on the details provided, OP shall do bookkeeping, resource validation and other pre-deployment operations. + * __removeApplication__ - Removes an application from an OP + + __Application Artifacts Management__ + * __onboardArtifact__ Submits an artifact to operator platform + * __removeArtifact__ Removes an artifact from operator platform + + __MEC Platfform information__ + * __retrieveEdgeNodes__ List of the operator’s MECs and their status, ordering the results by location and filtering by status (active/inactive/unknown) + + # Further info and support + + (FAQs will be added in a later version of the documentation) + + termsOfService: http://swagger.io/terms/ + contact: + email: sp-edc@lists.camaraproject.org + license: + name: Apache 2.0 + url: https://www.apache.org/licenses/LICENSE-2.0.html + version: 1.0.0 +externalDocs: + description: Product documentation at Camara + url: https://github.com/camaraproject/ + +servers: + - url: "{apiRoot}/{basePath}" + variables: + apiRoot: + default: http://localhost:9091 + description: API root + basePath: + default: edge-cloud/v1 + description: Base path for the Edge Cloud API + +security: + - oAuth2ClientCredentials: + - nbi-mgmt + +tags: + - name: Applications + description: Manage of Applications + - name: Application Artifacts + description: Manage of Artifacts + - name: Mobile Edge Cloud Platform + description: Mobile Edge Nodes Available + +paths: + /app: + post: + tags: + - Applications + summary: Deploy an application + description: Ask the operator to provision an application to one or several Edge Application Servers taking into account resources (e.g. vCPU, Memory, network interfaces, storage, GPU) + operationId: appProvisioning + requestBody: + description: Details about application and zones where application instance should be instantiated + content: + application/json: + schema: + $ref: '#/components/schemas/AppProvisioning' + required: true + responses: + '201': + description: Application provisioned + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/DeployedApp' + minItems: 1 + '400': + $ref: '#/components/responses/400' + '401': + $ref: '#/components/responses/401' + '403': + $ref: '#/components/responses/403' + '409': + description: Conflict + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInfo' + example: + status: 409 + code: CONFLICT + message: "Application already deployed" + '500': + $ref: '#/components/responses/500' + '501': + $ref: '#/components/responses/501' + '503': + $ref: '#/components/responses/503' + + /app/{appId}: + delete: + tags: + - Applications + summary: Terminate an Application + description: Terminate the running instance of an application in one or several Edge Application Servers + operationId: deleteApplication + parameters: + - name: appId + in: path + description: Identificator of the application generated by the OP NBI once the provisioning was successful + required: true + schema: + $ref: "#/components/schemas/AppId" + - name: edgeResourceName + in: query + description: Identificator of the specific edge node where de application will be terminated + required: false + schema: + $ref: "#/components/schemas/EdgeResource" + - name: regionId + in: query + description: Identificator of the specific zone where de application will be terminated + required: false + schema: + $ref: "#/components/schemas/RegionId" + + responses: + '204': + description: Application deleted + '400': + $ref: '#/components/responses/400' + '401': + $ref: '#/components/responses/401' + '403': + $ref: '#/components/responses/403' + '404': + $ref: '#/components/responses/404' + '500': + $ref: '#/components/responses/500' + '503': + $ref: '#/components/responses/503' + + /artifact: + post: + tags: + - Application Artifacts + summary: Uploads artifact on an OP. + description: Artifact is a zip file containing scripts and/or packaging files like Terraform or Helm which are required to create an instance of an application. + operationId: uploadArtifact + requestBody: + description: An application can consist of multiple components. App providers are allowed to define seperate artifacts for each component + or they could define a consolidated artifact at application level. + content: + application/json: + schema: + $ref: '#/components/schemas/ArtifactDetails' + required: true + responses: + '201': + description: Artifact uploaded successfully + content: + application/json: + schema: + $ref: '#/components/schemas/UploadedArtifact' + '400': + $ref: '#/components/responses/400' + '401': + $ref: '#/components/responses/401' + '403': + $ref: '#/components/responses/403' + '409': + description: Conflict + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInfo' + example: + status: 409 + code: CONFLICT + message: "Artifacf duplicated" + '500': + $ref: '#/components/responses/500' + '501': + $ref: '#/components/responses/501' + '503': + $ref: '#/components/responses/503' + + /artifact/{artifactId}: + delete: + tags: + - Application Artifacts + summary: Delete an artifact from an OP + description: Delete an artifact + operationId: deleteArtifact + parameters: + - name: artifactId + in: path + description: Identificator of the artifact to be deleted provided by the OP NBI once the uploading was successful + required: true + schema: + $ref: "#/components/schemas/ArtifactId" + + responses: + '204': + description: Artifact deleted + '400': + $ref: '#/components/responses/400' + '401': + $ref: '#/components/responses/401' + '403': + $ref: '#/components/responses/403' + '404': + $ref: '#/components/responses/404' + '409': + description: Conflict + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInfo' + example: + status: 409 + code: CONFLICT + message: "Artifact with a running application cannot be deleted" + '500': + $ref: '#/components/responses/500' + '503': + $ref: '#/components/responses/503' + + /edgeCloudPlatform: + get: + tags: + - Mobile Edge Cloud Platform + summary: Retrieve a list of the operator’s MECs and their status + description: List of the operator’s MECs and their status, ordering the results by location and filtering by status (active/inactive/unknown) + operationId: getMecPlatforms + parameters: + - name: regionId + description: Human readable name of the geografical zone of the MEC. Defined by the OP. + in: query + required: false + schema: + $ref: '#/components/schemas/RegionId' + - name: status + in: query + required: false + schema: + $ref: '#/components/schemas/Status' + responses: + '200': + description: Available MEC Platforms + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/MecDetails' + minItems: 1 + '401': + $ref: '#/components/responses/401' + '403': + $ref: '#/components/responses/403' + '404': + $ref: '#/components/responses/404' + '500': + $ref: '#/components/responses/500' + '503': + $ref: '#/components/responses/503' + +components: + securitySchemes: + oAuth2ClientCredentials: + type: oauth2 + flows: + clientCredentials: + tokenUrl: '/oauth2/token' + scopes: + nbi-mgmt: Access to the APIs + + schemas: + AppId: + type: string + format: uuid + description: A globally unique identifier assosiated with the artifact. Originating OP generates this identifier when artifact is submitted over NBI. + + AppProviderId: + type: string + pattern: ^[A-Za-z][A-Za-z0-9_]{7,63}$ + description: UserId of the app provider. Identifier is relevant only in context of federation. + + AppProvisioning: + description: Attributes required to provision an application + type: object + properties: + artifactId: + $ref: '#/components/schemas/ArtifactId' + appVersion: + $ref: '#/components/schemas/AppVersion' + appProviderId: + $ref: '#/components/schemas/AppProviderId' + edgeResource: + $ref: '#/components/schemas/EdgeResource' + regionId: + $ref: '#/components/schemas/RegionId' + required: + - artifactId + + AppVersion: + type: string + pattern: ^(\d{1,2}\.)?(\d{1,2}\.)?(\d{1,2})$ + description: Versioning info in the format major.minor.patch + + ArtifactId: + type: string + pattern: 6sa85a64-5117-3562-c3fd-2c913a66aba1 + description: A globally unique identifier assosiated with the artifact. Originating OP generates this identifier when artifact is submitted over NBI. + + ArtifactDetails: + properties: + name: + type: string + pattern: ^[A-Za-z][A-Za-z0-9_]{7,31}$ + description: Name of the artifact. + + version: + type: string + pattern: ^(\d{1,2}\.)?(\d{1,2}\.)?(\d{1,2})$ + description: Artifact version information + + virtType: + type: string + enum: + - VM_TYPE + - CONTAINER_TYPE + + fileName: + type: string + minLength: 8 + maxLength: 32 + description: Name of the file. + + fileFormat: + type: string + enum: + - WINZIP + - TAR + - TEXT + - TARGZ + description: Artifacts like Helm charts or Terraform scripts may need compressed format. + + descriptorType: + type: string + enum: + - HELM + - TERRAFORM + - ANSIBLE + - SHELL + - COMPONENTSPEC + description: Type of descriptor present in the artifact. App provider can either define either a HELM chart or a Terrform script or container spec. + + repository: + type: object + required: + - type + - url + properties: + type: + type: string + enum: + - PRIVATEREPO + - PUBLICREPO + - UPLOAD + description: Artifact repository location. PUBLICREPO is used of public urls like github, helm repo etc, + PRIVATEREPO is used for private repo managed by the application developer, + UPLOAD is for the case when artifact is uploaded from MEC web portal. + url: + $ref: '#/components/schemas/Uri' + userName: + type: string + pattern: ^[A-Za-z][A-Za-z0-9_]{7,63}$ + description: Username to acces the artifact repository + password: + type: string + description: Password to acces the artifact repository + token: + type: string + description: Authorization token acces the artifact repository + + componentSpec: + description: Details about compute, networking and storage requirements for each component of the application. + App provider should define all information needed to instantiate the component. + If artifact is being defined at component level this section should have information just about the component. + In case the artifact is being defined at application level the section should provide details about all the components. + type: array + items: + type: object + required: + - componentName + - operatingSystem + - cpuArchitecture + - images + - networkInterfaces + - numOfInstances + - restartPolicy + properties: + componentName: + type: string + pattern: ^[A-Za-z0-9][A-Za-z0-9_]{6,62}[A-Za-z0-9]$ + description: Must be a valid RFC 1035 label name. Component name must be unique with an application + operatingSystem: + $ref: '#/components/schemas/OperatingSystem' + cpuArchitecture: + $ref: '#/components/schemas/CpuArchType' + images: + description: List of all images assosiated with the component. Images are uploaded or specified using UploadFile apis + type: array + items: + $ref: '#/components/schemas/FileId' + minItems: 1 + networkInterfaces: + description: Each application component exposes some ports either for external users or for inter component communication. + Application provider is required to specify which ports are to be exposed and the type of traffic that will flow through these ports. + + type: array + items: + type: object + required: + - interfaceId + - protocol + - port + - network + - interfaceName + - visibilityType + properties: + interfaceId: + type: string + description: Each Port and corresponding traffic protocol exposed by the component is identified by a name. + Application client on user device requires this to uniquley idenify the interface. + pattern: ^[A-Za-z0-9][A-Za-z0-9_]{6,30}[A-Za-z0-9]$ + network: + type: string + pattern: ^[A-Za-z][A-Za-z0-9_]{6,30}[A-Za-z0-9]$ + description: Name of the network. In case the application has to be assoisated with more then 1 network then app provider + must define the name of the network on which this interface has to be exposed. This parameter is required only if + the port has to be exposed on a specific network other then default. + protocol: + type: string + enum: + - TCP + - UDP + - HTTP/HTTPS + description: Defines the IP transport communication protocol i.e., TCP, UDP or HTTP + port: + type: integer + format: int32 + minimum: 1 + maximum: 65535 + description: Port number exposed by the component. OP may generate a dynamic port towards the UCs + corresponding to this internal port and forward the client traffic from dynamic port to containerPort. + interfaceName: + type: string + pattern: ^[a-z][a-z0-9]{3}$ + description: Interface Name. Required only if application has to be attatched to a network other then default. + visibilityType: + description: Defines whether the interface is exposed to outer world or not i.e., external, or internal. + If this is set to "external", then it is exposed to external applications otherwise it is exposed + internally to edge application components within edge cloud. When exposed to external world, + an external dynamic port is assigned for UC traffic and mapped to the internal containerPort + type: string + enum: + - VISIBILITY_EXTERNAL + - VISIBILITY_INTERNAL + minItems: 1 + numOfInstances: + type: integer + format: int32 + description: Number of component instances to be launched. + restartPolicy: + type: string + enum: + - RESTART_POLICY_ALWAYS + - RESTART_POLICY_NEVER + description: How the platform shall handle component failure + artifactFile: + type: string + format: binary + description: Helm archive or Terrafom archive or container spec file. + required: + - name + - virtType + - fileName + - fileFormat + - descriptorType + + CpuArchType: + type: string + enum: + - x86_64 + - arm_64 + description: CPU Instruction Set Architecture (ISA) E.g., Intel, Arm etc. + + DeployedApp: + description: Information about the deployed application + type: object + properties: + appId: + $ref: '#/components/schemas/AppId' + edgeResourceName: + $ref: '#/components/schemas/EdgeResource' + + EdgeResource: + description: Edge Resource Name - an identifier for an edge reource in the operator domain + type: string + + ErrorInfo: + type: object + properties: + status: + type: integer + description: HTTP status code returned along with this error response + code: + type: string + description: Code given to this error + message: + type: string + description: Detailed error description + required: + - status + - code + - message + + FileId: + type: string + format: uuid + description: A globally unique identifier assosiated with the image file. Originating OP generates this identifier when file is uploaded over NBI. + + MecDetails: + type: object + required: + - geolocation + properties: + edgeResourceName: + $ref: '#/components/schemas/EdgeResource' + status: + $ref: '#/components/schemas/Status' + region: + $ref: '#/components/schemas/RegionId' + + minItems: 1 + + OperatingSystem: + type: object + required: + - architecture + - family + - version + - license + properties: + architecture: + type: string + enum: + - x86_64 + - x86 + example: x86_64 + family: + type: string + enum: + - RHEL + - UBUNTU + - COREOS + - WINDOWS + - OTROS + version: + type: string + enum: + - OS_VERSION_UBUNTU_2204_LTS + - OS_VERSION_RHEL_8 + - OS_VERSION_RHEL_7 + - OS_VERSION_ DEBIAN_11 + - OS_VERSION_COREOS_STABLE + - OS_MS_WINDOWS_2012_R2 + license: + type: string + enum: + - OS_LICENSE_TYPE_FREE + - OS_LICENSE_TYPE_ON_DEMAND + + RegionId: + type: string + description: Human readable name of the geografical zone of the MEC. Defined by the OP. + enum: + - North + - South + - West + - East + + Status: + description: Status of the MEC Platform (default is 'unknown') + type: string + enum: + - active + - inactive + - unknown + default: unknown + + UploadedArtifact: + description: Information about the uploaded artifact + type: object + properties: + artifactId: + $ref: '#/components/schemas/ArtifactId' + + Uri: + type: string + + responses: + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInfo' + example: + status: 400 + code: INVALID_ARGUMENT + message: "Schema validation failed at ..." + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInfo' + example: + status: 401 + code: UNAUTHENTICATED + message: "Authorization failed: ..." + '403': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInfo' + example: + status: 403 + code: PERMISSION_DENIED + message: "Operation not allowed: ..." + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInfo' + example: + status: 404 + code: NOT_FOUND + message: "Resource does not exist" + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInfo' + example: + status: 500 + code: INTERNAL + message: "Internal server error: ..." + '501': + description: Not Implemented + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInfo' + example: + status: 501 + code: NOT_IMPLEMENTED + message: "Service not implemented" + '503': + description: Service Unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInfo' + example: + status: 503 + code: UNAVAILABLE + message: "Service unavailable" From 13c6cb864c191adbba95f8d842b6a559b0adfc58 Mon Sep 17 00:00:00 2001 From: Ricardo Serrano Gutierrez <145554214+TEF-RicardoSerr@users.noreply.github.com> Date: Tue, 28 Nov 2023 12:26:32 +0100 Subject: [PATCH 2/9] Update EdgeCloud_LcM.yaml Changes proposed by kevin --- code/API_definitions/EdgeCloud_LcM.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/API_definitions/EdgeCloud_LcM.yaml b/code/API_definitions/EdgeCloud_LcM.yaml index 9d651149..83e0760c 100644 --- a/code/API_definitions/EdgeCloud_LcM.yaml +++ b/code/API_definitions/EdgeCloud_LcM.yaml @@ -1,21 +1,21 @@ -openapi: 3.0.3 +openapi: 0.1.0 info: title: Edge Cloud API description: | - Edge Cloud API for artifact managment, application management and resource management. - Edge Cloud API for artifact managment, application management and resource management. + Edge Cloud API for artifact managment, application management and resource management. # Introduction APIs defined in this version of the specification can be categorized into the following areas: * __Application Management__ - Deploy and remove applications within artifacts * __Application Artifacts Management__ - Management of application descriptors, binaries, charts and packages - * __MEC Platfform information__ - Retrieves all the Edge nodes available according to some defined parameters + * __MEC Platform information__ - Retrieves all the Edge nodes available according to some defined parameters # Relevant terms and definitions This section provides definitions of terminologies commonly referred to throughout the API descriptions. * __Application Provider__ - An application developer, onboarding his/her edge application on operator platform (MEC). * __Artifact__ - Descriptor, binary image, charts or any other package assosiated with the application. + * __OP__ - Operator Platform. * __Region__ - Human readable name of the geografical zone of the MEC. Defined by the OP. # API Functionality @@ -27,7 +27,7 @@ info: * __onboardArtifact__ Submits an artifact to operator platform * __removeArtifact__ Removes an artifact from operator platform - __MEC Platfform information__ + __MEC Platform information__ * __retrieveEdgeNodes__ List of the operator’s MECs and their status, ordering the results by location and filtering by status (active/inactive/unknown) # Further info and support From 2ef552f17a456b21ad6ff3543a022bd1d7f97d1d Mon Sep 17 00:00:00 2001 From: Ricardo Serrano Gutierrez <145554214+TEF-RicardoSerr@users.noreply.github.com> Date: Thu, 30 Nov 2023 16:36:44 +0100 Subject: [PATCH 3/9] spelling mistakes corrected Co-authored-by: Nicola Cadenelli --- code/API_definitions/EdgeCloud_LcM.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/API_definitions/EdgeCloud_LcM.yaml b/code/API_definitions/EdgeCloud_LcM.yaml index 83e0760c..e9c443bf 100644 --- a/code/API_definitions/EdgeCloud_LcM.yaml +++ b/code/API_definitions/EdgeCloud_LcM.yaml @@ -298,7 +298,7 @@ components: AppId: type: string format: uuid - description: A globally unique identifier assosiated with the artifact. Originating OP generates this identifier when artifact is submitted over NBI. + description: A globally unique identifier associated with the artifact. Originating OP generates this identifier when artifact is submitted over NBI. AppProviderId: type: string From feada86293f26a1cbfed061b69c86ce8e23a4dcf Mon Sep 17 00:00:00 2001 From: Ricardo Serrano Gutierrez <145554214+TEF-RicardoSerr@users.noreply.github.com> Date: Thu, 30 Nov 2023 17:19:46 +0100 Subject: [PATCH 4/9] Version corrections --- code/API_definitions/EdgeCloud_LcM.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/API_definitions/EdgeCloud_LcM.yaml b/code/API_definitions/EdgeCloud_LcM.yaml index e9c443bf..c71a1084 100644 --- a/code/API_definitions/EdgeCloud_LcM.yaml +++ b/code/API_definitions/EdgeCloud_LcM.yaml @@ -1,4 +1,4 @@ -openapi: 0.1.0 +openapi: 3.0.3 info: title: Edge Cloud API description: | @@ -40,7 +40,7 @@ info: license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html - version: 1.0.0 + version: 0.1.0 externalDocs: description: Product documentation at Camara url: https://github.com/camaraproject/ From 3ffe30c6c302393e4c9a0850bc2879ad5e8bf6e5 Mon Sep 17 00:00:00 2001 From: Ricardo Serrano Gutierrez <145554214+TEF-RicardoSerr@users.noreply.github.com> Date: Fri, 1 Dec 2023 13:19:46 +0100 Subject: [PATCH 5/9] Adaptation to the comments in PR Comments and minor changes have been reviewed --- code/API_definitions/EdgeCloud_LcM.yaml | 173 +++++++++--------------- 1 file changed, 64 insertions(+), 109 deletions(-) diff --git a/code/API_definitions/EdgeCloud_LcM.yaml b/code/API_definitions/EdgeCloud_LcM.yaml index c71a1084..6b814639 100644 --- a/code/API_definitions/EdgeCloud_LcM.yaml +++ b/code/API_definitions/EdgeCloud_LcM.yaml @@ -2,38 +2,33 @@ openapi: 3.0.3 info: title: Edge Cloud API description: | - + Edge Cloud API for artifact managment, application management and resource management. # Introduction APIs defined in this version of the specification can be categorized into the following areas: * __Application Management__ - Deploy and remove applications within artifacts * __Application Artifacts Management__ - Management of application descriptors, binaries, charts and packages * __MEC Platform information__ - Retrieves all the Edge nodes available according to some defined parameters - # Relevant terms and definitions This section provides definitions of terminologies commonly referred to throughout the API descriptions. - + * __Application Provider__ - An application developer, onboarding his/her edge application on operator platform (MEC). * __Artifact__ - Descriptor, binary image, charts or any other package assosiated with the application. * __OP__ - Operator Platform. * __Region__ - Human readable name of the geografical zone of the MEC. Defined by the OP. - # API Functionality __Application Management__ * __onboardApplication__ - Submits an application details to an OP. Based on the details provided, OP shall do bookkeeping, resource validation and other pre-deployment operations. * __removeApplication__ - Removes an application from an OP - + __Application Artifacts Management__ * __onboardArtifact__ Submits an artifact to operator platform * __removeArtifact__ Removes an artifact from operator platform - __MEC Platform information__ * __retrieveEdgeNodes__ List of the operator’s MECs and their status, ordering the results by location and filtering by status (active/inactive/unknown) - # Further info and support - (FAQs will be added in a later version of the documentation) - + termsOfService: http://swagger.io/terms/ contact: email: sp-edc@lists.camaraproject.org @@ -44,7 +39,7 @@ info: externalDocs: description: Product documentation at Camara url: https://github.com/camaraproject/ - + servers: - url: "{apiRoot}/{basePath}" variables: @@ -54,11 +49,11 @@ servers: basePath: default: edge-cloud/v1 description: Base path for the Edge Cloud API - + security: - oAuth2ClientCredentials: - nbi-mgmt - + tags: - name: Applications description: Manage of Applications @@ -66,13 +61,13 @@ tags: description: Manage of Artifacts - name: Mobile Edge Cloud Platform description: Mobile Edge Nodes Available - + paths: /app: post: tags: - Applications - summary: Deploy an application + summary: Provision an application description: Ask the operator to provision an application to one or several Edge Application Servers taking into account resources (e.g. vCPU, Memory, network interfaces, storage, GPU) operationId: appProvisioning requestBody: @@ -88,9 +83,14 @@ paths: content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/DeployedApp' + type: object + properties: + appId: + $ref: '#/components/schemas/AppId' + aplicationInstace: + type: array + items: + $ref: '#/components/schemas/ProvisionedApp' minItems: 1 '400': $ref: '#/components/responses/400' @@ -107,14 +107,14 @@ paths: example: status: 409 code: CONFLICT - message: "Application already deployed" + message: "Application already provisioned" '500': $ref: '#/components/responses/500' '501': $ref: '#/components/responses/501' '503': $ref: '#/components/responses/503' - + /app/{appId}: delete: tags: @@ -124,24 +124,17 @@ paths: operationId: deleteApplication parameters: - name: appId - in: path - description: Identificator of the application generated by the OP NBI once the provisioning was successful - required: true - schema: - $ref: "#/components/schemas/AppId" - - name: edgeResourceName in: query - description: Identificator of the specific edge node where de application will be terminated + description: Identificator of the application generated by the OP NBI once the provisioning was successful, terminate all the instances related to this appId required: false schema: - $ref: "#/components/schemas/EdgeResource" - - name: regionId + $ref: "#/components/schemas/AppId" + - name: appInstanceId in: query - description: Identificator of the specific zone where de application will be terminated + description: Identificator of the specific application instance that will be terminated required: false schema: - $ref: "#/components/schemas/RegionId" - + $ref: "#/components/schemas/AppInstanceId" responses: '204': description: Application deleted @@ -157,7 +150,7 @@ paths: $ref: '#/components/responses/500' '503': $ref: '#/components/responses/503' - + /artifact: post: tags: @@ -202,7 +195,7 @@ paths: $ref: '#/components/responses/501' '503': $ref: '#/components/responses/503' - + /artifact/{artifactId}: delete: tags: @@ -217,7 +210,7 @@ paths: required: true schema: $ref: "#/components/schemas/ArtifactId" - + responses: '204': description: Artifact deleted @@ -243,7 +236,7 @@ paths: $ref: '#/components/responses/500' '503': $ref: '#/components/responses/503' - + /edgeCloudPlatform: get: tags: @@ -283,7 +276,7 @@ paths: $ref: '#/components/responses/500' '503': $ref: '#/components/responses/503' - + components: securitySchemes: oAuth2ClientCredentials: @@ -293,88 +286,63 @@ components: tokenUrl: '/oauth2/token' scopes: nbi-mgmt: Access to the APIs - schemas: AppId: type: string format: uuid description: A globally unique identifier associated with the artifact. Originating OP generates this identifier when artifact is submitted over NBI. - + AppInstanceId: + type: string + format: uuid + description: A globally unique identifier associated with a running instance of an application. Originating OP generates this identifier. AppProviderId: type: string pattern: ^[A-Za-z][A-Za-z0-9_]{7,63}$ description: UserId of the app provider. Identifier is relevant only in context of federation. - AppProvisioning: description: Attributes required to provision an application type: object properties: artifactId: $ref: '#/components/schemas/ArtifactId' - appVersion: - $ref: '#/components/schemas/AppVersion' - appProviderId: - $ref: '#/components/schemas/AppProviderId' - edgeResource: - $ref: '#/components/schemas/EdgeResource' + appName: + $ref: '#/components/schemas/AppName' + edgeResourceName: + $ref: '#/components/schemas/EdgeResourceName' regionId: $ref: '#/components/schemas/RegionId' required: - artifactId - - AppVersion: + - appName + AppName: type: string - pattern: ^(\d{1,2}\.)?(\d{1,2}\.)?(\d{1,2})$ - description: Versioning info in the format major.minor.patch - + description: Name given by the application provider ArtifactId: type: string pattern: 6sa85a64-5117-3562-c3fd-2c913a66aba1 description: A globally unique identifier assosiated with the artifact. Originating OP generates this identifier when artifact is submitted over NBI. - + ArtifactDetails: properties: name: type: string pattern: ^[A-Za-z][A-Za-z0-9_]{7,31}$ description: Name of the artifact. - version: type: string pattern: ^(\d{1,2}\.)?(\d{1,2}\.)?(\d{1,2})$ description: Artifact version information - virtType: type: string enum: - - VM_TYPE - - CONTAINER_TYPE - + - VM + - CONTAINER + - HELM fileName: type: string minLength: 8 maxLength: 32 - description: Name of the file. - - fileFormat: - type: string - enum: - - WINZIP - - TAR - - TEXT - - TARGZ - description: Artifacts like Helm charts or Terraform scripts may need compressed format. - - descriptorType: - type: string - enum: - - HELM - - TERRAFORM - - ANSIBLE - - SHELL - - COMPONENTSPEC - description: Type of descriptor present in the artifact. App provider can either define either a HELM chart or a Terrform script or container spec. - + description: Name of the file with the extension eg. zip, targz,etc. repository: type: object required: @@ -386,10 +354,8 @@ components: enum: - PRIVATEREPO - PUBLICREPO - - UPLOAD description: Artifact repository location. PUBLICREPO is used of public urls like github, helm repo etc, - PRIVATEREPO is used for private repo managed by the application developer, - UPLOAD is for the case when artifact is uploaded from MEC web portal. + PRIVATEREPO is used for private repo managed by the application developer. url: $ref: '#/components/schemas/Uri' userName: @@ -402,7 +368,6 @@ components: token: type: string description: Authorization token acces the artifact repository - componentSpec: description: Details about compute, networking and storage requirements for each component of the application. App provider should define all information needed to instantiate the component. @@ -437,7 +402,7 @@ components: networkInterfaces: description: Each application component exposes some ports either for external users or for inter component communication. Application provider is required to specify which ports are to be exposed and the type of traffic that will flow through these ports. - + type: array items: type: object @@ -497,38 +462,31 @@ components: enum: - RESTART_POLICY_ALWAYS - RESTART_POLICY_NEVER - description: How the platform shall handle component failure - artifactFile: - type: string - format: binary - description: Helm archive or Terrafom archive or container spec file. + description: How the platform shall handle component failure required: - name - virtType - fileName - - fileFormat - - descriptorType - + - repository + - componentSpec CpuArchType: type: string enum: - x86_64 - arm_64 description: CPU Instruction Set Architecture (ISA) E.g., Intel, Arm etc. - - DeployedApp: - description: Information about the deployed application + ProvisionedApp: + description: Information about the provisioned application type: object properties: - appId: - $ref: '#/components/schemas/AppId' + appInstanceId: + $ref: '#/components/schemas/AppInstanceId' edgeResourceName: - $ref: '#/components/schemas/EdgeResource' - - EdgeResource: + $ref: '#/components/schemas/EdgeResourceName' + EdgeResourceName: description: Edge Resource Name - an identifier for an edge reource in the operator domain type: string - + ErrorInfo: type: object properties: @@ -545,26 +503,25 @@ components: - status - code - message - FileId: type: string format: uuid description: A globally unique identifier assosiated with the image file. Originating OP generates this identifier when file is uploaded over NBI. - + MecDetails: type: object required: - geolocation properties: edgeResourceName: - $ref: '#/components/schemas/EdgeResource' + $ref: '#/components/schemas/EdgeResourceName' status: $ref: '#/components/schemas/Status' region: $ref: '#/components/schemas/RegionId' - + minItems: 1 - + OperatingSystem: type: object required: @@ -601,7 +558,7 @@ components: enum: - OS_LICENSE_TYPE_FREE - OS_LICENSE_TYPE_ON_DEMAND - + RegionId: type: string description: Human readable name of the geografical zone of the MEC. Defined by the OP. @@ -610,7 +567,7 @@ components: - South - West - East - + Status: description: Status of the MEC Platform (default is 'unknown') type: string @@ -619,17 +576,15 @@ components: - inactive - unknown default: unknown - UploadedArtifact: description: Information about the uploaded artifact type: object properties: artifactId: $ref: '#/components/schemas/ArtifactId' - Uri: type: string - + responses: '400': description: Bad request From d8a6ede11d58d817e20dc5620d081d15a6e68280 Mon Sep 17 00:00:00 2001 From: Ricardo Serrano Gutierrez <145554214+TEF-RicardoSerr@users.noreply.github.com> Date: Thu, 7 Dec 2023 14:33:37 +0100 Subject: [PATCH 6/9] Update EdgeCloud_LcM.yaml with thelast comments --- code/API_definitions/EdgeCloud_LcM.yaml | 26 ++++++++----------------- 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/code/API_definitions/EdgeCloud_LcM.yaml b/code/API_definitions/EdgeCloud_LcM.yaml index 6b814639..adb4b5c1 100644 --- a/code/API_definitions/EdgeCloud_LcM.yaml +++ b/code/API_definitions/EdgeCloud_LcM.yaml @@ -14,7 +14,7 @@ info: * __Application Provider__ - An application developer, onboarding his/her edge application on operator platform (MEC). * __Artifact__ - Descriptor, binary image, charts or any other package assosiated with the application. - * __OP__ - Operator Platform. + * __OP__ - Operator Platform. An Operator Platform (facilitates access to the Edge Cloud and other capabilities of an Operator or federation of Operators and Partners. Defined by [GSMA in OPG.02](https://www.gsma.com/futurenetworks/wp-content/uploads/2023/07/OPG.02-v5.0-Operator-Platform-Requirements-and-Architecture.pdf) * __Region__ - Human readable name of the geografical zone of the MEC. Defined by the OP. # API Functionality __Application Management__ @@ -71,7 +71,7 @@ paths: description: Ask the operator to provision an application to one or several Edge Application Servers taking into account resources (e.g. vCPU, Memory, network interfaces, storage, GPU) operationId: appProvisioning requestBody: - description: Details about application and zones where application instance should be instantiated + description: Details regarding where the application instance should be instantiated content: application/json: schema: @@ -237,7 +237,7 @@ paths: '503': $ref: '#/components/responses/503' - /edgeCloudPlatform: + /edge-cloud-platforms: get: tags: - Mobile Edge Cloud Platform @@ -295,10 +295,7 @@ components: type: string format: uuid description: A globally unique identifier associated with a running instance of an application. Originating OP generates this identifier. - AppProviderId: - type: string - pattern: ^[A-Za-z][A-Za-z0-9_]{7,63}$ - description: UserId of the app provider. Identifier is relevant only in context of federation. + AppProvisioning: description: Attributes required to provision an application type: object @@ -319,18 +316,16 @@ components: description: Name given by the application provider ArtifactId: type: string - pattern: 6sa85a64-5117-3562-c3fd-2c913a66aba1 + format: uuid description: A globally unique identifier assosiated with the artifact. Originating OP generates this identifier when artifact is submitted over NBI. ArtifactDetails: properties: name: type: string - pattern: ^[A-Za-z][A-Za-z0-9_]{7,31}$ description: Name of the artifact. version: - type: string - pattern: ^(\d{1,2}\.)?(\d{1,2}\.)?(\d{1,2})$ + type: integer description: Artifact version information virtType: type: string @@ -373,7 +368,7 @@ components: App provider should define all information needed to instantiate the component. If artifact is being defined at component level this section should have information just about the component. In case the artifact is being defined at application level the section should provide details about all the components. - type: array + type: object items: type: object required: @@ -543,7 +538,7 @@ components: - UBUNTU - COREOS - WINDOWS - - OTROS + - OTHERS version: type: string enum: @@ -562,11 +557,6 @@ components: RegionId: type: string description: Human readable name of the geografical zone of the MEC. Defined by the OP. - enum: - - North - - South - - West - - East Status: description: Status of the MEC Platform (default is 'unknown') From 3429f24d4424261061ee5f6b452c590674bb1dd1 Mon Sep 17 00:00:00 2001 From: javierlozallu <150795747+javierlozallu@users.noreply.github.com> Date: Thu, 14 Dec 2023 13:13:58 +0100 Subject: [PATCH 7/9] Update EdgeCloud_LcM.yaml v0.2.0 As discussed in the previous CAMARA - Edge Cloud meeting (12th - Dec) we agree to combine Artifact and Application into a single type, included in this new version. We clarified the difference between Application and Application Instance, defining two methods. Application is HOW to deploy meanwhile Application Instance is WHERE to deploy it. In order to provide a vision of the current configured Applications and for the status of Application Instances, we included GET methods for each one. We have rename the entity of edgeResourceName for edgeCloudNodeName, this is something we have to discuss to harmonize common entities in TI, SED and MVP API. --- code/API_definitions/EdgeCloud_LcM.yaml | 344 ++++++++++++++---------- 1 file changed, 204 insertions(+), 140 deletions(-) diff --git a/code/API_definitions/EdgeCloud_LcM.yaml b/code/API_definitions/EdgeCloud_LcM.yaml index adb4b5c1..b80e9131 100644 --- a/code/API_definitions/EdgeCloud_LcM.yaml +++ b/code/API_definitions/EdgeCloud_LcM.yaml @@ -3,29 +3,34 @@ info: title: Edge Cloud API description: | - Edge Cloud API for artifact managment, application management and resource management. + Edge Cloud API for Life Cycle Management and discovery of an application. # Introduction APIs defined in this version of the specification can be categorized into the following areas: - * __Application Management__ - Deploy and remove applications within artifacts - * __Application Artifacts Management__ - Management of application descriptors, binaries, charts and packages - * __MEC Platform information__ - Retrieves all the Edge nodes available according to some defined parameters + * __Application__ - The Application Provider submit application metadata to the Operator Platform. + * __Application Instance__ - An Operator Platform instantiate an Application on an Edge Cloud Node when the Application Provider resquest it. + * __Edge Cloud information__ - Retrieves all the Edge nodes available according to some defined parameters. # Relevant terms and definitions This section provides definitions of terminologies commonly referred to throughout the API descriptions. - * __Application Provider__ - An application developer, onboarding his/her edge application on operator platform (MEC). - * __Artifact__ - Descriptor, binary image, charts or any other package assosiated with the application. + * __Application Provider__ - The provider of the application that accesses an OP to deploy its application on the Edge Cloud. An Application Provider may be part of a larger organisation, like an enterprise, enterprise customer of an OP, or be an independent entity. + * __Application__ - Contains the information about the application to be instantiated. Descriptor, binary image, charts or any other package assosiated with the application. The Application Provider request contains mandatory criteria (e.g. required CPU, memory, + storage, bandwidth) defined in an Application. * __OP__ - Operator Platform. An Operator Platform (facilitates access to the Edge Cloud and other capabilities of an Operator or federation of Operators and Partners. Defined by [GSMA in OPG.02](https://www.gsma.com/futurenetworks/wp-content/uploads/2023/07/OPG.02-v5.0-Operator-Platform-Requirements-and-Architecture.pdf) - * __Region__ - Human readable name of the geografical zone of the MEC. Defined by the OP. + * __Region__ - Human readable name of the geografical zone of the Edge Cloud. Defined by the OP. + * __Edge Cloud__ - Cloud-like capabilities located at the network edge including, from the Application Provider's perspective, access to elastically allocated compute, data storage and network resources. # API Functionality __Application Management__ - * __onboardApplication__ - Submits an application details to an OP. Based on the details provided, OP shall do bookkeeping, resource validation and other pre-deployment operations. - * __removeApplication__ - Removes an application from an OP + * __submitApp__ - Submits an application details to an OP. Based on the details provided, OP shall do bookkeeping, resource validation and other pre-deployment operations. + * __deleteApp__ - Removes an application from an OP, if there is a running instance of the given application, the request cannot be done. + * __getApp__ - Retrieves the information of a given application. - __Application Artifacts Management__ - * __onboardArtifact__ Submits an artifact to operator platform - * __removeArtifact__ Removes an artifact from operator platform - __MEC Platform information__ - * __retrieveEdgeNodes__ List of the operator’s MECs and their status, ordering the results by location and filtering by status (active/inactive/unknown) + __Application Instance Management__ + * __appInstantiation__ Request the OP to instatiate an instance of an application in a given Edge Cloud Node, if this parameter is not set, the OP will instantiate the applications in all the Edge Cloud Nodes available. + * __getAppInstance__ Retrieves the list with information of the instances related to a given application. + * __deleteAppInstance__ - Removes a given application instance from an Edge Cloud Node. + + __Edge Cloud information__ + * __getEdgeCloudNodes__ List of the operator’s Edge Cloud Nodes and their status, ordering the results by location and filtering by status (active/inactive/unknown) # Further info and support (FAQs will be added in a later version of the documentation) @@ -35,7 +40,7 @@ info: license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html - version: 0.1.0 + version: 0.2.0 externalDocs: description: Product documentation at Camara url: https://github.com/camaraproject/ @@ -55,31 +60,31 @@ security: - nbi-mgmt tags: - - name: Applications - description: Manage of Applications - - name: Application Artifacts - description: Manage of Artifacts - - name: Mobile Edge Cloud Platform - description: Mobile Edge Nodes Available + - name: Application + description: Application Management + - name: Application Instance + description: Application Instance Management + - name: Edge Cloud + description: Edge Cloud Nodes Available paths: - /app: + /appInstance: post: tags: - - Applications - summary: Provision an application - description: Ask the operator to provision an application to one or several Edge Application Servers taking into account resources (e.g. vCPU, Memory, network interfaces, storage, GPU) - operationId: appProvisioning + - Application Instance + summary: Instantiation of an Application + description: Ask the OP to instantiate an application to one or several Edge Cloud Nodes with an Application as an input and an Application Instance as the output. + operationId: appInstantiation requestBody: - description: Details regarding where the application instance should be instantiated + description: Details regarding where the application should be instantiated content: application/json: schema: - $ref: '#/components/schemas/AppProvisioning' + $ref: '#/components/schemas/AppInstantiation' required: true responses: '201': - description: Application provisioned + description: Application instantiated successfully content: application/json: schema: @@ -90,7 +95,7 @@ paths: aplicationInstace: type: array items: - $ref: '#/components/schemas/ProvisionedApp' + $ref: '#/components/schemas/InstantiatedApp' minItems: 1 '400': $ref: '#/components/responses/400' @@ -107,35 +112,76 @@ paths: example: status: 409 code: CONFLICT - message: "Application already provisioned" + message: "Application already instantiated in the given Edge or Region" '500': $ref: '#/components/responses/500' '501': $ref: '#/components/responses/501' '503': $ref: '#/components/responses/503' - - /app/{appId}: - delete: + /appInstance/{appId}: + get: tags: - - Applications - summary: Terminate an Application - description: Terminate the running instance of an application in one or several Edge Application Servers - operationId: deleteApplication + - Application Instance + summary: Retrieve the information of Application Instances for a given App + description: Ask the OP the information of the instances for a given application + operationId: getAppInstance parameters: - name: appId + description: A globally unique identifier associated with the application. OP generates this identifier when the application is submitted over NBI. + in: path + required: true + schema: + $ref: '#/components/schemas/AppId' + - name: appInstanceId + description: A globally unique identifier associated with a running instance of an application. OP generates this identifier. in: query - description: Identificator of the application generated by the OP NBI once the provisioning was successful, terminate all the instances related to this appId required: false - schema: - $ref: "#/components/schemas/AppId" + schema: + $ref: '#/components/schemas/AppInstanceId' + responses: + '201': + description: Information of Aplication Instances + content: + application/json: + schema: + type: object + properties: + appId: + $ref: '#/components/schemas/AppId' + aplicationInstace: + type: array + items: + $ref: '#/components/schemas/InstantiatedApp' + minItems: 1 + '401': + $ref: '#/components/responses/401' + '403': + $ref: '#/components/responses/403' + '404': + $ref: '#/components/responses/404' + '500': + $ref: '#/components/responses/500' + '503': + $ref: '#/components/responses/503' + + /appInstance/{appInstanceId}: + delete: + tags: + - Application Instance + summary: Terminate an Application Instance + description: Terminate a running instance of an application within an Edge Cloud Node + operationId: deleteAppInstance + parameters: - name: appInstanceId - in: query + in: path description: Identificator of the specific application instance that will be terminated - required: false + required: true schema: $ref: "#/components/schemas/AppInstanceId" responses: + '202': + description: Request accepted to be processed. It applies for async deletion process '204': description: Application deleted '400': @@ -151,28 +197,27 @@ paths: '503': $ref: '#/components/responses/503' - /artifact: + /app: post: tags: - - Application Artifacts - summary: Uploads artifact on an OP. - description: Artifact is a zip file containing scripts and/or packaging files like Terraform or Helm which are required to create an instance of an application. - operationId: uploadArtifact + - Application + summary: Submit application metadata to the Operator Platform. + description: Contains the information about the application to be instantiated + operationId: submitApp requestBody: - description: An application can consist of multiple components. App providers are allowed to define seperate artifacts for each component - or they could define a consolidated artifact at application level. + description: The Application Provider request contains mandatory criteria (e.g. required CPU, memory, storage, bandwidth) and optional parameters. content: application/json: schema: - $ref: '#/components/schemas/ArtifactDetails' + $ref: '#/components/schemas/AppManifest' required: true responses: '201': - description: Artifact uploaded successfully + description: Application submitted successfully content: application/json: schema: - $ref: '#/components/schemas/UploadedArtifact' + $ref: '#/components/schemas/SubmittedApp' '400': $ref: '#/components/responses/400' '401': @@ -188,32 +233,66 @@ paths: example: status: 409 code: CONFLICT - message: "Artifacf duplicated" + message: "App duplicated" '500': $ref: '#/components/responses/500' '501': $ref: '#/components/responses/501' '503': $ref: '#/components/responses/503' - - /artifact/{artifactId}: + /app/{appId}: + get: + tags: + - Application + summary: Retrieve the information of an Application + description: Ask the OP the information for a given application + operationId: getApp + parameters: + - name: appId + description: A globally unique identifier associated with the application. OP generates this identifier when the application is submitted over NBI. + in: path + required: true + schema: + $ref: '#/components/schemas/AppId' + responses: + '201': + description: Information of Aplication + content: + application/json: + schema: + type: object + properties: + appId: + $ref: '#/components/schemas/AppManifest' + '401': + $ref: '#/components/responses/401' + '403': + $ref: '#/components/responses/403' + '404': + $ref: '#/components/responses/404' + '500': + $ref: '#/components/responses/500' + '503': + $ref: '#/components/responses/503' delete: tags: - - Application Artifacts - summary: Delete an artifact from an OP - description: Delete an artifact - operationId: deleteArtifact + - Application + summary: Delete an Application from an OP + description: Delete all the information and content related to an Application + operationId: deleteApp parameters: - - name: artifactId + - name: appId in: path - description: Identificator of the artifact to be deleted provided by the OP NBI once the uploading was successful + description: Identificator of the application to be deleted provided by the OP NBI once the submission was successful required: true schema: - $ref: "#/components/schemas/ArtifactId" + $ref: "#/components/schemas/AppId" responses: + '202': + description: Request accepted '204': - description: Artifact deleted + description: App deleted '400': $ref: '#/components/responses/400' '401': @@ -231,22 +310,22 @@ paths: example: status: 409 code: CONFLICT - message: "Artifact with a running application cannot be deleted" + message: "App with a running application instance cannot be deleted" '500': $ref: '#/components/responses/500' '503': $ref: '#/components/responses/503' - /edge-cloud-platforms: + /edge-cloud-nodes: get: tags: - - Mobile Edge Cloud Platform - summary: Retrieve a list of the operator’s MECs and their status - description: List of the operator’s MECs and their status, ordering the results by location and filtering by status (active/inactive/unknown) - operationId: getMecPlatforms + - Edge Cloud + summary: Retrieve a list of the operator’s Edge Clouds and their status + description: List of the operator’s Edge Clouds and their status, ordering the results by location and filtering by status (active/inactive/unknown) + operationId: getEdgeCloudNodes parameters: - name: regionId - description: Human readable name of the geografical zone of the MEC. Defined by the OP. + description: Human readable name of the geografical zone of the Edge Cloud. Defined by the OP. in: query required: false schema: @@ -258,13 +337,13 @@ paths: $ref: '#/components/schemas/Status' responses: '200': - description: Available MEC Platforms + description: Available Edge Cloud Nodes content: application/json: schema: type: array items: - $ref: '#/components/schemas/MecDetails' + $ref: '#/components/schemas/EdgeCloudNodeDetails' minItems: 1 '401': $ref: '#/components/responses/401' @@ -290,43 +369,33 @@ components: AppId: type: string format: uuid - description: A globally unique identifier associated with the artifact. Originating OP generates this identifier when artifact is submitted over NBI. + description: A globally unique identifier associated with the application. OP generates this identifier when the application is submitted over NBI. AppInstanceId: type: string format: uuid - description: A globally unique identifier associated with a running instance of an application. Originating OP generates this identifier. + description: A globally unique identifier associated with a running instance of an application. OP generates this identifier. - AppProvisioning: - description: Attributes required to provision an application + AppInstantiation: + description: Attributes with information where to instantiate a given application type: object properties: - artifactId: - $ref: '#/components/schemas/ArtifactId' - appName: - $ref: '#/components/schemas/AppName' - edgeResourceName: - $ref: '#/components/schemas/EdgeResourceName' + appId: + $ref: '#/components/schemas/AppId' + edgeCloudNodeName: + $ref: '#/components/schemas/EdgeCloudNodeName' regionId: $ref: '#/components/schemas/RegionId' required: - - artifactId - - appName - AppName: - type: string - description: Name given by the application provider - ArtifactId: - type: string - format: uuid - description: A globally unique identifier assosiated with the artifact. Originating OP generates this identifier when artifact is submitted over NBI. - - ArtifactDetails: + - appId + + AppManifest: properties: name: type: string - description: Name of the artifact. + description: Name of the application. version: type: integer - description: Artifact version information + description: Application version information virtType: type: string enum: @@ -337,7 +406,7 @@ components: type: string minLength: 8 maxLength: 32 - description: Name of the file with the extension eg. zip, targz,etc. + description: Name of the file with the extension eg. zip, targz, etc. repository: type: object required: @@ -355,7 +424,6 @@ components: $ref: '#/components/schemas/Uri' userName: type: string - pattern: ^[A-Za-z][A-Za-z0-9_]{7,63}$ description: Username to acces the artifact repository password: type: string @@ -368,36 +436,27 @@ components: App provider should define all information needed to instantiate the component. If artifact is being defined at component level this section should have information just about the component. In case the artifact is being defined at application level the section should provide details about all the components. - type: object + type: array items: type: object required: - componentName - operatingSystem - cpuArchitecture - - images - networkInterfaces - numOfInstances - restartPolicy properties: componentName: type: string - pattern: ^[A-Za-z0-9][A-Za-z0-9_]{6,62}[A-Za-z0-9]$ - description: Must be a valid RFC 1035 label name. Component name must be unique with an application + description: Component name must be unique with an application operatingSystem: $ref: '#/components/schemas/OperatingSystem' cpuArchitecture: $ref: '#/components/schemas/CpuArchType' - images: - description: List of all images assosiated with the component. Images are uploaded or specified using UploadFile apis - type: array - items: - $ref: '#/components/schemas/FileId' - minItems: 1 networkInterfaces: description: Each application component exposes some ports either for external users or for inter component communication. Application provider is required to specify which ports are to be exposed and the type of traffic that will flow through these ports. - type: array items: type: object @@ -413,10 +472,8 @@ components: type: string description: Each Port and corresponding traffic protocol exposed by the component is identified by a name. Application client on user device requires this to uniquley idenify the interface. - pattern: ^[A-Za-z0-9][A-Za-z0-9_]{6,30}[A-Za-z0-9]$ network: type: string - pattern: ^[A-Za-z][A-Za-z0-9_]{6,30}[A-Za-z0-9]$ description: Name of the network. In case the application has to be assoisated with more then 1 network then app provider must define the name of the network on which this interface has to be exposed. This parameter is required only if the port has to be exposed on a specific network other then default. @@ -425,8 +482,8 @@ components: enum: - TCP - UDP - - HTTP/HTTPS - description: Defines the IP transport communication protocol i.e., TCP, UDP or HTTP + - ANY + description: Defines the IP transport communication protocol i.e., TCP, UDP or ANY port: type: integer format: int32 @@ -436,7 +493,6 @@ components: corresponding to this internal port and forward the client traffic from dynamic port to containerPort. interfaceName: type: string - pattern: ^[a-z][a-z0-9]{3}$ description: Interface Name. Required only if application has to be attatched to a network other then default. visibilityType: description: Defines whether the interface is exposed to outer world or not i.e., external, or internal. @@ -470,16 +526,28 @@ components: - x86_64 - arm_64 description: CPU Instruction Set Architecture (ISA) E.g., Intel, Arm etc. - ProvisionedApp: - description: Information about the provisioned application + InstantiatedApp: + description: Information about the instantiated application type: object properties: appInstanceId: $ref: '#/components/schemas/AppInstanceId' - edgeResourceName: - $ref: '#/components/schemas/EdgeResourceName' - EdgeResourceName: - description: Edge Resource Name - an identifier for an edge reource in the operator domain + edgeCloudNodeName: + $ref: '#/components/schemas/EdgeCloudNodeName' + uri: + $ref: '#/components/schemas/Uri' + status: + description: Status of the application instance (default is 'unknown') + type: string + enum: + - ready + - instantiating + - failed + - terminating + - unknown + default: unknown + EdgeCloudNodeName: + description: Edge Cloud Node Name - an identifier for an edge cloud node in the operator domain type: string ErrorInfo: @@ -498,18 +566,14 @@ components: - status - code - message - FileId: - type: string - format: uuid - description: A globally unique identifier assosiated with the image file. Originating OP generates this identifier when file is uploaded over NBI. - - MecDetails: + + EdgeCloudNodeDetails: type: object required: - geolocation properties: - edgeResourceName: - $ref: '#/components/schemas/EdgeResourceName' + edgeCloudNodeName: + $ref: '#/components/schemas/EdgeCloudNodeName' status: $ref: '#/components/schemas/Status' region: @@ -538,42 +602,42 @@ components: - UBUNTU - COREOS - WINDOWS - - OTHERS + - OTHER version: type: string enum: - OS_VERSION_UBUNTU_2204_LTS - OS_VERSION_RHEL_8 - - OS_VERSION_RHEL_7 - - OS_VERSION_ DEBIAN_11 - - OS_VERSION_COREOS_STABLE - - OS_MS_WINDOWS_2012_R2 + - OS_MS_WINDOWS_2022 + - OTHER license: type: string enum: - OS_LICENSE_TYPE_FREE - OS_LICENSE_TYPE_ON_DEMAND - + - OTHER + RegionId: type: string - description: Human readable name of the geografical zone of the MEC. Defined by the OP. + description: Human readable name of the geografical zone of the Edge Cloud Node. Defined by the OP. Status: - description: Status of the MEC Platform (default is 'unknown') + description: Status of the Edge Cloud Node (default is 'unknown') type: string enum: - active - inactive - unknown default: unknown - UploadedArtifact: - description: Information about the uploaded artifact + SubmittedApp: + description: Information about the submitted app type: object properties: - artifactId: - $ref: '#/components/schemas/ArtifactId' + appId: + $ref: '#/components/schemas/AppId' Uri: type: string + description: A Uniform Resource Identifier (URI) as per RFC 3986, identifies the endpoint within an Edge Cloud Node where the user equipment may connect to the selected application instance responses: '400': From 709370f5873d9e189bbcf1d6c3d543bfb3b8a9a1 Mon Sep 17 00:00:00 2001 From: Ricardo Serrano Gutierrez <145554214+TEF-RicardoSerr@users.noreply.github.com> Date: Fri, 15 Dec 2023 13:35:56 +0100 Subject: [PATCH 8/9] Updated POST appInstance response (202 accepted) --- code/API_definitions/EdgeCloud_LcM.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/API_definitions/EdgeCloud_LcM.yaml b/code/API_definitions/EdgeCloud_LcM.yaml index b80e9131..a95ded15 100644 --- a/code/API_definitions/EdgeCloud_LcM.yaml +++ b/code/API_definitions/EdgeCloud_LcM.yaml @@ -83,8 +83,8 @@ paths: $ref: '#/components/schemas/AppInstantiation' required: true responses: - '201': - description: Application instantiated successfully + '202': + description: Application instantiation accepted content: application/json: schema: From deaa48f4e0482b10f98ad146a26739dfac005dff Mon Sep 17 00:00:00 2001 From: Ricardo Serrano Gutierrez <145554214+TEF-RicardoSerr@users.noreply.github.com> Date: Mon, 18 Dec 2023 11:17:26 +0100 Subject: [PATCH 9/9] Deepak comments review --- code/API_definitions/EdgeCloud_LcM.yaml | 26 ++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/code/API_definitions/EdgeCloud_LcM.yaml b/code/API_definitions/EdgeCloud_LcM.yaml index a95ded15..e2f9af20 100644 --- a/code/API_definitions/EdgeCloud_LcM.yaml +++ b/code/API_definitions/EdgeCloud_LcM.yaml @@ -95,7 +95,7 @@ paths: aplicationInstace: type: array items: - $ref: '#/components/schemas/InstantiatedApp' + $ref: '#/components/schemas/AppInstanceInfo' minItems: 1 '400': $ref: '#/components/responses/400' @@ -138,9 +138,21 @@ paths: in: query required: false schema: - $ref: '#/components/schemas/AppInstanceId' + $ref: '#/components/schemas/AppInstanceId' + - name: edgeCloudName + description: Edge Cloud Node Name - an identifier for an edge cloud node in the operator domain + in: query + required: false + schema: + $ref: '#/components/schemas/EdgeCloudNodeName' + - name: regionId + description: Human readable name of the geografical zone of the Edge Cloud Node. Defined by the OP. + in: query + required: false + schema: + $ref: '#/components/schemas/RegionId' responses: - '201': + '200': description: Information of Aplication Instances content: application/json: @@ -152,7 +164,7 @@ paths: aplicationInstace: type: array items: - $ref: '#/components/schemas/InstantiatedApp' + $ref: '#/components/schemas/AppInstanceInfo' minItems: 1 '401': $ref: '#/components/responses/401' @@ -255,7 +267,7 @@ paths: schema: $ref: '#/components/schemas/AppId' responses: - '201': + '200': description: Information of Aplication content: application/json: @@ -526,8 +538,8 @@ components: - x86_64 - arm_64 description: CPU Instruction Set Architecture (ISA) E.g., Intel, Arm etc. - InstantiatedApp: - description: Information about the instantiated application + AppInstanceInfo: + description: Information about the application instance. type: object properties: appInstanceId: