diff --git a/.jenkins.sh b/.jenkins.sh new file mode 100755 index 0000000000000000000000000000000000000000..417a5f3ff640d8df0320163a83de73c19be5f1de --- /dev/null +++ b/.jenkins.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# Copyright ETSI 2018 +# See: https://forge.etsi.org/etsi-forge-copyright-statement.txt + +#set -vx +set -e + +cd "$(dirname "$0")" + +run_dir="$(pwd)" + +./docker/build-container.sh +./docker/run-container.sh "${run_dir}" diff --git a/ttcn/LibIts b/ttcn/LibIts index 903d7d1c3b8273c13bddb07568a4c038072e2b94..4c79dd3fe0dd4559d6481b635fe29d684d342b17 160000 --- a/ttcn/LibIts +++ b/ttcn/LibIts @@ -1 +1 @@ -Subproject commit 903d7d1c3b8273c13bddb07568a4c038072e2b94 +Subproject commit 4c79dd3fe0dd4559d6481b635fe29d684d342b17 diff --git a/ttcn/LibMec/AppEna/json/AppEnablementAPI.json b/ttcn/LibMec/AppEna/json/AppEnablementAPI.json new file mode 100644 index 0000000000000000000000000000000000000000..c5ee3fcda73baa582e50733f936af0fb7c26a484 --- /dev/null +++ b/ttcn/LibMec/AppEna/json/AppEnablementAPI.json @@ -0,0 +1,618 @@ +{ + "openapi": "3.0.2", + "info": { + "title": "UE Application Interface API", + "version": "1.1.1", + "description": "The ETSI MEC ISG MEC016 UE Application Interface API described using OpenAPI", + "license": { + "name": "ETSI Forge copyright notice", + "url": "https://forge.etsi.org/etsi-forge-copyright-notice.txt" + }, + "contact": { + "email": "cti_support@etsi.org" + } + }, + "externalDocs": { + "description": "ETSI GS MEC016 UE Application Interface API, V1.1.1", + "url": "http://www.etsi.org/deliver/etsi_gs/MEC/001_099/016/01.01.01_60/gs_MEC016v010101p.pdf" + }, + "security": [ + { + "OauthSecurity": [ + "all" + ] + } + ], + "servers": [ + { + "url": "http://127.0.0.1:8081/mx2/v1" + }, + { + "url": "https://127.0.0.1:8081/mx2/v1" + } + ], + "tags": [ + { + "name": "appList" + }, + { + "name": "appContext" + } + ], + "paths": { + "/app_list": { + "get": { + "description": "Used to query information about the available MEC applications.", + "operationId": "AppList_GET", + "tags": [ + "appList" + ], + "parameters": [ + { + "$ref": "#/components/parameters/Query.AppName" + }, + { + "$ref": "#/components/parameters/Query.AppProvider" + }, + { + "$ref": "#/components/parameters/Query.AppSoftVersion" + }, + { + "$ref": "#/components/parameters/Query.ServiceCont" + }, + { + "$ref": "#/components/parameters/Query.VendorId" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/AppList" + }, + "400": { + "$ref": "#/components/responses/Error.400" + }, + "401": { + "$ref": "#/components/responses/Error.401" + }, + "403": { + "$ref": "#/components/responses/Error.403" + }, + "404": { + "$ref": "#/components/responses/Error.404" + } + } + } + }, + "/app_contexts": { + "post": { + "description": "The POST method can be used to create a new application context. Upon success, the response contains entity body describing the created application context.", + "operationId": "AppContext_POST", + "tags": [ + "appContext" + ], + "requestBody": { + "$ref": "#/components/requestBodies/AppContext" + }, + "responses": { + "201": { + "$ref": "#/components/responses/AppContext" + }, + "400": { + "$ref": "#/components/responses/Error.400" + }, + "401": { + "$ref": "#/components/responses/Error.401" + }, + "403": { + "$ref": "#/components/responses/Error.403" + }, + "404": { + "$ref": "#/components/responses/Error.404" + } + } + } + }, + "/app_contexts/{contextId}": { + "parameters": [ + { + "$ref": "#/components/parameters/Path.ContextId" + } + ], + "put": { + "description": "The PUT method is used to update the callback reference of the existing application context. Upon successful operation, the target resource is updated with new callback reference.", + "operationId": "AppContextId_PUT", + "tags": [ + "appContext" + ], + "requestBody": { + "$ref": "#/components/requestBodies/AppContext" + }, + "responses": { + "204": { + "description": "No Content." + }, + "400": { + "$ref": "#/components/responses/Error.400" + }, + "401": { + "$ref": "#/components/responses/Error.401" + }, + "403": { + "$ref": "#/components/responses/Error.403" + }, + "404": { + "$ref": "#/components/responses/Error.404" + } + } + }, + "delete": { + "description": "The DELETE method is used to delete the resource that represents the existing application context.", + "operationId": "AppContextId_DEL", + "tags": [ + "appContext" + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "$ref": "#/components/responses/Error.400" + }, + "401": { + "$ref": "#/components/responses/Error.401" + }, + "403": { + "$ref": "#/components/responses/Error.403" + }, + "404": { + "$ref": "#/components/responses/Error.404" + } + } + } + } + }, + "components": { + "parameters": { + "Query.AppName": { + "name": "appName", + "in": "query", + "description": "Name to identify the MEC application", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "Query.AppProvider": { + "name": "appProvider", + "in": "query", + "description": "Provider of the MEC application", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "Query.AppSoftVersion": { + "name": "appSoftVersion", + "in": "query", + "description": "Software version of the MEC application", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "Query.ServiceCont": { + "name": "serviceCont", + "in": "query", + "description": "Required service continuity mode for this application", + "required": false, + "schema": { + "type": "string", + "enum": [ + "SERVICE_CONTINUITY_NOT_REQUIRED", + "SERVICE_CONTINUITY_REQUIRED" + ] + } + }, + "Query.VendorId": { + "name": "vendorId", + "in": "query", + "description": "Vendor identifier", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "Path.ContextId": { + "name": "contextId", + "in": "path", + "description": "Uniquely identifies the application context in the MEC system. It is assigned by the MEC system and included in the response to an AppContext create.", + "required": true, + "schema": { + "type": "string" + } + } + }, + "requestBodies": { + "AppContext": { + "description": "Uniquely identifies the application context in the MEC system. It is assigned by the MEC system and included in the response to an AppContext create.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppContext" + } + } + }, + "required": true + } + }, + "responses": { + "AppContext": { + "description": "The response body contains the Application Context as it was created by the MEC system", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppContext" + } + } + } + }, + "AppList": { + "description": "The response body contains the ApplicationList resource available for the querying UE application", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationList" + } + } + } + }, + "Error.400": { + "description": "Bad Request. It is used to indicate that incorrect parameters were passed to the request.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Empty" + } + } + } + }, + "Error.401": { + "description": "Unauthorized. It is used when the client did not submit the appropriate credentials.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Empty" + } + } + } + }, + "Error.403": { + "description": "Forbidden. The operation is not allowed given the current status of the resource. ", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "Error.404": { + "description": "Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Empty" + } + } + } + } + }, + "securitySchemes": { + "OauthSecurity": { + "type": "oauth2", + "flows": { + "clientCredentials": { + "tokenUrl": "https://oauth.exampleAPI/token", + "scopes": { + "all": "Single oauth2 scope for API" + } + } + } + } + }, + "schemas": { + "Empty": { + "description": "Empty schema" + }, + "ProblemDetails": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/Problem.type" + }, + "title": { + "$ref": "#/components/schemas/Problem.title" + }, + "status": { + "$ref": "#/components/schemas/Problem.status" + }, + "detail": { + "$ref": "#/components/schemas/Problem.detail" + }, + "instance": { + "$ref": "#/components/schemas/Problem.instance" + } + } + }, + "Problem.type": { + "type": "string", + "format": "uri", + "description": "A URI reference according to IETF RFC 3986 that identifies the problem type" + }, + "Problem.title": { + "type": "string", + "description": "A short, human-readable summary of the problem type" + }, + "Problem.status": { + "type": "integer", + "format": "uint32", + "description": "The HTTP status code for this occurrence of the problem" + }, + "Problem.detail": { + "type": "string", + "description": "A human-readable explanation specific to this occurrence of the problem" + }, + "Problem.instance": { + "type": "string", + "format": "uri", + "description": "A URI reference that identifies the specific occurrence of the problem" + }, + "ApplicationList": { + "description": "Information on available applications", + "type": "object", + "properties": { + "appInfo": { + "$ref": "#/components/schemas/AppInfo" + }, + "vendorSpecificExt": { + "$ref": "#/components/schemas/VendorSpecificExt" + } + } + }, + "AppContext": { + "description": "Information on application context created by the MEC system", + "type": "object", + "required": [ + "contextId", + "associateUeAppId", + "appInfo" + ], + "properties": { + "contextId": { + "$ref": "#/components/schemas/ContextId" + }, + "associateUeAppId": { + "$ref": "#/components/schemas/AssociateUeAppId" + }, + "callbackReference": { + "$ref": "#/components/schemas/CallbackReference" + }, + "appInfo": { + "$ref": "#/components/schemas/RequiredAppInfo" + } + } + }, + "NotificationEvent": { + "description": "The parameters used in the method \"Receiving notification events\".", + "type": "object", + "required": [ + "referenceURI" + ], + "properties": { + "referenceURI": { + "$ref": "#/components/schemas/ReferenceURL" + } + } + }, + "VendorSpecificExtList": { + "description": "Extension for vendor specific information.", + "type": "array", + "minItems": 0, + "items": { + "$ref": "#/components/schemas/VendorSpecificExt" + } + }, + "VendorSpecificExt": { + "description": "Extension for vendor-specific information", + "required": [ + "vendorId" + ], + "properties": { + "vendorId": { + "$ref": "#/components/schemas/VendorId" + } + } + }, + "ContextId": { + "description": "Uniquely identifies the application context in the MEC system. Assigned by the MEC system and included in the response. The length of the value shall not exceed 32 characters.", + "type": "string" + }, + "AssociateUeAppId": { + "description": "Uniquely identifies the UE application. Included in the request. The length of the value shall not exceed 32 characters.", + "type": "string" + }, + "VendorId": { + "description": "Vendor identifier. The length of the value shall not exceed 32 characters. The rest of the structure of this vendor specific extension is not defined", + "type": "string" + }, + "AppInfo": { + "description": "User applications available for the UE application", + "type": "array", + "items": { + "$ref": "#/components/schemas/AppInfoList" + } + }, + "AppInfoList": { + "type": "object", + "required": [ + "appName", + "appProvider", + "appDescription" + ], + "properties": { + "appName": { + "$ref": "#/components/schemas/AppName" + }, + "appProvider": { + "$ref": "#/components/schemas/AppProvider" + }, + "appSoftVersion": { + "$ref": "#/components/schemas/AppSoftVersion" + }, + "appDescription": { + "$ref": "#/components/schemas/AppDescription" + }, + "appCharcs": { + "$ref": "#/components/schemas/AppCharcs" + } + } + }, + "RequiredAppInfo": { + "description": "Included in the request", + "type": "object", + "required": [ + "appName", + "appProvider", + "referenceURL" + ], + "properties": { + "appName": { + "$ref": "#/components/schemas/AppName" + }, + "appProvider": { + "$ref": "#/components/schemas/AppProvider" + }, + "appSoftVersion": { + "$ref": "#/components/schemas/AppSoftVersion" + }, + "appDescription": { + "$ref": "#/components/schemas/AppDescription" + }, + "referenceURL": { + "$ref": "#/components/schemas/ReferenceURL" + }, + "appPackageSource": { + "$ref": "#/components/schemas/AppPackageSource" + } + } + }, + "AppCharcs": { + "description": "The application characteristics relate to the system resources consumed by the application. UE application can use this information e.g., for estimating the cost of use of the application or for the expected user experience", + "type": "object", + "properties": { + "memory": { + "$ref": "#/components/schemas/Memory" + }, + "storage": { + "$ref": "#/components/schemas/Storage" + }, + "latency": { + "$ref": "#/components/schemas/Latency" + }, + "bandwidth": { + "$ref": "#/components/schemas/Bandwidth" + }, + "serviceCont": { + "$ref": "#/components/schemas/ServiceCont" + } + } + }, + "Memory": { + "description": "The maximum size in Mbytes of the memory resource reserved for the MEC application instance in the MEC system", + "type": "integer", + "format": "uint32" + }, + "Storage": { + "description": "The maximum size in Mbytes of the storage resource expected to be used by the MEC application instance in the MEC system", + "type": "integer", + "format": "uint32" + }, + "Latency": { + "description": "The target round trip time in milliseconds supported by the MEC system for the MEC application instance", + "type": "integer", + "format": "uint32" + }, + "Bandwidth": { + "description": "The required connection bandwidth in kbit/s for the use of the mobile edge application instance", + "type": "integer", + "format": "uint32" + }, + "ServiceCont": { + "description": "Required service continuity mode for this application.", + "type": "string", + "enum": [ + "SERVICE_CONTINUITY_NOT_REQUIRED", + "SERVICE_CONTINUITY_REQUIRED" + ] + }, + "AppName": { + "description": "Name of the MEC application. The length of the value shall not exceed 32 characters.", + "type": "string" + }, + "AppProvider": { + "description": "Provider of the MEC application. The length of the value shall not exceed 32 characters.", + "type": "string" + }, + "AppSoftVersion": { + "description": "Software version of the MEC application. The length of the value shall not exceed 32 characters.", + "type": "string" + }, + "AppDescription": { + "description": "Human readable description of the MEC application. NOTE the language support may be limited. The length of the value shall not exceed 128 characters.", + "type": "string" + }, + "CallbackReference": { + "description": "URI assigned by the UE application to receive application lifecycle related notifications. Included in the request. This subscription stays alive for the lifetime of the application context.", + "type": "string", + "format": "uri" + }, + "ReferenceURL": { + "description": "Address of the user application. Used as the reference URL for the application. Assigned by the MEC system and included in the response", + "type": "string", + "format": "uri" + }, + "AppPackageSource": { + "description": "URI of the application package. Included in the request if the application is not one in the ApplicationList. appPackageSource enables on-boarding of the application package into the MEC system. The application package shall comply with the definitions in clause 6.2.1.2 of ETSI GS MEC 010-2", + "type": "string", + "format": "uri" + } + } + } +} \ No newline at end of file diff --git a/ttcn/LibMec/AppEna/ttcn/AppEnablementAPI_Templates.ttcn b/ttcn/LibMec/AppEna/ttcn/AppEnablementAPI_Templates.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..073cd18637eb6bce09b997bad6f3f58f1262025e --- /dev/null +++ b/ttcn/LibMec/AppEna/ttcn/AppEnablementAPI_Templates.ttcn @@ -0,0 +1,184 @@ +/** + * @desc The ETSI MEC ISG MEC011 Application Enablement API described using OpenAPI + * @see http://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/01.01.01_60/gs_mec011v010101p.pdf + */ +module AppEnablementAPI_Templates { + + // JSON + import from JSON all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + // LibMec/AppEna + import from AppEnablementAPI_TypesAndValues all; + + template (present) ProblemDetails mw_problem_details( + template (present) JSON.String p_type := ?, + template (present) JSON.String p_title := ?, + template (present) UInt32 p_status := ?, + template (present) JSON.String p_detail := ?, + template (present) JSON.String p_instance := ? + ) := { + type_ := p_type, + title := p_title, + status := p_status, + detail := p_detail, + instance := p_instance + } // End of template mw_problem_details + + template (value) ApplicationList m_application_list( + in template (value) AppInfo p_app_info, + in template (value) VendorSpecificExt p_vendor_specific_ext + ) := { + appInfo := p_app_info, + vendorSpecificExt := p_vendor_specific_ext + } // End of template m_application_list + + /** + * @desc Information on application context created by the MEC system. + */ + type record AppContext { + ContextId contextId, + AssociateUeAppId associateUeAppId, + RequiredAppInfo appInfo, + CallbackReference callbackReference optional + } + + /** + * @desc The parameters used in the method "Receiving notification events". + */ + type record NotificationEvent { + ReferenceURL referenceURI + } + + /** + * @desc Extension for vendor specific information. + */ + type record length(0..infinity) of VendorSpecificExt VendorSpecificExtList; + + /** + * @desc Extension for vendor-specific information. + */ + type record VendorSpecificExt { + VendorId vendorId + } + + /** + * @desc Uniquely identifies the application context in the MEC system. Assigned by the MEC system and included in the response. The length of the value shall not exceed 32 characters. + */ + type JSON.String ContextId length(1..32) with {encode "length(1..32)"}; + + /** + * @desc Uniquely identifies the UE application. Included in the request. The length of the value shall not exceed 32 characters. + */ + type JSON.String AssociateUeAppId length(1..32) with {encode "length(1..32)"}; + + /** + * @desc Vendor identifier. The length of the value shall not exceed 32 characters. The rest of the structure of this vendor specific extension is not defined. + */ + type JSON.String VendorId; + + /** + * @desc User applications available for the UE application. + */ + type record of AppInfoList AppInfo; + + /** + * @desc User applications available for the UE application. + */ + type record AppInfoList { + AppName appName, + AppProvider appProvider, + AppDescription appDescription, + AppSoftVersion appSoftVersion optional, + AppCharcs appCharcs optional + } + + /** + * @desc Included in the request. + */ + type record RequiredAppInfo { + AppName appName, + AppProvider appProvider, + ReferenceURL referenceURL, + AppSoftVersion appSoftVersion optional, + AppDescription appDescription optional, + AppPackageSource appPackageSource optional + } + + /** + * @desc The application characteristics relate to the system resources consumed by the application. UE application can use this information e.g., for estimating the cost of use of the application or for the expected user experience. + */ + type record AppCharcs { + Memory memory, + Storage storage, + Latency latency, + Bandwidth bandwidth, + ServiceCont serviceCont + } + + /** + * @desc The maximum size in Mbytes of the memory resource reserved for the MEC application instance in the MEC system. + */ + type UInt32 Memory; + + /** + * @desc The maximum size in Mbytes of the storage resource expected to be used by the MEC application instance in the MEC system. + */ + type UInt32 Storage; + + /** + * @desc The target round trip time in milliseconds supported by the MEC system for the MEC application instance. + */ + type UInt32 Latency; + + /** + * @desc The required connection bandwidth in kbit/s for the use of the mobile edge application instance. + */ + type UInt32 Bandwidth; + + /** + * @desc Required service continuity mode for this application. + */ + type enumerated ServiceCont { + SERVICE_CONTINUITY_NOT_REQUIRED, + SERVICE_CONTINUITY_REQUIRED + } + + /** + * @desc Name of the MEC application. The length of the value shall not exceed 32 characters. + */ + type JSON.String AppName length(1..32) with {encode "length(1..32)"}; + + /** + * @desc Provider of the MEC application. The length of the value shall not exceed 32 characters. + */ + type JSON.String AppProvider length(1..32) with {encode "length(1..32)"}; + + /** + * @desc Software version of the MEC application. The length of the value shall not exceed 32 characters. + */ + type JSON.String AppSoftVersion length(1..32) with {encode "length(1..32)"}; + + /** + * @desc Human readable description of the MEC application. NOTE the language support may be limited. The length of the value shall not exceed 128 characters. + */ + type JSON.String AppDescription length(1..128) with {encode "length(1..128)"}; + + /** + * @desc URI assigned by the UE application to receive application lifecycle related notifications. Included in the request. This subscription stays alive for the lifetime of the application context. + */ + type JSON.String CallbackReference; + + /** + * @desc Address of the user application. Used as the reference URL for the application. Assigned by the MEC system and included in the response. + */ + type JSON.AnyURI ReferenceURL; + + /** + * @desc URI of the application package. Included in the request if the application is not one in the ApplicationList. appPackageSource enables on-boarding of the application package into the MEC system. The application package shall comply with the definitions in clause 6.2.1.2 of ETSI GS MEC 010-2. + */ + type JSON.AnyURI AppPackageSource; + +} // End of module AppEnablementAPI_Templates diff --git a/ttcn/LibMec/AppEna/ttcn/AppEnablementAPI_TypesAndValues.ttcn b/ttcn/LibMec/AppEna/ttcn/AppEnablementAPI_TypesAndValues.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..02d388f3f3b4b500e36b8d0263bb1d9ee28b9115 --- /dev/null +++ b/ttcn/LibMec/AppEna/ttcn/AppEnablementAPI_TypesAndValues.ttcn @@ -0,0 +1,188 @@ +/** + * @desc The ETSI MEC ISG MEC011 Application Enablement API described using OpenAPI + * @see http://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/01.01.01_60/gs_mec011v010101p.pdf + */ +module AppEnablementAPI_TypesAndValues { + + // JSON + import from JSON all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + /** + * @desc Problem Details for HTTP APIs + * @member type_ A URI reference according to IETF RFC 3986 that identifies the problem type + * @member title A short, human-readable summary of the problem type + * @member status The HTTP status code for this occurrence of the problem + * @member detail A human-readable explanation specific to this occurrence of the problem + * @member instance A URI reference that identifies the specific occurrence of the problem + * @see IETF RFC 7807 Clause 3. The Problem Details JSON Object + */ + type record ProblemDetails { + JSON.String type_, + JSON.String title, + UInt32 status, + JSON.String detail, + JSON.String instance + } with { + variant (type_) "name as 'type'"; + } + + /** + * @desc Information on available applications. + */ + type record ApplicationList { + AppInfo appInfo, + VendorSpecificExt vendorSpecificExt + } + + /** + * @desc Information on application context created by the MEC system. + */ + type record AppContext { + ContextId contextId, + AssociateUeAppId associateUeAppId, + RequiredAppInfo appInfo, + CallbackReference callbackReference optional + } + + /** + * @desc The parameters used in the method "Receiving notification events". + */ + type record NotificationEvent { + ReferenceURL referenceURI + } + + /** + * @desc Extension for vendor specific information. + */ + type record length(0..infinity) of VendorSpecificExt VendorSpecificExtList; + + /** + * @desc Extension for vendor-specific information. + */ + type record VendorSpecificExt { + VendorId vendorId + } + + /** + * @desc Uniquely identifies the application context in the MEC system. Assigned by the MEC system and included in the response. The length of the value shall not exceed 32 characters. + */ + type JSON.String ContextId length(1..32) with {encode "length(1..32)"}; + + /** + * @desc Uniquely identifies the UE application. Included in the request. The length of the value shall not exceed 32 characters. + */ + type JSON.String AssociateUeAppId length(1..32) with {encode "length(1..32)"}; + + /** + * @desc Vendor identifier. The length of the value shall not exceed 32 characters. The rest of the structure of this vendor specific extension is not defined. + */ + type JSON.String VendorId; + + /** + * @desc User applications available for the UE application. + */ + type record of AppInfoList AppInfo; + + /** + * @desc User applications available for the UE application. + */ + type record AppInfoList { + AppName appName, + AppProvider appProvider, + AppDescription appDescription, + AppSoftVersion appSoftVersion optional, + AppCharcs appCharcs optional + } + + /** + * @desc Included in the request. + */ + type record RequiredAppInfo { + AppName appName, + AppProvider appProvider, + ReferenceURL referenceURL, + AppSoftVersion appSoftVersion optional, + AppDescription appDescription optional, + AppPackageSource appPackageSource optional + } + + /** + * @desc The application characteristics relate to the system resources consumed by the application. UE application can use this information e.g., for estimating the cost of use of the application or for the expected user experience. + */ + type record AppCharcs { + Memory memory, + Storage storage, + Latency latency, + Bandwidth bandwidth, + ServiceCont serviceCont + } + + /** + * @desc The maximum size in Mbytes of the memory resource reserved for the MEC application instance in the MEC system. + */ + type UInt32 Memory; + + /** + * @desc The maximum size in Mbytes of the storage resource expected to be used by the MEC application instance in the MEC system. + */ + type UInt32 Storage; + + /** + * @desc The target round trip time in milliseconds supported by the MEC system for the MEC application instance. + */ + type UInt32 Latency; + + /** + * @desc The required connection bandwidth in kbit/s for the use of the mobile edge application instance. + */ + type UInt32 Bandwidth; + + /** + * @desc Required service continuity mode for this application. + */ + type enumerated ServiceCont { + SERVICE_CONTINUITY_NOT_REQUIRED, + SERVICE_CONTINUITY_REQUIRED + } + + /** + * @desc Name of the MEC application. The length of the value shall not exceed 32 characters. + */ + type JSON.String AppName length(1..32) with {encode "length(1..32)"}; + + /** + * @desc Provider of the MEC application. The length of the value shall not exceed 32 characters. + */ + type JSON.String AppProvider length(1..32) with {encode "length(1..32)"}; + + /** + * @desc Software version of the MEC application. The length of the value shall not exceed 32 characters. + */ + type JSON.String AppSoftVersion length(1..32) with {encode "length(1..32)"}; + + /** + * @desc Human readable description of the MEC application. NOTE the language support may be limited. The length of the value shall not exceed 128 characters. + */ + type JSON.String AppDescription length(1..128) with {encode "length(1..128)"}; + + /** + * @desc URI assigned by the UE application to receive application lifecycle related notifications. Included in the request. This subscription stays alive for the lifetime of the application context. + */ + type JSON.String CallbackReference; + + /** + * @desc Address of the user application. Used as the reference URL for the application. Assigned by the MEC system and included in the response. + */ + type JSON.AnyURI ReferenceURL; + + /** + * @desc URI of the application package. Included in the request if the application is not one in the ApplicationList. appPackageSource enables on-boarding of the application package into the MEC system. The application package shall comply with the definitions in clause 6.2.1.2 of ETSI GS MEC 010-2. + */ + type JSON.AnyURI AppPackageSource; + +} with { + encode "JSON" +} // End of module AppEnablementAPI_TypesAndValues diff --git a/ttcn/LibMec/UEidentityAPI/json/UEidentityAPI.json b/ttcn/LibMec/UEidentityAPI/json/UEidentityAPI.json index bbdc08bb4b17189a21c1cc646428443cb819a2dc..cc5098e9ed472c9dec4e55745584d9e974327ce8 100644 --- a/ttcn/LibMec/UEidentityAPI/json/UEidentityAPI.json +++ b/ttcn/LibMec/UEidentityAPI/json/UEidentityAPI.json @@ -1,30 +1,21 @@ { - "swagger": "2.0", + "openapi": "3.0.2", "info": { - "description": "The ETSI MEC ISG MEC014 UE Identity API described using OpenAPI", - "version": "1.1.1", "title": "UE Identity API", + "version": "1.1.1", + "description": "The ETSI MEC ISG MEC014 UE Identity API described using OpenAPI", "license": { "name": "ETSI Forge copyright notice", "url": "https://forge.etsi.org/etsi-forge-copyright-notice.txt" + }, + "contact": { + "email": "cti_support@etsi.org" } }, "externalDocs": { "description": "ETSI GS MEC014 UE Identity API, V1.1.1", "url": "http://www.etsi.org/deliver/etsi_gs/MEC/001_099/014/01.01.01_60/gs_mec014v010101p.pdf" }, - "host": "127.0.0.1:8081", - "basePath": "/ui/v1", - "schemes": [ - "http", - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], "security": [ { "OauthSecurity": [ @@ -32,278 +23,288 @@ ] } ], - "securityDefinitions": { - "OauthSecurity": { - "type": "oauth2", - "flow": "application", - "tokenUrl": "https://oauth.exampleAPI/token", - "scopes": { - "all": "Single oauth2 scope for API" - } - } - }, - "parameters": { - "Body.UeIdentityTagInfo": { - "name": "UeIdentityTagInfo", - "in": "body", - "description": "'The updated \"state\" for each included UE Identity tag is included in the entity body of the request'", - "required": true, - "schema": { - "$ref": "#/definitions/UeIdentityTagInfo" - } - }, - "Path.AppInstanceId": { - "name": "appInstanceId", - "in": "path", - "description": "Represents a mobile edge application instance", - "required": true, - "type": "string" + "servers": [ + { + "url": "http://127.0.0.1:8081/ui/v1" }, - "Query.UeIdentityTag": { - "name": "ueIdentityTag", - "in": "query", - "description": "Represents a UE", - "required": true, - "type": "array", - "items": { - "type": "string" - } + { + "url": "https://127.0.0.1:8081/ui/v1" } - }, + ], + "tags": [ + { + "name": "ueIdentityTagInfo" + } + ], "paths": { "/{appInstanceId}/ue_identity_tag_info": { "parameters": [ { - "$ref": "#/parameters/Path.AppInstanceId" + "$ref": "#/components/parameters/Path.AppInstanceId" } ], "get": { "description": "Retrieves information about a specific UeIdentityTagInfo resource", - "produces": [ - "application/json" + "operationId": "UeIdentityTagInfo_GET", + "tags": [ + "ueIdentityTagInfo" ], "parameters": [ { - "$ref": "#/parameters/Query.UeIdentityTag" + "$ref": "#/components/parameters/Query.UeIdentityTag" } ], "responses": { "200": { "description": "It is used to indicate nonspecific success. The response body contains a representation of the UeIdentityTagInfo resource.", - "schema": { - "required": [ - "UeIdentityTagInfo" - ], - "properties": { - "UeIdentityTagInfo": { - "$ref": "#/definitions/UeIdentityTagInfo" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UeIdentityTagInfo" } } } }, "400": { - "description": "Incorrect parameters were passed in the request.In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", - "schema": { - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } + "$ref": "#/components/responses/Error.400" }, "403": { - "description": "The operation is not allowed given the current status of the resource. More information should be provided in the \"detail\" attribute of the \"ProblemDetails\" structure.", - "schema": { - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } + "$ref": "#/components/responses/Error.403" }, "404": { - "description": "The client provided a URI that cannot be mapped to a valid resource URL. In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", - "schema": { - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } + "$ref": "#/components/responses/Error.404" } } }, "put": { "description": "Register/De-register the information about specific a UeIdentityTagInfo resource", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Body.UeIdentityTagInfo" - } + "operationId": "UeIdentityTagInfo_PUT", + "tags": [ + "ueIdentityTagInfo" ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UeIdentityTagInfo" + } + } + }, + "description": "'The updated \"state\" for each included UE Identity tag is included in the entity body of the request'", + "required": true + }, "responses": { "200": { "description": "It is used to indicate success. The response body contains a representation of the UeIdentityTagInfo resource", - "schema": { - "required": [ - "UeIdentityTagInfo" - ], - "properties": { - "UeIdentityTagInfo": { - "$ref": "#/definitions/UeIdentityTagInfo" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UeIdentityTagInfo" } } } }, "400": { - "description": "Incorrect parameters were passed in the request.In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", + "$ref": "#/components/responses/Error.400" + }, + "403": { + "$ref": "#/components/responses/Error.403" + }, + "404": { + "$ref": "#/components/responses/Error.404" + }, + "412": { + "$ref": "#/components/responses/Error.412" + } + } + } + } + }, + "components": { + "parameters": { + "Path.AppInstanceId": { + "name": "appInstanceId", + "in": "path", + "description": "Represents a mobile edge application instance", + "required": true, + "schema": { + "type": "string" + } + }, + "Query.UeIdentityTag": { + "name": "ueIdentityTag", + "in": "query", + "description": "Represents a UE", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "responses": { + "Error.400": { + "description": "Bad Request. Incorrect parameters were passed in the request.In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", + "content": { + "application/problem+json": { "schema": { - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } + "$ref": "#/components/schemas/ProblemDetails" } }, - "401": { - "description": "An erroneous or missing bearer token. More information should be provided in the \"detail\" attribute of the \"ProblemDetails\" structure.", + "text/plain": { "schema": { - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } + "$ref": "#/components/schemas/Empty" } - }, - "403": { - "description": "The operation is not allowed given the current status of the resource. More information should be provided in the \"detail\" attribute of the \"ProblemDetails\" structure.", + } + } + }, + "Error.403": { + "description": "Forbidden. The operation is not allowed given the current status of the resource. More information should be provided in the \"detail\" attribute of the \"ProblemDetails\" structure.", + "content": { + "application/problem+json": { "schema": { - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } + "$ref": "#/components/schemas/ProblemDetails" } - }, - "404": { - "description": "The client provided a URI that cannot be mapped to a valid resource URL. In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", + } + } + }, + "Error.404": { + "description": "Not Found. The client provided a URI that cannot be mapped to a valid resource URL. In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", + "content": { + "application/problem+json": { "schema": { - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } + "$ref": "#/components/schemas/ProblemDetails" } }, - "412": { - "description": "It is used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts.In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", + "text/plain": { "schema": { - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } + "$ref": "#/components/schemas/Empty" } } } - } - } - }, - "definitions": { - "ProblemDetails": { - "type": "object", - "properties": { - "type": { - "$ref": "#/definitions/Problem.type" - }, - "title": { - "$ref": "#/definitions/Problem.title" - }, - "status": { - "$ref": "#/definitions/Problem.status" - }, - "detail": { - "$ref": "#/definitions/Problem.detail" - }, - "instance": { - "$ref": "#/definitions/Problem.instance" + }, + "Error.412": { + "description": "Precondition Failed. It is used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts.In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Empty" + } + } } } }, - "Problem.type": { - "type": "string", - "format": "uri", - "description": "A URI reference according to IETF RFC 3986 that identifies the problem type" - }, - "Problem.title": { - "type": "string", - "description": "A short, human-readable summary of the problem type" - }, - "Problem.status": { - "type": "integer", - "format": "uint32", - "description": "The HTTP status code for this occurrence of the problem" - }, - "Problem.detail": { - "type": "string", - "description": "A human-readable explanation specific to this occurrence of the problem" - }, - "Problem.instance": { - "type": "string", - "format": "uri", - "description": "A URI reference that identifies the specific occurrence of the problem" - }, - "UeIdentityTagInfo": { - "description": "information of UE identity tag used in UE Identity feature", - "type": "object", - "required": [ - "ueIdentityTags" - ], - "properties": { - "ueIdentityTags": { - "$ref": "#/definitions/UeIdentityTags" + "securitySchemes": { + "OauthSecurity": { + "type": "oauth2", + "flows": { + "clientCredentials": { + "tokenUrl": "https://oauth.exampleAPI/token", + "scopes": { + "all": "Single oauth2 scope for API" + } + } } } }, - "UeIdentityTags": { - "description": "1 to N tags presented by a ME Application instance to a ME Platform", - "type": "array", - "items": { + "schemas": { + "Empty": { + "description": "Empty schema" + }, + "ProblemDetails": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/Problem.type" + }, + "title": { + "$ref": "#/components/schemas/Problem.title" + }, + "status": { + "$ref": "#/components/schemas/Problem.status" + }, + "detail": { + "$ref": "#/components/schemas/Problem.detail" + }, + "instance": { + "$ref": "#/components/schemas/Problem.instance" + } + } + }, + "Problem.type": { + "type": "string", + "format": "uri", + "description": "A URI reference according to IETF RFC 3986 that identifies the problem type" + }, + "Problem.title": { + "type": "string", + "description": "A short, human-readable summary of the problem type" + }, + "Problem.status": { + "type": "integer", + "format": "uint32", + "description": "The HTTP status code for this occurrence of the problem" + }, + "Problem.detail": { + "type": "string", + "description": "A human-readable explanation specific to this occurrence of the problem" + }, + "Problem.instance": { + "type": "string", + "format": "uri", + "description": "A URI reference that identifies the specific occurrence of the problem" + }, + "UeIdentityTagInfo": { + "description": "information of UE identity tag used in UE Identity feature", + "type": "object", "required": [ - "ueIdentityTag", - "state" + "ueIdentityTags" ], "properties": { - "ueIdentityTag": { - "$ref": "#/definitions/UeIdentityTag" - }, - "state": { - "$ref": "#/definitions/State" + "ueIdentityTags": { + "$ref": "#/components/schemas/UeIdentityTags" + } + } + }, + "UeIdentityTags": { + "description": "1 to N tags presented by a ME Application instance to a ME Platform", + "type": "array", + "items": { + "required": [ + "ueIdentityTag", + "state" + ], + "properties": { + "ueIdentityTag": { + "$ref": "#/components/schemas/UeIdentityTag" + }, + "state": { + "$ref": "#/components/schemas/State" + } } } + }, + "UeIdentityTag": { + "description": "Specific tag presented by a ME Application instance to a ME Platform", + "type": "string", + "example": "UeTagA" + }, + "State": { + "description": "Status of the resource ueIdentityTagInfo", + "type": "string", + "enum": [ + "UNREGISTERED", + "REGISTERED" + ], + "example": "REGISTERED" } - }, - "UeIdentityTag": { - "description": "Specific tag presented by a ME Application instance to a ME Platform", - "type": "string", - "example": "UeTagA" - }, - "State": { - "description": "Status of the resource ueIdentityTagInfo", - "type": "string", - "enum": [ - "UNREGISTERED", - "REGISTERED" - ], - "example": "REGISTERED" } } -} +} \ No newline at end of file